Skip to content
Permalink
Browse files

add zfs-volume.target, rename some files

  • Loading branch information...
pzakha committed Jul 10, 2019
1 parent 663bba6 commit 3947f2be8209b482156a4425e3f76b0d718a1942
@@ -5,4 +5,4 @@ if USING_PYTHON
SUBDIRS += arcstat arc_summary dbufstat
endif

SUBDIRS += mount_zfs zed zvol_id zfs_volume_wait
SUBDIRS += mount_zfs zed zvol_id zvol_wait

This file was deleted.

@@ -0,0 +1 @@
dist_bin_SCRIPTS = zvol_wait
@@ -10,7 +10,7 @@ count_zvols() {

filter_out_zvols_with_links() {
while read -r zvol; do
if [ ! -e "/dev/$zvol" ]; then
if [ ! -L "/dev/zvol/$zvol" ]; then
echo "$zvol"
fi
done
@@ -123,7 +123,7 @@ AC_CONFIG_FILES([
cmd/zed/zed.d/Makefile
cmd/raidz_test/Makefile
cmd/zgenhostid/Makefile
cmd/zfs_volume_wait/Makefile
cmd/zvol_wait/Makefile
contrib/Makefile
contrib/bash_completion.d/Makefile
contrib/dracut/Makefile
@@ -5,5 +5,5 @@ enable zfs-import.target
enable zfs-mount.service
enable zfs-share.service
enable zfs-zed.service
enable zfs-volume.service
enable zfs-volume-wait.service
enable zfs.target
@@ -7,8 +7,9 @@ systemdunit_DATA = \
zfs-import-scan.service \
zfs-mount.service \
zfs-share.service \
zfs-volume.service \
zfs-volume-wait.service \
zfs-import.target \
zfs-volume.target \
zfs.target

EXTRA_DIST = \
@@ -18,7 +19,8 @@ EXTRA_DIST = \
$(top_srcdir)/etc/systemd/system/zfs-mount.service.in \
$(top_srcdir)/etc/systemd/system/zfs-share.service.in \
$(top_srcdir)/etc/systemd/system/zfs-import.target.in \
$(top_srcdir)/etc/systemd/system/zfs-volume.service.in \
$(top_srcdir)/etc/systemd/system/zfs-volume-wait.service.in \
$(top_srcdir)/etc/systemd/system/zfs-volume.target.in \
$(top_srcdir)/etc/systemd/system/zfs.target.in \
$(top_srcdir)/etc/systemd/system/50-zfs.preset.in

@@ -7,7 +7,7 @@ After=zfs-import.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=@bindir@/zfs_volume_wait
ExecStart=@bindir@/zvol_wait

[Install]
WantedBy=zfs.target
WantedBy=zfs-volume.target
@@ -0,0 +1,8 @@
[Unit]
Description=ZFS volumes are ready
After=zfs-volume-wait.service
Requires=zfs-volume-wait.service

# Note that we do not have an [Install] section for now to prevent this target
# from being started automatically. Services that are interested in this
# target should add Wants=zfs-volume.target.
@@ -1,4 +1,4 @@
dist_man_MANS = zhack.1 ztest.1 raidz_test.1 zfs_volume_wait.1
dist_man_MANS = zhack.1 ztest.1 raidz_test.1 zvol_wait.1
EXTRA_DIST = cstyle.1

install-data-local:
@@ -1,8 +1,8 @@
.Dd July 5, 2019
.Dt ZFS_VOLUME_WAIT 1 SMM
.Dt ZVOL_WAIT 1 SMM
.Os Linux
.Sh NAME
.Nm zfs_volume_wait
.Nm zvol_wait
.Nd Wait for ZFS volume links in
.Em /dev
to be created.
@@ -12,7 +12,9 @@ to be created.
When a ZFS pool is imported, ZFS will register each ZFS volume
(zvol) as a disk device with the system. As the disks are registered,
.Xr \fBudev 7\fR
will asynchronously create symlinks under /dev using the zvol's name.
will asynchronously create symlinks under
.Em /dev/zvol
using the zvol's name.
.Nm
will wait for all those symlinks to be created before returning.
.Sh SEE ALSO
@@ -321,7 +321,7 @@ image which is ZFS aware.

%if 0%{?_systemd}
%define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --with-systemdmodulesloaddir=%{_modulesloaddir} --with-systemdgeneratordir=%{_systemdgeneratordir} --disable-sysvinit
%define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume.service
%define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume-wait.service zfs-volume.target
%else
%define systemd --enable-sysvinit --disable-systemd
%endif
@@ -418,6 +418,7 @@ systemctl --system daemon-reload >/dev/null || true
%{_sbindir}/*
%{_bindir}/raidz_test
%{_bindir}/zgenhostid
%{_bindir}/zvol_wait
# Optional Python 2/3 scripts
%{_bindir}/arc_summary
%{_bindir}/arcstat

0 comments on commit 3947f2b

Please sign in to comment.
You can’t perform that action at this time.