From: ianmdlvl Date: Sun, 30 Jul 2006 14:06:03 +0000 (+0000) Subject: fixes from testing on chiark X-Git-Tag: debian_version_4_1_3~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=5facb39b231207d3dcea7b831bea73abd8a24bff;p=chiark-utils.git fixes from testing on chiark --- 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.