summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2022-01-10 20:51:11 -0500
committerAndrew Cady <d@cryptonomic.net>2022-01-10 20:51:24 -0500
commitdb4130d7344e5aba9cc984165f19a2d62650fd71 (patch)
treec7f2c3da34e76130f573a33cda6558970bbdf304
parentd21fc297344f639362e89b9746f7570858b037ca (diff)
btrfs-shrink: call btrfs dev scan -u
to prevent btrfs errors about 'already mounted'
-rwxr-xr-xbtrfs-shrink1
1 files changed, 1 insertions, 0 deletions
diff --git a/btrfs-shrink b/btrfs-shrink
index 12f0e8e..26c1365 100755
--- a/btrfs-shrink
+++ b/btrfs-shrink
@@ -61,6 +61,7 @@ main()
61 truncate= 61 truncate=
62 mountpoint="$1".mnt.tmp 62 mountpoint="$1".mnt.tmp
63 mkdir -p "$mountpoint" 63 mkdir -p "$mountpoint"
64 btrfs dev scan -u
64 mount -t btrfs "$1" "$mountpoint" 65 mount -t btrfs "$1" "$mountpoint"
65 result=$? 66 result=$?
66 67