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
$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
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"
+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.