Skip to content

Commit

Permalink
mount.snapshot: mount old snapshots with ro snapshot overlay
Browse files Browse the repository at this point in the history
Signed-off-by: Amir Goldstein <[email protected]>
  • Loading branch information
amir73il committed Mar 27, 2017
1 parent 089b0cc commit b66b578
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/mount.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ mount_old_snapshots()
mount -i -t overlay "$dev@$id" "$snapmnt" \
-o"lowerdir=$lower,upperdir=$upper,workdir=$work,$snapmntopts" || exit 1

# Mount older snapshot overlays
mount_old_snapshots

# Mount the snapshot mount
mount -i -t snapshot "$dev@" "$mntdir" \
-o"upperdir=$lower,snapshot=$snapmnt,$mntopts" || exit 1

# Remount current snapshot overlay read-only
mount -o remount,ro "$snapmnt" || exit 1

# Mount older snapshot overlays
mount_old_snapshots

# freeze/thaw to activate new snapshot
freeze_thaw

0 comments on commit b66b578

Please sign in to comment.