[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST v2 3/8] ts-freebsd-install: Use $gho->{Lvdev} instead of target_guest_lv_name



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).

$gho->{Lvdev} has been adjusted to return /dev/mapper/vg-lv paths
which is required to be able to add partition numbers since kpartx
does not create the /dev/vg/lv form.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 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);
-- 
2.5.3


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.