NearNodeFlash / NearNodeFlash.github.io

View this document https://nearnodeflash.github.io/
Apache License 2.0
3 stars 3 forks source link

Rabbit must create namespaces at least big enough for zpool to create its metadata #131

Closed ajfloeder closed 3 months ago

ajfloeder commented 4 months ago

The absolute minimum device size we can allow turns out to be 142,606,336 bytes for a zpool. For a normally configured rabbit with 16 drives, that is:


142606336 * 16 = 2,281,701,376

To give some elbow room, the minimum allocation will be 4GB (256 MB * 16 drives).
roehrich-hpe commented 4 months ago

Can we point at a zfs doc or a zpool manpage where this info can be found?

behlendorf commented 4 months ago

You know, I don't think is formally documented anywhere in the man pages. But it should be. I'll open an issue or PR to get this documented here in the zpoolconcepts(7) man page. In the mean while the short version is:

1) When using a partition of file for a vdev the minimum device size is 64 MiB. 2) When using an unpartitioned block device ZFS will automatically partition the device as follows. a. part1 - Used for ZFS vdev data. Aligned to start at an offset of 2048 sectors, minimum size 64 MiB b. part9 - Legacy unused reserved partition. 64 MiB in size.

Which puts things a little over 128K after leaving room for the GPT partition tables themselves and other alignment considerations. Right now there's not an option to prevent ZFS from creating partitions when given a whole block device, but there is interesting in adding this option.