-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
automatically exclude btrfs snapshot subvolumes from 'btrfsmountedsub…
…vol' Related: #3175 (comment)
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -434,6 +434,7 @@ fi | |
# Output header only once: | ||
btrfsmountedsubvol_entry_exists="yes" | ||
echo "# All mounted btrfs subvolumes (including mounted btrfs default subvolumes and mounted btrfs snapshot subvolumes)." | ||
echo "Mounted btrfs snapshot subvolumes are autoexcluded. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lzaoral
Author
Contributor
|
||
if test "$findmnt_FSROOT_works" ; then | ||
echo "# Determined by the findmnt command that shows the mounted btrfs_subvolume_path." | ||
echo "# Format: btrfsmountedsubvol <device> <subvolume_mountpoint> <mount_options> <btrfs_subvolume_path>" | ||
|
@@ -469,7 +470,10 @@ fi | |
# Finally, test whether the btrfs subvolume listed as mounted actually exists. A running docker | ||
# daemon apparently can convince the system to list a non-existing btrfs volume as mounted. | ||
# See https://github.com/rear/rear/issues/1496 | ||
if btrfs_subvolume_exists "$subvolume_mountpoint" "$btrfs_subvolume_path"; then | ||
if btrfs_snapshot_subvolume_exists "$subvolume_mountpoint" "$btrfs_subvolume_path"; then | ||
# Exclude mounted snapshot subvolumes | ||
echo "#btrfsmountedsubvol $device $subvolume_mountpoint $mount_options $btrfs_subvolume_path" | ||
elif btrfs_subvolume_exists "$subvolume_mountpoint" "$btrfs_subvolume_path"; then | ||
echo "btrfsmountedsubvol $device $subvolume_mountpoint $mount_options $btrfs_subvolume_path" | ||
else | ||
LogPrintError "Ignoring non-existing btrfs subvolume listed as mounted: $subvolume_mountpoint" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here you must use
because here STDOUT gets written into disklayout.conf
because that code is within the
Yes - I know - that is horrible coding style
which needs to be cleaned up - at some time -
as time permits - i.e. "never in practice" :-(