mirror_zfs/cmd
George G 2df9ad1c07 Fix column alignment with long zpool names
`zpool status` normally aligns NAME/STATE/etc columns:

    NAME                       STATE     READ WRITE CKSUM
    dummy                      ONLINE       0     0     0
      mirror-0                 ONLINE       0     0     0
        /tmp/dummy-long-1.bin  ONLINE       0     0     0
        /tmp/dummy-long-2.bin  ONLINE       0     0     0
      mirror-1                 ONLINE       0     0     0
        /tmp/dummy-long-3.bin  ONLINE       0     0     0
        /tmp/dummy-long-4.bin  ONLINE       0     0     0

However, if the zpool name is longer than the zvol names, alignment
issues arise:

    NAME                  STATE     READ WRITE CKSUM
    dummy-very-very-long-zpool-name  ONLINE       0     0     0
      mirror-0            ONLINE       0     0     0
        /tmp/dummy-1.bin  ONLINE       0     0     0
        /tmp/dummy-2.bin  ONLINE       0     0     0
      mirror-1            ONLINE       0     0     0
        /tmp/dummy-3.bin  ONLINE       0     0     0
        /tmp/dummy-4.bin  ONLINE       0     0     0

`zpool iostat` and `zpool import` are also affected:

                  capacity     operations     bandwidth
    pool        alloc   free   read  write   read  write
    ----------  -----  -----  -----  -----  -----  -----
    dummy        104K  1.97G      0      0    152  9.84K
    dummy-very-very-long-zpool-name   152K  1.97G      0      1    144  13.1K
    ----------  -----  -----  -----  -----  -----  -----

    dummy-very-very-long-zpool-name  ONLINE
      mirror-0            ONLINE
        /tmp/dummy-1.bin  ONLINE
        /tmp/dummy-2.bin  ONLINE
      mirror-1            ONLINE
        /tmp/dummy-3.bin  ONLINE
        /tmp/dummy-4.bin  ONLINE

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Gaydarov <git@gg7.io>
Closes #6786
2017-11-05 13:09:56 -08:00
..
arc_summary Rewrite fHits() in arc_summary.py with SI units 2017-11-04 13:33:28 -07:00
arcstat arcstat: flush stdout / outfile after each line 2017-10-26 12:18:49 -07:00
dbufstat Add support for DMU_OTN_* types in dbufstat.py 2017-08-22 11:53:40 -07:00
fsck_zfs Add /sbin/fsck.zfs helper 2013-01-09 16:54:58 -08:00
mount_zfs Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
raidz_test Simplify threads, mutexs, cvs and rwlocks 2017-08-11 08:51:44 -07:00
vdev_id vdev_id: extension for new scsi topology 2017-09-27 10:39:47 -07:00
zdb OpenZFS 640 - number_to_scaled_string is duplicated in several commands 2017-10-30 14:47:20 -07:00
zed Added no_scrub_restart flag to zpool reopen 2017-10-26 12:26:09 -07:00
zfs Fix coverity defects: 147480, 147584 2017-10-16 15:32:48 -07:00
zgenhostid Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zhack Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zinject Add corruption failure option to zinject(8) 2017-08-14 15:17:15 -07:00
zpool Fix column alignment with long zpool names 2017-11-05 13:09:56 -08:00
zstreamdump Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
ztest OpenZFS 640 - number_to_scaled_string is duplicated in several commands 2017-10-30 14:47:20 -07:00
zvol_id OpenZFS 6314 - buffer overflow in dsl_dataset_name 2016-06-28 13:47:03 -07:00
Makefile.am Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00