From 099700d9dff46309cdd16f4c4331daddb70d8570 Mon Sep 17 00:00:00 2001 From: Giuseppe Di Natale Date: Mon, 5 Jun 2017 13:52:15 -0400 Subject: zpool iostat/status -c improvements Users can now provide their own scripts to be run with 'zpool iostat/status -c'. User scripts should be placed in ~/.zpool.d to be included in zpool's default search path. Provide a script which can be used with 'zpool iostat|status -c' that will return the type of device (hdd, sdd, file). Provide a script to get various values from smartctl when using 'zpool iostat/status -c'. Allow users to define the ZPOOL_SCRIPTS_PATH environment variable which can be used to override the default 'zpool iostat/status -c' search path. Allow the ZPOOL_SCRIPTS_ENABLED environment variable to enable or disable 'zpool status/iostat -c' functionality. Use the new smart script to provide the serial command. Install /etc/sudoers.d/zfs file which contains the sudoer rule for smartctl as a sample. Allow 'zpool iostat/status -c' tests to run in tree. Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf Signed-off-by: Giuseppe Di Natale Closes #6121 Closes #6153 --- cmd/zpool/zpool.d/lsblk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cmd/zpool/zpool.d/lsblk') diff --git a/cmd/zpool/zpool.d/lsblk b/cmd/zpool/zpool.d/lsblk index fc0394a3d..1cdef4049 100755 --- a/cmd/zpool/zpool.d/lsblk +++ b/cmd/zpool/zpool.d/lsblk @@ -38,16 +38,15 @@ # DISC-ZERO discard zeroes data # # If the script is run as just 'lsblk' then print out disk size, vendor, -# model number and serial number. +# and model number. helpstr=" label: Show filesystem label. model: Show disk model number. -serial: Show disk serial number. size: Show the disk capacity. vendor: Show the disk vendor. -lsblk: Show the disk size, vendor, model number, and serial number." +lsblk: Show the disk size, vendor, and model number." script=$(basename "$0") @@ -57,7 +56,7 @@ if [ "$1" = "-h" ] ; then fi if [ "$script" = "lsblk" ] ; then - list="size vendor model serial" + list="size vendor model" else list=$(echo "$script" | tr '[:upper:]' '[:lower:]') fi -- cgit v1.2.3