mirror_zfs/lib/libzfs
Richard Yao d2f3e292dc Add -gLp to zpool subcommands for alt vdev names
The following options have been added to the zpool add, iostat,
list, status, and split subcommands.  The default behavior was
not modified, from zfs(8).

  -g    Display vdev GUIDs  instead  of  the  normal  short
        device  names.  These GUIDs can be used in-place of
        device   names   for    the    zpool    detach/off‐
        line/remove/replace commands.

  -L    Display real paths for vdevs resolving all symbolic
        links. This can be used to lookup the current block
        device  name regardless of the /dev/disk/ path used
        to open it.

  -p    Display  full  paths  for vdevs instead of only the
        last component of the path.  This can  be  used  in
        conjunction with the -L flag.

This behavior may also be enabled using the following environment
variables.

  ZPOOL_VDEV_NAME_GUID
  ZPOOL_VDEV_NAME_FOLLOW_LINKS
  ZPOOL_VDEV_NAME_PATH

This change is based on worked originally started by Richard Yao
to add a -g option.  Then extended by @ilovezfs to add a -L option
for openzfsonosx.  Those changes have been merged, re-factored,
a -p option added and extended to all relevant zpool subcommands.

Original-patch-by: Richard Yao <ryao@gentoo.org>
Extended-by: ilovezfs <ilovezfs@icloud.com>
Extended-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2011
Closes #4341
2016-02-25 11:58:39 -08:00
..
.gitignore Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_changelist.c Remove ZFC_IOC_*_MINOR ioctl()s 2013-12-16 09:15:57 -08:00
libzfs_config.c Illumos 6358 - A faulted pool with only unavailable vdevs 2016-01-12 11:15:26 -08:00
libzfs_core.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_dataset.c Illumos 4953, 4954, 4955 2016-01-15 15:38:36 -08:00
libzfs_diff.c Illumos 4448 - zfs diff misprints unicode characters 2016-02-05 13:04:58 -08:00
libzfs_fru.c cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
libzfs_graph.c Illumos #3464 2013-09-04 16:01:24 -07:00
libzfs_import.c Illumos 1778 - Assertion failed: rn->rn_nozpool == B_FALSE 2016-01-22 16:18:26 -08:00
libzfs_iter.c Illumos 5427 - memory leak in libzfs when doing rollback 2015-07-10 12:09:32 -07:00
libzfs_mount.c Illumos 4953, 4954, 4955 2016-01-15 15:38:36 -08:00
libzfs_pool.c Add -gLp to zpool subcommands for alt vdev names 2016-02-25 11:58:39 -08:00
libzfs_sendrecv.c Illumos 5960, 5925 2016-01-08 15:08:19 -08:00
libzfs_status.c Read spl_hostid module parameter before gethostid() 2015-02-04 16:44:53 -08:00
libzfs_util.c Prevent zpool_find_vdev() from truncating vdev path 2016-02-08 09:37:55 -08:00
libzfs.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
Makefile.am Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00