FreeBSD Bugzilla – Attachment 204524 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]
Shell script to mount all filesystems in a zpool (the pool for / by default)
zfs-mountrpool (text/plain), 1.27 KB, created by
Peter Eriksson
on 2019-05-21 22:18:24 UTC
(
hide
)
Description:
Shell script to mount all filesystems in a zpool (the pool for / by default)
Filename:
MIME Type:
Creator:
Peter Eriksson
Created:
2019-05-21 22:18:24 UTC
Size:
1.27 KB
patch
obsolete
>#!/bin/ksh ># ># zfs-mountpool ># ># Make sure all other filesystems from the zroot (etc) pool is mounted ># ># Author: Peter Eriksson <peter.x.eriksson@liu.se> ># > >PATH=/sbin:/usr/sbin:/bin:/usr/bin >export PATH > >VERBOSE=no >DRYRUN=no > >MORE=yes >while [ $MORE = yes ]; do > case "$1" in > -h|--help) > echo "Usage: $0 [-h|--help] [-v|--verbose] [-n|--dryrun] <POOL-1> [.. <POOL-2>]" > exit 0 > ;; > -v|--verbose) > VERBOSE=yes > ;; > -n|--dryrun) > DRYRUN=yes > ;; > -*) > echo "$0: Error: $1: Invalid switch" >&2 > exit 1 > ;; > *) > MORE=no > ;; > esac > if [ $MORE = yes ]; then > shift > fi >done > >POOLS="" >if [ "$1" = "" ]; then > POOLS="`df -T / | awk '($2 == \"zfs\" && $7 == \"/\") { print $1 }' | awk -F/ '{print $1}'`" >else > POOLS="$*" >fi > >FLAGS="" >if [ $VERBOSE = yes ]; then > FLAGS="-v" >fi > >for POOL in $POOLS; do > zfs list -Hr -o name,mounted,canmount,mountpoint "$POOL" | while read FS MOUNTED CANMOUNT DIR; do > if [ "$CANMOUNT" = "on" -a "$DIR" != "none" ]; then > if [ $VERBOSE = yes ]; then > printf '%-30s %-30s mounted=%-6s\n' "$FS" "$DIR" "$MOUNTED" > fi > if [ "$MOUNTED" = "no" ]; then > if [ $DRYRUN = yes ]; then > echo zfs mount $FLAGS "$FS" > else > zfs mount $FLAGS "$FS" || exit $? > fi > fi > fi > done >done > >exit 0
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 Raw
Actions:
View
Attachments on
bug 237517
:
204479
|
204484
|
204504
| 204524 |
204525
|
204788
|
205830
|
205857