[Buildd-tools-devel] Bug#494481: schroot: Ordering of lvm-snapshot-options

Timothy G Abbott tabbott at MIT.EDU
Sat Aug 9 20:46:44 UTC 2008


Package: schroot
Version: 1.2.1-1
Severity: wishlist

The lvcreate command requires that the PhysicalVolumePath option be 
specified after the original logical volume path (primarily, I think, 
because it's not a getopt option).  Cursory testing (and normal getopt 
behavior) suggests that any of the other options can be specified in any 
order.  In /etc/schroot/setup.d/05lvm, the lvcreate command for snapshots 
is specified as

   lvcreate $VERBOSE $CHROOT_LVM_SNAPSHOT_OPTIONS --snapshot \
 		--name "$CHROOT_LVM_SNAPSHOT_NAME" "$CHROOT_DEVICE"

which places the lvm-snapshot-options from the chroot configuration before 
the chroot device, and thus prevents specifying a physical volume path.  I 
think just changing it (and the non-verbose case) to

   lvcreate $VERBOSE --snapshot --name "$CHROOT_LVM_SNAPSHOT_NAME" \
 		"$CHROOT_DEVICE" $CHROOT_LVM_SNAPSHOT_OPTIONS

would allow one to do everything one can do now, with the added benefit of 
being able to specify which physical volume the snapshot should be taken 
from.  This is a useful feature because LVM's write performance is 
supposedly substantially better if the snapshot is on a different physical 
volume than the original (as it involves fewer disk seeks).

 	-Tim Abbott





More information about the Buildd-tools-devel mailing list