chiark / gitweb /
fixes from testing on chiark
authorianmdlvl <ianmdlvl>
Sun, 30 Jul 2006 14:06:03 +0000 (14:06 +0000)
committerianmdlvl <ianmdlvl>
Sun, 30 Jul 2006 14:06:03 +0000 (14:06 +0000)
backup/remountrocp
debian/changelog

index 65037ee0c3b423943183a32b927fd719605cfccf..04ddd270afff6e73356009a0b28561155543bead 100755 (executable)
@@ -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"
index ecbdf8313494a842a77013916a38c4123eb9666f..70ece9a2e04f4f9923cbfdf361a37e4200b86327 100644 (file)
@@ -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.