]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add -gLp to zpool subcommands for alt vdev names
authorRichard Yao <ryao@gentoo.org>
Sun, 29 Dec 2013 18:40:46 +0000 (13:40 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 25 Feb 2016 19:58:39 +0000 (11:58 -0800)
commitd2f3e292dccab23e47ade3c67677a10f353b9e85
tree89ffd386e9a11e4464386a4141ce1cca978a6c05
parente79a6bacc6666233e109513b614d19d9d7742820
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
cmd/zpool/zpool_main.c
include/libzfs.h
lib/libzfs/libzfs_pool.c
man/man8/zpool.8