purpose of the eight megabyte zfs disk partitions ?

sudo parted /dev/sdp print [sudo] password for support: Model: LENOVO-X AL15SEB090N (scsi) Disk /dev/sdp: 900GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size Filesystem Name Flags 1 1049kB 900GB 900GB zfs zfs-e6e2ff7ca29b11f4 9 900GB 900GB 8389kB <<<<=============================== ??

------------
One issue I ran into with manual partitioning way back in the day is that when scanning for labels is that /dev/sdc ends at the same sector as /dev/sdc2 (or whichever partition is last). When looking at the back of the disk for labels, ZFS could see them on both but /dev/sdc would be found, and then immediately fault because the front labels are mangled/missing or the volume size grossly mismatches the label size. Importing fails. Putting an 8 MB wedge there prevents that.

The actual data partition needs to fit completely in the disk. Sometimes the exact disk size can vary by some bytes between manufacturers or even between different models, while their advertised size is the same in terabytes. If you're unlucky, your new disk might be smaller than the original.
In case of a smaller replacement disk, ZFS could just shrink the size of this buffer partition and all of the real data would still fit.
If you don't have this buffer and the new disk is smaller, ZFS would be some bytes short of fitting the data and it just cannot handle this type of resizing operation.

For some reason I don't have those extra partitions, but maybe that's because I'm running ZFS on top of LUKS and not directly on the disk.

I use those as EFI boot partitions. Format with FAT12 (it's so small that mkfs complains when using FAT16) and it's big enough to put grub2 on, then load the kernel and initrd from the ZFS pool. Beeing able to snapshot kernel/initrd is quite neat when tinkering with gentoo


Consensus is that it's to let you replace the disk with a slightly smaller disk without issue.

No comments:

Post a Comment