mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 02:20:59 +03:00
099700d9df
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 <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes #6121 Closes #6153
112 lines
1.9 KiB
Makefile
112 lines
1.9 KiB
Makefile
include $(top_srcdir)/config/Rules.am
|
|
|
|
DEFAULT_INCLUDES += \
|
|
-I$(top_srcdir)/include \
|
|
-I$(top_srcdir)/lib/libspl/include
|
|
|
|
sbin_PROGRAMS = zpool
|
|
|
|
zpool_SOURCES = \
|
|
zpool_iter.c \
|
|
zpool_main.c \
|
|
zpool_util.c \
|
|
zpool_util.h \
|
|
zpool_vdev.c
|
|
|
|
zpool_LDADD = \
|
|
$(top_builddir)/lib/libnvpair/libnvpair.la \
|
|
$(top_builddir)/lib/libuutil/libuutil.la \
|
|
$(top_builddir)/lib/libzpool/libzpool.la \
|
|
$(top_builddir)/lib/libzfs/libzfs.la \
|
|
$(top_builddir)/lib/libzfs_core/libzfs_core.la \
|
|
-lm $(LIBBLKID)
|
|
|
|
zpoolconfdir = $(sysconfdir)/zfs/zpool.d
|
|
zpoolexecdir = $(libexecdir)/zfs/zpool.d
|
|
|
|
EXTRA_DIST = zpool.d/README
|
|
|
|
dist_zpoolexec_SCRIPTS = \
|
|
zpool.d/enc \
|
|
zpool.d/encdev \
|
|
zpool.d/fault_led \
|
|
zpool.d/iostat \
|
|
zpool.d/iostat-1s \
|
|
zpool.d/iostat-10s \
|
|
zpool.d/label \
|
|
zpool.d/locate_led \
|
|
zpool.d/lsblk \
|
|
zpool.d/media \
|
|
zpool.d/model \
|
|
zpool.d/serial \
|
|
zpool.d/ses \
|
|
zpool.d/size \
|
|
zpool.d/slaves \
|
|
zpool.d/slot \
|
|
zpool.d/smart \
|
|
zpool.d/smartx \
|
|
zpool.d/temp \
|
|
zpool.d/health \
|
|
zpool.d/r_proc \
|
|
zpool.d/w_proc \
|
|
zpool.d/r_ucor \
|
|
zpool.d/w_ucor \
|
|
zpool.d/nonmed \
|
|
zpool.d/defect \
|
|
zpool.d/hours_on \
|
|
zpool.d/realloc \
|
|
zpool.d/rep_ucor \
|
|
zpool.d/cmd_to \
|
|
zpool.d/pend_sec \
|
|
zpool.d/off_ucor \
|
|
zpool.d/ata_err \
|
|
zpool.d/pwr_cyc \
|
|
zpool.d/upath \
|
|
zpool.d/vendor
|
|
|
|
zpoolconfdefaults = \
|
|
enc \
|
|
encdev \
|
|
fault_led \
|
|
iostat \
|
|
iostat-1s \
|
|
iostat-10s \
|
|
label \
|
|
locate_led \
|
|
lsblk \
|
|
media \
|
|
model \
|
|
serial \
|
|
ses \
|
|
size \
|
|
slaves \
|
|
slot \
|
|
smart \
|
|
smartx \
|
|
temp \
|
|
health \
|
|
r_proc \
|
|
w_proc \
|
|
r_ucor \
|
|
w_ucor \
|
|
nonmed \
|
|
defect \
|
|
hours_on \
|
|
realloc \
|
|
rep_ucor \
|
|
cmd_to \
|
|
pend_sec \
|
|
off_ucor \
|
|
ata_err \
|
|
pwr_cyc \
|
|
upath \
|
|
vendor
|
|
|
|
install-data-hook:
|
|
$(MKDIR_P) "$(DESTDIR)$(zpoolconfdir)"
|
|
for f in $(zpoolconfdefaults); do \
|
|
test -f "$(DESTDIR)$(zpoolconfdir)/$${f}" -o \
|
|
-L "$(DESTDIR)$(zpoolconfdir)/$${f}" || \
|
|
ln -s "$(zpoolexecdir)/$${f}" "$(DESTDIR)$(zpoolconfdir)"; \
|
|
done
|