+chiark-utils (4.0.99.0.14) unstable; urgency=low
+
+ * /etc/chiark-backup/snap/lvm (backup/lvm in the source tree) now uses
+ the free extents on the vg as the default size for the snapshot. This
+ is somewhat better although still not ideal in some cases, obviously.
+
+ --
+
chiark-utils (4.0.99.0.13) unstable; urgency=low
* Fix usage message for cvs-repomove to be accurate.
# shell script fragment setting options
# defaults for currently implemented parameters are
#lvm_lv=chiark_backup
# shell script fragment setting options
# defaults for currently implemented parameters are
#lvm_lv=chiark_backup
-#lvm_lvsize_opts=-L <size of space currently used on fs>
+#lvm_lvsize_opts=-l <no. of free extents in vg>
#lvm_lvtools_opts='-A n'
#lvm_lvcreate_opts=
#lvm_lvcreate_args=
#lvm_lvtools_opts='-A n'
#lvm_lvcreate_opts=
#lvm_lvcreate_args=
# invoked by backup scripts as
# lvm snap $vardir $device $mountpoint
# creates and mounts on $vardir/snap-mount
# invoked by backup scripts as
# lvm snap $vardir $device $mountpoint
# creates and mounts on $vardir/snap-mount
"s,^$device on $mountpoint type \([a-z0-9][a-z0-9]*\) .*,-t \1 ,p")"
if [ -z "$lvm_lvsize_opts" ]; then
"s,^$device on $mountpoint type \([a-z0-9][a-z0-9]*\) .*,-t \1 ,p")"
if [ -z "$lvm_lvsize_opts" ]; then
- df="$(df -P -k $device)"
- blocks="$(printf "%s" "$df" | sed -n '2,$s,^/dev/[^ ]*[ ][ ]*[0-9][0-9]*[ ][ ]*\([0-9][0-9]*\)[ ].*,\1,p')"
- lvm_lvsize_opts="-L $blocks"K
+ vggroup="${device#/dev/}"
+ vggroup="${vggroup%/*}"
+ vgdisplay_out="$(really vgdisplay -c "$vggroup")"
+ extents="$(printf "%s" "$vgdisplay_out" | awk -F: '{print $16}')"
+ lvm_lvsize_opts="-l $extents"
fi
lvpath="$(dirname "$device")/$lvm_lv"
fi
lvpath="$(dirname "$device")/$lvm_lv"
+chiark-utils (4.0.99.0.14) unstable; urgency=low
+
+ * /etc/chiark-backup/snap/lvm (backup/lvm in the source tree) now uses
+ the free extents on the vg as the default size for the snapshot. This
+ is somewhat better although still not ideal in some cases, obviously.
+
+ --
+
chiark-utils (4.0.99.0.13) unstable; urgency=low
* Fix usage message for cvs-repomove to be accurate.
chiark-utils (4.0.99.0.13) unstable; urgency=low
* Fix usage message for cvs-repomove to be accurate.