From 5facb39b231207d3dcea7b831bea73abd8a24bff Mon Sep 17 00:00:00 2001 From: ianmdlvl Date: Sun, 30 Jul 2006 14:06:03 +0000 Subject: [PATCH] fixes from testing on chiark --- backup/remountrocp | 13 ++++++++----- debian/changelog | 10 ++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/backup/remountrocp b/backup/remountrocp index 65037ee..04ddd27 100755 --- a/backup/remountrocp +++ b/backup/remountrocp @@ -35,7 +35,7 @@ if [ -z "$lvm_lvsize_opts" ]; then df_out="$(really df -P --block-size=$extsize $mountpoint)" extents2="$(printf "%s" "$df_out" | awk '/^\// {print $3}')" - extents2=$(( ($extents2*150+99)/100 + 4 )) + extents2=$(( ($extents2*150+102399)/102400 + 4 )) lvmextentscore2 fi @@ -55,9 +55,11 @@ lvcreate \ $vgroup \ $lvm_lvcreate_args -mkfs -t $remountrocp_fs "$lvpath" +mkfs -t $remountrocp_fs -q "$lvpath" + mkdir -- "$snmnt" mount -t $remountrocp_fs $lvm_mount_opts "$lvpath" "$snmnt" +echo ' copy filesystem created and mounted' attempts=10 while true; do @@ -69,9 +71,10 @@ while true; do fi sleep 1 done - -trap "mount -o remount,rw $mountpoint; exit 12" 0 -cp -a -- "$mountpoint/." "$snmnt/." +trap "set +e; mount -o remount,rw $mountpoint; exit 12" 0 +echo ' source remounted readonly, copying...' +cp -ax -- "$mountpoint/." "$snmnt/." +echo ' finalising...' mount -o remount,rw "$mountpoint" trap '' 0 mount -o remount,ro "$lvpath" diff --git a/debian/changelog b/debian/changelog index ecbdf83..70ece9a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +chiark-utils (4.1.3) unstable; urgency=low + + backup snap remountrocp fixes: + * Size of snapshot volume properly calculated (now we divide by 1k + since df reports in bytes and vgdisplay in kbytes). + * Restrict copy to same file system (oops!). + * Nicer messages from remountrocp (-q to mkfs; various echoes). + + -- + chiark-utils (4.1.2) unstable; urgency=low * Translate /dev/mapper devices from mount table into LVM device names. -- 2.30.2