zfs
zfs copied to clipboard
ZFS should not be able to create partitions without GPT/advanced partition support
When creating partitions with zpool, I found I had quirky behaviors and other distros would not see my pool. I found out the reason why was because I didn't have advanced partitions turned on, and zfs worked without it. On the other systems with support for GPT, however, they could not recognize the partitions. A simple fix would be to note this in the documentation or put a requirement in the configure script to check for the proper partition support in the kernel.
Requiring CONFIG_EFI_PARTITION=y
in the kernel config seems sensible. Maybe an autotools test for the efi_partition()
entry point included from fs/partitions/efi.h
in the kernel sources.
See also issue #94.
If I have a ZFS pool created while EFI was off in the kernel, is there any way to migrate it to having EFI on in the kernel without having to backup/recreate?
I agree, let's check for CONFIG_EFI_PARTITION=y
at configure time and fail to build if it's not set.
I always wondered why ZoL doesn't have an option to actually use the whole disk(s) rather than automatically creating a strange EFI partition layout. I like that about Btrfs (even though I usually create a single big partition for Btrfs manually in order to make it bootable for UEFI boards where I can supply all kinds of custom filesystem drivers [including ZFS] but the firmware bootloader entries must usually point to GPT partition IDs, FS UUIDs do not seem to work). And, if partitioning is a must, I would prefer doing it manually (either omitting the small boot partition or creating it in a way which is presumed to be more compatible with x86_64 UEFI systems) and then have a way to flip the whole_disk flag manually (so I don't need to worry about the scheduler and cache settings, especially after moving disks around on the controller...).
I personally happen to need GPT support enabled anyway but I am not a fan of this solution in general because I am annoyed about having to keep the loadable module and the initram-fs/d options enabled in the kernel config for no other reason but to stop ZoL's scripts from complaining (I prefer fully monolithic kernels which can stand on their own feet and stand up without init "aids" [sorry for the stupid and cruel pun but I really don't like initram-fs/d, yet more and more things try to force it on me -> thankfully ZoL is happy with it enabled but actually kept inactive as long as I don't wish to boot from ZFS root]).
When using a whole device purely for data, you do not want a partioned device at all, and certainly no EFI partition. Right now it is really hard to accomplish this, which is insane.
@pepa65 is it hard, or impossible? if hard, what are the steps?
ah lol I forgot I even liked the workaround comments. what tricky ways to overcome this absurd inflexibility!