From 14afe3ff7c385ef0d6f65fe05aa05de980fb82bb Mon Sep 17 00:00:00 2001 From: ianmdlvl Date: Wed, 6 Apr 2005 19:04:18 +0000 Subject: [PATCH] @@ -1,3 +1,11 @@ +chiark-utils (4.0.99.0.15) unstable; urgency=low + + * /etc/chiark-backup/snap/lvm (backup/lvm in the source tree) now + limits the snapshot size to 1.1x the original lv size (rounded down, + ish), as lvcreate has this as an undocumented restriction. + + -- + chiark-utils (4.0.99.0.14) unstable; urgency=low * /etc/chiark-backup/snap/lvm (backup/lvm in the source tree) now uses --- backup/examples/chiark/settings.sh | 2 +- backup/lvm | 7 +++++++ debian/changelog | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/backup/examples/chiark/settings.sh b/backup/examples/chiark/settings.sh index 9544a2d..e7ac2dc 100755 --- a/backup/examples/chiark/settings.sh +++ b/backup/examples/chiark/settings.sh @@ -1,7 +1,7 @@ # shell script fragment setting options # defaults for currently implemented parameters are #lvm_lv=chiark_backup -#lvm_lvsize_opts=-l +#lvm_lvsize_opts=-l #lvm_lvtools_opts='-A n' #lvm_lvcreate_opts= #lvm_lvcreate_args= diff --git a/backup/lvm b/backup/lvm index 4d897e7..5389e7b 100755 --- a/backup/lvm +++ b/backup/lvm @@ -67,6 +67,13 @@ if [ -z "$lvm_lvsize_opts" ]; then vggroup="${vggroup%/*}" vgdisplay_out="$(really vgdisplay -c "$vggroup")" extents="$(printf "%s" "$vgdisplay_out" | awk -F: '{print $16}')" + + lvdisplay_out="$(really lvdisplay -c "$device")" + extents2="$(printf "%s" "$lvdisplay_out" | awk -F: '{print $9}')" + extents2=$(( $extents2 + ($extents2+9)/10 - 1 )) + + if [ $extents2 -lt $extents ]; then extents=$extents2; fi + lvm_lvsize_opts="-l $extents" fi diff --git a/debian/changelog b/debian/changelog index d837f92..af48e58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +chiark-utils (4.0.99.0.15) unstable; urgency=low + + * /etc/chiark-backup/snap/lvm (backup/lvm in the source tree) now + limits the snapshot size to 1.1x the original lv size (rounded down, + ish), as lvcreate has this as an undocumented restriction. + + -- + chiark-utils (4.0.99.0.14) unstable; urgency=low * /etc/chiark-backup/snap/lvm (backup/lvm in the source tree) now uses -- 2.30.2