On Tue, 2015-09-29 at 10:44 +0100, Ian Campbell wrote: > prepareguest has already assigned this so we should use it instead of > replicating (perhaps wrongly since target_guest_lv_name and > target_choose_vg can behave differently if multiple vgs are present).
This is wrong in practice because kpartx -a /dev/some-vg/some-device produces /dev/mapper/some--vg-some--device1 etc but not /dev/some-vg/some -device1. The right fix probably involves lv_dev_mapper($gho-{Vg}, "$gho->{Lv}3") instead. I'm in two minds about having guest_find_lv use lv_dev_mapper to populate $gho->{Lvdev} in the first place as an alternative fix though. > > Signed-off-by: Ian Campbell <ian.campb...@citrix.com> > Cc: Roger Pau Monné <roger....@citrix.com> > --- > ts-freebsd-install | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ts-freebsd-install b/ts-freebsd-install > index 98dad24..d1f4bd3 100755 > --- a/ts-freebsd-install > +++ b/ts-freebsd-install > @@ -49,7 +49,7 @@ sub prep () { > > target_put_guest_image($ho, $gho); > > - my $rootpartition_dev = target_guest_lv_name($ho, $gho->{Name}) . "- > -disk3"; > + my $root_part_nr = 3; > > target_cmd_root($ho, "umount $gho->{Lvdev} ||:"); > > @@ -64,7 +64,7 @@ sub prep () { > > kpartx -a $gho->{Lvdev} > mkdir -p $mnt > - mount -t ufs -o ufstype=ufs2,rw $rootpartition_dev $mnt > + mount -t ufs -o ufstype=ufs2,rw $gho->{Lvdev}${root_part_nr} > $mnt > END > > target_cmd_root($ho, <<END, 15); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel