[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-users] Mounting Xen LVM Guests
- To: "Eredicator X" <eredicatorx@xxxxxxxxxxxxxxx>
- From: "Mark Walkom" <markwalkom@xxxxxxxxx>
- Date: Wed, 7 Jan 2009 18:49:40 +1100
- Cc: xen-users@xxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 06 Jan 2009 23:50:39 -0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=LsGGie8WxUzRnHJpCt/ghLakMppcplsvA6CXzjG3b3WOkqrSqQ8hXfv7Z072pD66ED Ls1MZI4tisqicDteojPOKTek6/VM2bO4DitGHHspo+5ii709Ccc4qlrQF/yqwcMI4DND gdoKwgkEmh0VFUHqf1l7uI5E/fqIcisU72q5Q=
- List-id: Xen user discussion <xen-users.lists.xensource.com>
All you need to do is;
- Have a mount point, eg /mnt/tmp
- mount /dev/xen-system/test01.max /mnt/tmp
That is really all that is needed. You may need to specify the filesystem, but mount will complain if it needs it.
eg; root@newnewyork:/mnt/tmp# lvscan|grep utils ACTIVE '/dev/vm-storage/utils-disk' [5.00 GB] inherit ACTIVE '/dev/vm-storage/utils-swap' [512.00 MB] inherit root@newnewyork:/tmp# mount /dev/vm-storage/utils-disk /mnt/tmp/
root@newnewyork:/tmp# cd /mnt/tmp/ root@newnewyork:/mnt/tmp# ls -l total 88 drwxr-xr-x 2 root root 4096 2008-07-17 18:17 bin drwxr-xr-x 2 root root 4096 2006-10-29 00:07 boot drwxr-xr-x 4 root root 4096 2008-07-17 18:09 dev
drwxr-xr-x 48 root root 4096 2008-12-26 13:07 etc drwxr-xr-x 3 root root 4096 2008-07-17 18:14 home drwxr-xr-x 2 root root 4096 2008-06-14 19:19 initrd drwxr-xr-x 9 root root 4096 2008-07-17 21:27 lib lrwxrwxrwx 1 root root 4 2008-07-17 18:11 lib64 -> /lib
drwx------ 2 root root 16384 2008-06-14 19:15 lost+found drwxr-xr-x 2 root root 4096 2008-06-14 19:19 media drwxr-xr-x 2 root root 4096 2006-10-29 00:07 mnt drwxr-xr-x 2 root root 4096 2008-06-14 19:19 opt
drwxr-xr-x 2 root root 4096 2006-10-29 00:07 proc drwxr-xr-x 2 root root 4096 2008-09-13 14:25 root drwxr-xr-x 2 root root 4096 2008-07-17 18:11 sbin drwxr-xr-x 2 root root 4096 2008-06-14 19:19 srv drwxr-xr-x 2 root root 4096 2008-01-21 20:33 sys
drwxrwxrwt 2 root root 4096 2008-09-13 14:26 tmp drwxr-xr-x 10 root root 4096 2008-07-17 18:11 usr drwxr-xr-x 14 root root 4096 2008-07-17 18:21 var
2009/1/7 Eredicator X <eredicatorx@xxxxxxxxxxxxxxx>
I want to be able to mount LVM partitions that are xen guests when shut down of course.
The reason I can't is cause I am not doing it right. :( I just do not know where I am going wrong.
I start by creating the logical volume
#lvcreate --size 10g --name test01.max /dev/xen-system
#Logical volume "test01.max" created
Install to the new logical volume
#root@max02:/home/virt# virt-install
#Would you like a fully virtualized guest (yes or no)? This will allow you to run unmodified operating systems. yes
#What is the name of your virtual machine? test01.max
#How much RAM should be allocated (in megabytes)? 1000
#What would you like to use as the disk (file path)? /dev/xen-system/test01.max
#Would you like to enable graphics support? (yes or no) yes
#What is the virtual CD image, CD device or install location? /export/home0/erin/ISO/CentOS-5.2-x86_64-netinstall.iso
Finish install
#Guest installation complete... restarting guest.
Shut down new guest
#root@max02:/etc/xen# xm shutdown test01.max
Then try to mount the lvm I found a number of tutorials on how to do this like this;
http://linuxwave.blogspot.com/2008/02/accessing-data-on-xen-lvm-guest-image.html
I tried to stick with the manual from Red Hat and that did not work either;
http://www.centos.org/docs/5/html/Virtualization-en-US/ch-virt-accessing-data.html despite the 2 typos.
#root@max02:~# cd /dev/xen-system/
#root@max02:/dev/xen-system# ls -l
#total 0
#lrwxrwxrwx 1 root root 34 Jan 7 15:25 test01.max -> /dev/mapper/xen--system-test01.max
#
#root@max02:/dev/xen-system# fdisk -lu test01.max
#
#Disk test01.max: 10.7 GB, 10737418240 bytes
#255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors
#Units = sectors of 1 * 512 = 512 bytes
#
# Device Boot Start End Blocks Id System
#test01.max1 * 63 208844 104391 83 Linux
#test01.max2 208845 20964824 10377990 8e Linux LVM
#root@max02:/dev/xen-system# vgscan
# Reading all physical volumes. This may take a while...
# Found volume group "xen-system" using metadata type lvm2
# Found volume group "VolGroup00" using metadata type lvm2
#root@max02:/dev/xen-system# vgchange -ay xen-system
# 6 logical volume(s) in volume group "xen-system" now active
#root@max02:/dev/xen-system# lvs
# LV VG Attr LSize Origin Snap% Move Log Copy% Convert
# LogVol00 VolGroup00 -wi-ao 929.47G
# LogVol01 VolGroup00 -wi-ao 1.94G
# test01.max xen-system -wi-a- 10.00G
This is the part I do not understand what am I supposed to be mounting ....
I think the first one should work. But I did not create a file system on /dev/xen-system/test01.max I just installed to it.
I have tried creating a ext3 file system under and then installing to that but was still not able to mount the instance. (Which makes sense to me at least.)
#root@max02:/dev/xen-system# mount /dev/xen-system/test01.max /mnt
#mount: you must specify the filesystem type
#root@max02:/dev/xen-system# mount -t ext3 /dev/xen-system/test01.max /mnt
#mount: wrong fs type, bad option, bad superblock on /dev/xen-system/test01.max,
# missing codepage or other error
# In some cases useful info is found in syslog - try
# dmesg | tail or so
#root@max02:/dev/xen-system# dmesg | tail
#device vif1.0 entered promiscuous mode
#ADDRCONF(NETDEV_UP): vif1.0: link is not ready
#tun: Universal TUN/TAP device driver, 1.6
#tun: (C) 1999-2004 Max Krasnyansky <maxk@xxxxxxxxxxxx>
#device tap0 entered promiscuous mode
#xenbr0: topology change detected, propagating
#xenbr0: port 4(tap0) entering forwarding state
#tap0: no IPv6 routers present
#hfs: unable to find HFS+ superblock
#VFS: Can't find ext3 filesystem on dev dm-7.
I am sure I am missing something basic here. Can some one please enlighten me?
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|