aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libspl/include/limits.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-07-17 10:46:46 -0700
committerBrian Behlendorf <[email protected]>2016-03-10 14:04:58 -0800
commita9977b37ca7bd27ff28de435f8666e253ff6330e (patch)
tree6daf579f786201ccc7d9e79395fb4e4c210146f0 /lib/libspl/include/limits.h
parent1ee159f423b5eb3c4646b0ba2dd0fb359503ba90 (diff)
Relax MBR partition scanning requirement
When checking a whole disk to see if it can be safely added to the pool a variety of checks are done. One of those checks is to attempt to determine the partition information and scan all the partitions for existing filesystems. Since ZoL contains a EFI library this partition scanning is easy to do for GPT partitioned disks. However, for non-GPT partitioned disks (MBR/EBR) things are a bit harder. The lack of a convenient library means non-GPT partitioned disks will not have all their partitions checked. For this reason, the default behavior was to require the force option. For example: invalid vdev specification use '-f' to override the following errors: /dev/vdb does not contain an GPT label but it may contain partition information in the MBR. However in practice requiring the force option for this case is counter-intuitively less safe. The reason is because only the first error is returned. By passing the force option it will suppress this first warning and potentially others you were not aware of. Therefore this patch inverts the default behavior for non-GPT formated disks (unformatted, MBR/EBR, etc). If no GPT table is detected and there is no file system detected on the provided block device. Then it will be assumed that block device is safe to use. Longer term it would be nice to see MBR/EBR scanning added to the utilities. This should be fairly straight forward to do. However these days it's somewhat less critical because Linux defaults to GPT partition tables for devices 2TB or larger. Signed-off-by: Brian Behlendorf <[email protected]> Closes #2660 Closes #2274
Diffstat (limited to 'lib/libspl/include/limits.h')
0 files changed, 0 insertions, 0 deletions