zfs/lib
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
..
libavl Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
libefi Fixes for issues found with cppcheck tool 2016-07-27 13:31:22 -07:00
libicp Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
libnvpair OpenZFS 6447 - handful of nvpair cleanups 2017-08-30 12:04:27 -07:00
libshare Fix nfs snapdir automount 2017-03-08 09:26:33 -08:00
libspl Remove useless DEFAULT_INCLUDES in AM_CCASFLAGS 2017-10-12 01:42:05 +08:00
libtpool libtpool: don't clone affinity if not supported 2017-08-29 10:17:49 -07:00
libunicode Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
libuutil Correct cppcheck errors 2017-09-19 12:17:29 -07:00
libzfs Fix column alignment with long zpool names 2017-11-05 13:09:56 -08:00
libzfs_core Added no_scrub_restart flag to zpool reopen 2017-10-26 12:26:09 -07:00
libzpool OpenZFS 640 - number_to_scaled_string is duplicated in several commands 2017-10-30 14:47:20 -07:00
Makefile.am Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00