zfs/cmd
Brian Behlendorf a9977b37ca 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 <behlendorf1@llnl.gov>
Closes #2660
Closes #2274
2016-03-10 14:04:58 -08:00
..
arc_summary Make arc_summary.py and dbufstat.py compatible with python3 2016-01-07 17:09:59 -08:00
arcstat Update arcstat.py to remove deprecated rmis reference. 2015-12-04 15:28:45 -08:00
dbufstat Make arc_summary.py and dbufstat.py compatible with python3 2016-01-07 17:09:59 -08:00
fsck_zfs Add /sbin/fsck.zfs helper 2013-01-09 16:54:58 -08:00
mount_zfs mount.zfs: use getopt_long instead of getopt to guarantee permutation of argv. 2016-01-25 13:17:18 -08:00
vdev_id Add extra keyword 'slot' to vdev_id.conf 2015-08-30 10:03:56 -07:00
zdb Correctly parse -R flag arguments 2016-02-05 11:29:38 -08:00
zed Ensure zed _finish_daemonize() leaves fds 0-2 open 2016-03-08 17:46:41 -08:00
zfs Illumos 6298 - zfs_create_008_neg and zpool_create_023_neg 2016-01-15 15:38:35 -08:00
zhack Illumos 5959 - clean up per-dataset feature count code 2015-12-04 14:20:20 -08:00
zinject Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
zpios Add large block support to zpios(1) benchmark 2015-09-22 09:13:20 -07:00
zpool Relax MBR partition scanning requirement 2016-03-10 14:04:58 -08:00
zstreamdump Illumos 5746 - more checksumming in zfs send 2015-12-30 14:24:14 -08:00
ztest Illumos 6451 - ztest fails due to checksum errors 2016-01-25 13:15:49 -08:00
zvol_id Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
Makefile.am Install arc_summary.py 2015-03-03 13:38:17 -08:00