-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable automatic partitioning #3452
Comments
Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So add a '-D' option to 'add', 'attach', 'create', 'replace' and 'split' to disable the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So allow '-o whole_disk={on,off}' option to 'add', 'attach', 'create', 'replace' and 'split' to disable or enable, respectivly, the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So allow '-o whole_disk={on,off}' option to 'add', 'attach', 'create', 'replace' and 'split' to disable or enable, respectivly, the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
…ioning. Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So allow '-o whole_disk={on,off}' option to 'add', 'attach', 'create', 'replace' and 'split' to disable or enable, respectivly, the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
…ioning. Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So allow '-o whole_disk={on,off}' option to 'add', 'attach', 'create', 'replace' and 'split' to disable or enable, respectivly, the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
…ioning. Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So allow '-o whole_disk={on,off}' option to 'add', 'attach', 'create', 'replace' and 'split' to disable or enable, respectivly, the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
…ioning. Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So allow '-o whole_disk={on,off}' option to 'add', 'attach', 'create', 'replace' and 'split' to disable or enable, respectivly, the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
…ioning. Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So allow '-o whole_disk={on,off}' option to 'add', 'attach', 'create', 'replace' and 'split' to disable or enable, respectivly, the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
…ioning. Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So allow '-o whole_disk={on,off}' option to 'add', 'attach', 'create', 'replace' and 'split' to disable or enable, respectivly, the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
Sometimes it is desired to not have 'zpool' setup partitioning on devices it uses for the pool. So allow '-o whole_disk={on,off}' option to 'add', 'attach', 'create', 'replace' and 'split' to disable or enable, respectivly, the automatic partitioning. Signed-off-by: Turbo Fredriksson turbo@bayour.com Closes openzfs#94 Closes openzfs#719 Closes openzfs#1162 Closes openzfs#3452
Can we get this released? |
This have been running in the Debian GNU/Linux Wheezy and Jessie packages for quite a while and no one have complained :). |
Sorry, ignore. It was another patch I was thinking of... |
What would be the problem if we don't ever do partitioning? |
Functionally we wouldn't loose anything except some automatic performance tunings which are only done when ZFS knows it owns the entire block device. Cosmetically it would mean that the default |
It's really annoying that I have to juggle with partitions to autoexpand my pool. I expand it a lot, so this is annoying indeed! Please make an option |
I don't know about you, but the last three pools I've created with whole device provisioning have only created GPT tables with partition 1 containing the bulk of the drive, partition 9 containing 8MB of Sun reserved data, 1MB of free space at the head of the drive, and about 512KB of free space on the end of the drive. I had to explicitly create my own partition table and attach ZFS to part1 to make use of a GPT partition on my root volume. Maybe this was added post-0.6.5.6, as that's what I've been using on Ubuntu. |
Someone planning to work on that? I also find the new property partition = < raw | default | gpt > (see #3458) the best way. |
Is there also a way to change the size of the EFI System Partition when it is automatically created? And what happens if I had manually created a EFI System Partition (for installing the bootloader) using other tools, and installed ZFS on a partition instead of the whole disk, does this mean there are 2 EFI System Partitions on the disk? |
I find the sda9 of 'BF07' partition can be used for uefi boot ONLY when formatted as 'FAT12'. I wonder will |
They will not. |
It seems that not partitioning is now the default on Illuminos, only when given the |
@behlendorf I'm a commenter from #94 who is wondering what the status of this is on Linux. This annoyance has existed for at least 12 years. On a simple 6-disk pool purely for storage (not bootable) on Linux, you end up with literally 18 partitions, none of which technically serve a good purpose (I could accept 6 partitions if needed, re: avoiding primary and secondary GPTs). We don't have this problem on Solaris, FreeBSD (underlying layers will avoid the GPT regions, but if you want a bootable pool additional steps are required), and now (per previous comment) also Illumos (I love their |
I want complain here because this behavior actually prevented me to make a root-on-ZFS VDEV bootable. If I configure a VDEV without any partition, I can install GRUB for PC (i386-pc), and boot from it perfectly. But with this automatically created GPT, booting is not possible without a BIOS boot partition in that GPT. Sometimes I just creates pools on FreeBSD to avoid this issue, then move the devices to a Linux-based system; more commonly I uses the loop devices to trick it so no GPT will be created. But other than |
@Low-power How do you do this with the loop devices? Edit: losetup -f /dev/nvme4n1 worked for me, be mindful of the already existing loop devices in Talos |
@thoro it doesn't require loop devices, the original experiment used hard links. Ultimately it appears anything ending with a non-zero number (the '1' on the end of "/dev/nvme4n1" qualifies) will be wholly used. In fact this is actually a bug in the original bug (that is too awful to qualify as a misfeature). NVMe devices will never be detected as whole devices, which means this is completely broken. |
Yes, the whole automatic partitioning feature is not just undesirable, it has been badly implemented. Please fix this!! (That said, it makes it easier to use a whole NVMe device..!) |
@ehem This is weird, I used /dev/disk/by-id/nvme-uuid.99db755f-2bf1-4ef2-9e41-773a58179c35 and that was definitly partitioned and created quite an headache for me. It works now with loop devices, and also if the device is lvm. |
@thoro I don't know what algorithm is used to flag devices as being whole devices or not. Guessing Whatever the algorithm is the false positives and false negatives are so common that it is worthless. This is really a general issue of it is difficult to reliably distinguish whole versus part without plugging into |
Originally from #3448. A duplicate of, or related to, #94. #1162, #719 and possibility others. It would be a nice feature to have.
This behavior would be fairly straight forward to make configurable. The place to start would be to look at
make_leaf_vdev()
where it determines if the device is a wholedisk or not. If it's determined to be a wholedisk then it will be automatically partitioned with some reasonable default values. Otherwise, the passed device is just treated as a partition with no special handling.To get the desired behavior of not creating a partition table
zpool create
just needs to somehow communicate tomake_leaf_vdev()
that the vdev should not be considered a wholedisk even if it normally would be. Eventually else should just fallout automatically after that.The text was updated successfully, but these errors were encountered: