FreeBSD Bugzilla – Attachment 204484 Details for
Bug 237517
ZFS parallel mounting sometimes misses mounting intermediate filesystems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Corrected patch for libexec/rc/rc.d/zfs making parallel mount optional
zfs.diff (text/plain), 1.91 KB, created by
Trond Endrestøl
on 2019-05-20 15:11:34 UTC
(
hide
)
Description:
Corrected patch for libexec/rc/rc.d/zfs making parallel mount optional
Filename:
MIME Type:
Creator:
Trond Endrestøl
Created:
2019-05-20 15:11:34 UTC
Size:
1.91 KB
patch
obsolete
>--- zfs.orig 2016-10-13 08:19:54.000000000 +0200 >+++ zfs 2019-05-20 17:07:59.991260000 +0200 >@@ -16,6 +16,20 @@ > stop_cmd="zfs_stop" > required_modules="zfs" > >+# >+# Add the following lines to /etc/rc.conf to enable ZFS ordered mount: >+# zfs_ordered_mount_enable (bool): Mount ZFS in order (or NO). >+# zfs_ordered_mount_zpoolname_egrep_filter (str): Optional egrep(1) pattern for filtering unwanted filesystems, one per zpool. >+# Filesystems having canmount=off will be excluded automatically. >+# >+# Example: >+# zfs_ordered_mount_enable="YES" >+# zfs_ordered_mount_zroot_egrep_filter="zroot\$|zroot/ROOT|zroot/do-not-destroy" >+# zfs_ordered_mount_zdata_egrep_filter="zdata\$|zdata/do-not-destroy" >+# >+ >+zfs_ordered_mount_enable=${zfs_ordered_mount_enable:-"NO"} >+ > zfs_start_jail() > { > if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then >@@ -25,11 +39,45 @@ > > zfs_start_main() > { >- zfs mount -va >+ if checkyesno zfs_ordered_mount_enable; then >+ local _zroot _zpool >+ >+ _zroot=`df -t zfs / | tail -1 | awk '{print $1}' | cut -d / -f 1` >+ >+ if [ -n "${_zroot}" ]; then >+ zfs_mount_pool ${_zroot} >+ fi >+ >+ for _zpool in `zpool list -Ho name`; do >+ if [ "${_zpool}" != "${_zroot}" ]; then >+ zfs_mount_pool ${_zpool} >+ fi >+ done >+ else >+ zfs mount -va >+ fi > zfs share -a > if [ ! -r /etc/zfs/exports ]; then > touch /etc/zfs/exports > fi >+} >+ >+zfs_mount_pool() >+{ >+ local _zpool _egrep_filter_name _egrep_filter _fs >+ _zpool=${1} >+ >+ _egrep_filter_name=zfs_ordered_mount_${_zpool}_egrep_filter >+ _egrep_filter=`eval echo \$\{${_egrep_filter_name}\}` >+ >+ if [ -n "${_egrep_filter}" ]; then >+ # Need to separate our ^off from the user's specification. >+ _egrep_filter="|${_egrep_filter}" >+ fi >+ >+ for _fs in `zfs list -Hro canmount,name -t filesystem ${_zpool} | egrep -ve "^off${_egrep_filter}" | awk '{print $2}'`; do >+ zfs mount -v ${_fs} >+ done > } > > zfs_start()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 237517
:
204479
|
204484
|
204504
|
204524
|
204525
|
204788
|
205830
|
205857