mirror_zfs/lib/libzfs/os/linux
Brian Behlendorf af4da5ccf2
Check for minimum partition size
On Linux block devices used for vdevs will by partitioned.  The block
device must be large enough for an 64M partition starting at offset
of 2048 sectors (part1), and a second 64M reserved partition at the
end of the device (part9).

This commit adds a capacity check when creating the GPT label to
immediately detect a device which is too small.  With the existing
code this would be caught slightly latter when attempting to use
the partition.  Catching it sooner let's us print a more useful error.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #15898
2024-02-16 09:07:32 -08:00
..
libzfs_mount_os.c Expose ZFS dataset case sensitivity setting via sb_opts 2022-07-14 10:38:16 -07:00
libzfs_pool_os.c Check for minimum partition size 2024-02-16 09:07:32 -08:00
libzfs_util_os.c Fix unsafe string operations 2022-09-27 16:47:24 -07:00