Hello everybody, new in the Country (coming from Switzerland) and new to Xen as well :) I tried to install the first CentOS 5.0 - XEN -LVM machine but struggle somehow. I followed the explanations of Paul, but CentOS 5 seems to have a problem with mounting the LVM after installation: http://lists.xensource.com/archives/html/xen-users/2007-07/msg00777.html When I create a new lv named centos5 and do a mke2fs /dev/vm-data/centos5 I can easily mount the "drive" with mount /dev/vm-data/centos5 /mnt/centos5. I unmounted centos5 then and started the virt-install. Said for path /dev/vm-data/centos5 and no graphics. Pretty soon the installer comes up with "/dev/xvda currently has a loop partition layout. To use this disk for the installation of CentOS, it must be re-initialized.." I allow this but create my own partitioning (one Ext3 partition mounted as / with full lv size). Right after this step, the lv is no longer mountable and when checking the "drive" says wrong superblock. Is there an issue with LVM on Centos5, or did I do something wrong? ....tried everythign for several hours now :/ [root@serv106 ~]# rpm -qa |grep lvm lvm2-2.02.16-3.el5 system-config-lvm-1.0.22-1.0.el5 I was also considering using file based domU''s but still not sure if they would give enough performance for a webhosting (LAMP) server. Any help, hint or even URL that leads to an actual working howto is greatly appreciated! Thank you so much and have a great day now! Robin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ok, I guess it has not really something to do with LVM, cause I just installed a (working!) Centos5 guest into a (also working) Centos5 dom0 as imagefile. When I try to mount the image I get: [root@serv106 ~]# mount -o loop /disk.img /mnt/loop/ mount: you must specify the filesystem type So, very similar to the error before (actually the same). What is wrong with my guest installation that those are booting fine, but are not mountable? Thanks for any help here, Robin IDAGroup - R.W.Muller wrote:> Hello everybody, new in the Country (coming from Switzerland) and new > to Xen as well :) > > I tried to install the first CentOS 5.0 - XEN -LVM machine but > struggle somehow. I followed > the explanations of Paul, but CentOS 5 seems to have a problem with > mounting the LVM after installation: > > http://lists.xensource.com/archives/html/xen-users/2007-07/msg00777.html > > When I create a new lv named centos5 and do a mke2fs /dev/vm-data/centos5 > I can easily mount the "drive" with mount /dev/vm-data/centos5 > /mnt/centos5. I unmounted centos5 then > and started the virt-install. Said for path /dev/vm-data/centos5 and > no graphics. Pretty soon the installer > comes up with "/dev/xvda currently has a loop partition layout. To > use this disk for the installation of CentOS, it must be re-initialized.." > I allow this but create my own partitioning (one Ext3 partition > mounted as / with full lv size). > Right after this step, the lv is no longer mountable and when checking > the "drive" says wrong superblock. > > Is there an issue with LVM on Centos5, or did I do something wrong? > ....tried everythign for several hours now :/ > > [root@serv106 ~]# rpm -qa |grep lvm > lvm2-2.02.16-3.el5 > system-config-lvm-1.0.22-1.0.el5 > > I was also considering using file based domU''s but still not sure if > they would give enough performance for a webhosting (LAMP) server. > > Any help, hint or even URL that leads to an actual working howto is > greatly appreciated! > > Thank you so much and have a great day now! > Robin > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi robin, your disk image is not a partition which can be mounted directly. Actually it holds the complete disk structure including the lvm. I also ran into the same problem and found no other solution than getting help from vmware. Take a look at this article: http://thalreit.dyndns.org/twiki/bin/view/UsingUNIX/RecoveryWithVmware#Mount_virtual_disk_image 1) you need to get the vmware-loop command which can be obtained by the free vmware server 2) you need a kernel which supports nbd (centos5 does) Cheers, Martin ________________________________________ Von: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] Im Auftrag von IDAGroup - R.W.Muller Gesendet: Donnerstag, 11. Oktober 2007 21:35 An: xen-users@lists.xensource.com Betreff: Re: [Xen-users] Xen with LVM Ok, I guess it has not really something to do with LVM, cause I just installed a (working!) Centos5 guest into a (also working) Centos5 dom0 as imagefile. When I try to mount the image I get: [root@serv106 ~]# mount -o loop /disk.img /mnt/loop/ mount: you must specify the filesystem type So, very similar to the error before (actually the same). What is wrong with my guest installation that those are booting fine, but are not mountable? Thanks for any help here, Robin IDAGroup - R.W.Muller wrote: Hello everybody, new in the Country (coming from Switzerland) and new to Xen as well :) I tried to install the first CentOS 5.0 - XEN -LVM machine but struggle somehow. I followed the explanations of Paul, but CentOS 5 seems to have a problem with mounting the LVM after installation: http://lists.xensource.com/archives/html/xen-users/2007-07/msg00777.html When I create a new lv named centos5 and do a mke2fs /dev/vm-data/centos5 I can easily mount the "drive" with mount /dev/vm-data/centos5 /mnt/centos5. I unmounted centos5 then and started the virt-install. Said for path /dev/vm-data/centos5 and no graphics. Pretty soon the installer comes up with "/dev/xvda currently has a loop partition layout. To use this disk for the installation of CentOS, it must be re-initialized.." I allow this but create my own partitioning (one Ext3 partition mounted as / with full lv size). Right after this step, the lv is no longer mountable and when checking the "drive" says wrong superblock. Is there an issue with LVM on Centos5, or did I do something wrong? ....tried everythign for several hours now :/ [root@serv106 ~]# rpm -qa |grep lvm lvm2-2.02.16-3.el5 system-config-lvm-1.0.22-1.0.el5 I was also considering using file based domU''s but still not sure if they would give enough performance for a webhosting (LAMP) server. Any help, hint or even URL that leads to an actual working howto is greatly appreciated! Thank you so much and have a great day now! Robin ________________________________________ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Quoting "IDAGroup - R.W.Muller" <robin@idagroup.us>:> Ok, I guess it has not really something to do with LVM, cause I just > installed a (working!) > Centos5 guest into a (also working) Centos5 dom0 as imagefile. When I > try to mount the image > I get: > > [root@serv106 ~]# mount -o loop /disk.img /mnt/loop/ > mount: you must specify the filesystem type > > So, very similar to the error before (actually the same). What is wrong > with my guest installation > that those are booting fine, but are not mountable? > > Thanks for any help here, > Robin >This is because you are attempting to mount the entire disk. use sfdisk -l -uS /disk.img to determine what sector the partition you wish to mount starts at. then mount it with the offset option. For example: server30:/etc/xen/vm # ls /dev/xendata/ volume0 volume1 volume2 volume3 server30:/etc/xen/vm # sfdisk -l -uS /dev/xendata/volume3 Disk /dev/xendata/volume3: 0 cylinders, 0 heads, 0 sectors/track Warning: The partition table looks like it was made for C/H/S=*/255/63 (instead of 0/0/0). For this listing I''ll assume that geometry. Units = sectors of 512 bytes, counting from 0 Device Boot Start End #sectors Id System /dev/xendata/volume3p1 * 63 20964824 20964762 7 HPFS/NTFS /dev/xendata/volume3p2 20964825 125821079 104856255 7 HPFS/NTFS start: (c,h,s) expected (1023,254,63) found (1023,0,1) /dev/xendata/volume3p3 0 - 0 0 Empty /dev/xendata/volume3p4 0 - 0 0 Empty server30:/etc/xen/vm # mount -o loop,ro,offset=$(( 512*63 )) /dev/xendata/volume3 /mnt/windows/ server30:/etc/xen/vm # ls /mnt/windows AUTOEXEC.BAT Inetpub System Volume Information pagefile.sys CFusionMX7 MSDOS.SYS WINDOWS qpmd8378.bin CONFIG.SYS NTDETECT.COM boot.ini Documents and Settings Program Files msizap.exe IO.SYS RECYCLER ntldr If you image contains a LVM partition, then it becomes a bit more complicated. Use losetup with the offset option to loop your image/partition Use pvscan to scan the loopback device Use vgchange -ay to activate the volumes Mount the volumes. Let me know if that answers your question.. -Errol ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hello Errol, I tried that and get a little weird partition table: sfdisk -l -uS /dev/vms/centos5_data Disk /dev/vms/centos5_data: 0 cylinders, 0 heads, 0 sectors/track Warning: The partition table looks like it was made for C/H/S=*/255/63 (instead of 0/0/0). For this listing I''ll assume that geometry. Units = sectors of 512 bytes, counting from 0 Device Boot Start End #sectors Id System /dev/vms/centos5_data1 * 63 3068414 3068352 83 Linux /dev/vms/centos5_data2 0 - 0 0 Empty /dev/vms/centos5_data3 0 - 0 0 Empty /dev/vms/centos5_data4 0 - 0 0 Empty But other then that, it works like a charm: [root@serv106 mnt]# mount -o loop,ro,offset=$(( 512*63 )) /dev/vms/centos5_data /mnt/centos/ [root@serv106 mnt]# ls -al /mnt/centos/ total 184 drwxr-xr-x 21 root root 4096 Oct 11 21:20 . drwxr-xr-x 3 root root 4096 Oct 11 21:21 .. drwxr-xr-x 2 root root 4096 Oct 11 21:08 bin drwxr-xr-x 3 root root 4096 Oct 11 21:06 boot drwxr-xr-x 2 root root 4096 Oct 11 20:59 dev drwxr-xr-x 70 root root 4096 Oct 11 21:20 etc -rw-r--r-- 1 root root 0 Oct 11 21:20 halt drwxr-xr-x 2 root root 4096 Mar 29 2007 home drwxr-xr-x 14 root root 4096 Oct 11 21:08 lib drwx------ 2 root root 16384 Oct 11 20:59 lost+found drwxr-xr-x 2 root root 4096 Oct 11 21:15 media drwxr-xr-x 2 root root 4096 Mar 29 2007 mnt drwxr-xr-x 2 root root 4096 Mar 29 2007 opt drwxr-xr-x 2 root root 4096 Oct 11 20:59 proc drwxr-x--- 2 root root 4096 Oct 11 21:20 root drwxr-xr-x 2 root root 12288 Oct 11 21:07 sbin drwxr-xr-x 2 root root 4096 Oct 11 20:59 selinux drwxr-xr-x 2 root root 4096 Mar 29 2007 srv drwxr-xr-x 2 root root 4096 Oct 11 20:59 sys drwxrwxrwt 3 root root 4096 Oct 11 21:14 tmp drwxr-xr-x 13 root root 4096 Oct 11 21:04 usr drwxr-xr-x 19 root root 4096 Oct 11 21:07 var [root@serv106 mnt]# Now I just have to find out, how I can get ride of the Empty partitions and how to use snapshot for backup and I''m getting closer to a usable result :) Thank you very much Errol! Robin Errol Neal wrote:> Quoting "IDAGroup - R.W.Muller" <robin@idagroup.us>: > >> Ok, I guess it has not really something to do with LVM, cause I just >> installed a (working!) >> Centos5 guest into a (also working) Centos5 dom0 as imagefile. When I >> try to mount the image >> I get: >> >> [root@serv106 ~]# mount -o loop /disk.img /mnt/loop/ >> mount: you must specify the filesystem type >> >> So, very similar to the error before (actually the same). What is wrong >> with my guest installation >> that those are booting fine, but are not mountable? >> >> Thanks for any help here, >> Robin >> > > This is because you are attempting to mount the entire disk. > use sfdisk -l -uS /disk.img to determine what sector the partition you > wish to mount starts at. then mount it with the offset option. For > example: > > server30:/etc/xen/vm # ls /dev/xendata/ > volume0 volume1 volume2 volume3 > server30:/etc/xen/vm # sfdisk -l -uS /dev/xendata/volume3 > > Disk /dev/xendata/volume3: 0 cylinders, 0 heads, 0 sectors/track > Warning: The partition table looks like it was made > for C/H/S=*/255/63 (instead of 0/0/0). > For this listing I''ll assume that geometry. > Units = sectors of 512 bytes, counting from 0 > > Device Boot Start End #sectors Id System > /dev/xendata/volume3p1 * 63 20964824 20964762 7 HPFS/NTFS > /dev/xendata/volume3p2 20964825 125821079 104856255 7 HPFS/NTFS > start: (c,h,s) expected (1023,254,63) found (1023,0,1) > /dev/xendata/volume3p3 0 - 0 0 Empty > /dev/xendata/volume3p4 0 - 0 0 Empty > server30:/etc/xen/vm # mount -o loop,ro,offset=$(( 512*63 )) > /dev/xendata/volume3 /mnt/windows/ > server30:/etc/xen/vm # ls /mnt/windows > AUTOEXEC.BAT Inetpub System Volume Information > pagefile.sys > CFusionMX7 MSDOS.SYS WINDOWS > qpmd8378.bin > CONFIG.SYS NTDETECT.COM boot.ini > Documents and Settings Program Files msizap.exe > IO.SYS RECYCLER ntldr > > If you image contains a LVM partition, then it becomes a bit more > complicated. > Use losetup with the offset option to loop your image/partition > Use pvscan to scan the loopback device > Use vgchange -ay to activate the volumes > Mount the volumes. > > Let me know if that answers your question.. > > -Errol > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Quoting "IDAGroup - R.W.Muller" <robin@idagroup.us>:> Hello Errol, I tried that and get a little weird partition table: > > sfdisk -l -uS /dev/vms/centos5_data > > Disk /dev/vms/centos5_data: 0 cylinders, 0 heads, 0 sectors/track > Warning: The partition table looks like it was made > for C/H/S=*/255/63 (instead of 0/0/0). > For this listing I''ll assume that geometry. > Units = sectors of 512 bytes, counting from 0 > > Device Boot Start End #sectors Id System > /dev/vms/centos5_data1 * 63 3068414 3068352 83 Linux > /dev/vms/centos5_data2 0 - 0 0 Empty > /dev/vms/centos5_data3 0 - 0 0 Empty > /dev/vms/centos5_data4 0 - 0 0 EmptyI wouldn''t worry too much about that. sfdisk is probably just confused. Since the file doesn''t have a ioctl, that would be my guess> > Now I just have to find out, how I can get ride of the Empty partitions > and how to use snapshot for backup and I''m getting closer > to a usable result :)lvcreate -L1G -n vmsnap /dev/vms/centos5_data Then mount it as above. Keep in mind that for snapshots, all changes to the live volume are written to the COW table on the snapshot volume. Make sure you allocate enough space for this. -Errol ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
The lomount tool - originally from qemu but also distributed with Xen - makes it more straightforward to mount partitions within an image file. It handles calculation of offsets etc for you. This is what I generally use to access partitions within a virtual disk. The other tool folks sometimes use is "kpartx", which I believe supports partitions using device mapper. In either case the end result is much the same: a friendlier way of accessing partitions within an image. Don''t worry about sfdisk grumbling at you, ISTR that''s normal. Hope this helps, Cheers, mark On Friday 12 October 2007, Errol Neal wrote:> Quoting "IDAGroup - R.W.Muller" <robin@idagroup.us>: > > Hello Errol, I tried that and get a little weird partition table: > > > > sfdisk -l -uS /dev/vms/centos5_data > > > > Disk /dev/vms/centos5_data: 0 cylinders, 0 heads, 0 sectors/track > > Warning: The partition table looks like it was made > > for C/H/S=*/255/63 (instead of 0/0/0). > > For this listing I''ll assume that geometry. > > Units = sectors of 512 bytes, counting from 0 > > > > Device Boot Start End #sectors Id System > > /dev/vms/centos5_data1 * 63 3068414 3068352 83 Linux > > /dev/vms/centos5_data2 0 - 0 0 Empty > > /dev/vms/centos5_data3 0 - 0 0 Empty > > /dev/vms/centos5_data4 0 - 0 0 Empty > > I wouldn''t worry too much about that. sfdisk is probably just > confused. Since the file doesn''t have a ioctl, that would be my guess > > > Now I just have to find out, how I can get ride of the Empty partitions > > and how to use snapshot for backup and I''m getting closer > > to a usable result :) > > lvcreate -L1G -n vmsnap /dev/vms/centos5_data > > Then mount it as above. Keep in mind that for snapshots, all changes > to the live volume are written to the COW table on the snapshot > volume. Make sure you allocate enough space for this. > > -Errol > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Errol Errol Neal wrote:> Quoting "IDAGroup - R.W.Muller" <robin@idagroup.us>: > >> Hello Errol, I tried that and get a little weird partition table: >> >> sfdisk -l -uS /dev/vms/centos5_data >> >> Disk /dev/vms/centos5_data: 0 cylinders, 0 heads, 0 sectors/track >> Warning: The partition table looks like it was made >> for C/H/S=*/255/63 (instead of 0/0/0). >> For this listing I''ll assume that geometry. >> Units = sectors of 512 bytes, counting from 0 >> >> Device Boot Start End #sectors Id System >> /dev/vms/centos5_data1 * 63 3068414 3068352 83 Linux >> /dev/vms/centos5_data2 0 - 0 0 Empty >> /dev/vms/centos5_data3 0 - 0 0 Empty >> /dev/vms/centos5_data4 0 - 0 0 Empty > > I wouldn''t worry too much about that. sfdisk is probably just > confused. Since the file doesn''t have a ioctl, that would be my guessOk I just ignore this partitions :)> >> >> Now I just have to find out, how I can get ride of the Empty partitions >> and how to use snapshot for backup and I''m getting closer >> to a usable result :) > > lvcreate -L1G -n vmsnap /dev/vms/centos5_data > > Then mount it as above. Keep in mind that for snapshots, all changes > to the live volume are written to the COW table on the snapshot > volume. Make sure you allocate enough space for this.Ok, that means I need at least douple the hardware space then the size of the LV, or I''m wrong with this? ....let''s say my LV centos5 is 80GB in size, will I need a 160GB harddrive in this blade server in order to get the snapshot and then mount and rsync it to another harddrive? ...or what do you recomment for backup purpose? Thanks, Robin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks Mark, I''m going to try that, but does lomount also work with LVM or just if I would use a image file? ..I figured that LV''s are the safer choice for a productive environment then image files, because tests showed me that the image file puts a lot more load on dom0 then the LV''s do. Thanks, Robin Mark Williamson wrote:> The lomount tool - originally from qemu but also distributed with Xen - makes > it more straightforward to mount partitions within an image file. It handles > calculation of offsets etc for you. This is what I generally use to access > partitions within a virtual disk. > > The other tool folks sometimes use is "kpartx", which I believe supports > partitions using device mapper. > > In either case the end result is much the same: a friendlier way of accessing > partitions within an image. > > Don''t worry about sfdisk grumbling at you, ISTR that''s normal. > > Hope this helps, > > Cheers, > mark > > On Friday 12 October 2007, Errol Neal wrote: > >> Quoting "IDAGroup - R.W.Muller" <robin@idagroup.us>: >> >>> Hello Errol, I tried that and get a little weird partition table: >>> >>> sfdisk -l -uS /dev/vms/centos5_data >>> >>> Disk /dev/vms/centos5_data: 0 cylinders, 0 heads, 0 sectors/track >>> Warning: The partition table looks like it was made >>> for C/H/S=*/255/63 (instead of 0/0/0). >>> For this listing I''ll assume that geometry. >>> Units = sectors of 512 bytes, counting from 0 >>> >>> Device Boot Start End #sectors Id System >>> /dev/vms/centos5_data1 * 63 3068414 3068352 83 Linux >>> /dev/vms/centos5_data2 0 - 0 0 Empty >>> /dev/vms/centos5_data3 0 - 0 0 Empty >>> /dev/vms/centos5_data4 0 - 0 0 Empty >>> >> I wouldn''t worry too much about that. sfdisk is probably just >> confused. Since the file doesn''t have a ioctl, that would be my guess >> >> >>> Now I just have to find out, how I can get ride of the Empty partitions >>> and how to use snapshot for backup and I''m getting closer >>> to a usable result :) >>> >> lvcreate -L1G -n vmsnap /dev/vms/centos5_data >> >> Then mount it as above. Keep in mind that for snapshots, all changes >> to the live volume are written to the COW table on the snapshot >> volume. Make sure you allocate enough space for this. >> >> -Errol >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users >> > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
IDAGroup - R.W.Muller wrote:> Hi Errol > > Errol Neal wrote: >> Quoting "IDAGroup - R.W.Muller" <robin@idagroup.us>: >> >>> Hello Errol, I tried that and get a little weird partition table: >>> >>> sfdisk -l -uS /dev/vms/centos5_data >>> >>> Disk /dev/vms/centos5_data: 0 cylinders, 0 heads, 0 sectors/track >>> Warning: The partition table looks like it was made >>> for C/H/S=*/255/63 (instead of 0/0/0). >>> For this listing I''ll assume that geometry. >>> Units = sectors of 512 bytes, counting from 0 >>> >>> Device Boot Start End #sectors Id System >>> /dev/vms/centos5_data1 * 63 3068414 3068352 83 Linux >>> /dev/vms/centos5_data2 0 - 0 0 Empty >>> /dev/vms/centos5_data3 0 - 0 0 Empty >>> /dev/vms/centos5_data4 0 - 0 0 Empty >> >> I wouldn''t worry too much about that. sfdisk is probably just >> confused. Since the file doesn''t have a ioctl, that would be my guess > Ok I just ignore this partitions :) >> >>> >>> Now I just have to find out, how I can get ride of the Empty partitions >>> and how to use snapshot for backup and I''m getting closer >>> to a usable result :) >> >> lvcreate -L1G -n vmsnap /dev/vms/centos5_data >> >> Then mount it as above. Keep in mind that for snapshots, all changes >> to the live volume are written to the COW table on the snapshot >> volume. Make sure you allocate enough space for this. > Ok, that means I need at least douple the hardware space then the size > of the LV, or I''m wrong with this? > ....let''s say my LV centos5 is 80GB in size, will I need a 160GB > harddrive in this blade server in order to get the snapshot and then > mount and rsync it to another harddrive? ...or what do you recomment > for backup purpose? > > Thanks, > Robin >You don''t need to allocate the double size of your original LV. As Erol said, you have just to allocate enough space to contains all changes made (i.e. writing) on the original partition during the snapshot life. For example if a snapshot is created à 00:00 am and deleted at 03:00 am, and there''s no activity on the original LV, you don''t need that much space (just to contains syslog writing or things like this). But if there''s extensive usage of your original LV you need to allocate more. Writing 600MB (downloading, whatever, ...) of data in your original LV requires snapshots of at least 600MB. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Thanks Mark, I''m going to try that, but does lomount also work with LVM > or just if I would use a image file?I think it ought to work with anything.> ..I figured that LV''s are the safer choice for a productive environment > then image files, because tests showed me > that the image file puts a lot more load on dom0 then the LV''s do.Agreed. Cheers, Mark> Thanks, > Robin > > Mark Williamson wrote: > > The lomount tool - originally from qemu but also distributed with Xen - > > makes it more straightforward to mount partitions within an image file. > > It handles calculation of offsets etc for you. This is what I generally > > use to access partitions within a virtual disk. > > > > The other tool folks sometimes use is "kpartx", which I believe supports > > partitions using device mapper. > > > > In either case the end result is much the same: a friendlier way of > > accessing partitions within an image. > > > > Don''t worry about sfdisk grumbling at you, ISTR that''s normal. > > > > Hope this helps, > > > > Cheers, > > mark > > > > On Friday 12 October 2007, Errol Neal wrote: > >> Quoting "IDAGroup - R.W.Muller" <robin@idagroup.us>: > >>> Hello Errol, I tried that and get a little weird partition table: > >>> > >>> sfdisk -l -uS /dev/vms/centos5_data > >>> > >>> Disk /dev/vms/centos5_data: 0 cylinders, 0 heads, 0 sectors/track > >>> Warning: The partition table looks like it was made > >>> for C/H/S=*/255/63 (instead of 0/0/0). > >>> For this listing I''ll assume that geometry. > >>> Units = sectors of 512 bytes, counting from 0 > >>> > >>> Device Boot Start End #sectors Id System > >>> /dev/vms/centos5_data1 * 63 3068414 3068352 83 Linux > >>> /dev/vms/centos5_data2 0 - 0 0 Empty > >>> /dev/vms/centos5_data3 0 - 0 0 Empty > >>> /dev/vms/centos5_data4 0 - 0 0 Empty > >> > >> I wouldn''t worry too much about that. sfdisk is probably just > >> confused. Since the file doesn''t have a ioctl, that would be my guess > >> > >>> Now I just have to find out, how I can get ride of the Empty partitions > >>> and how to use snapshot for backup and I''m getting closer > >>> to a usable result :) > >> > >> lvcreate -L1G -n vmsnap /dev/vms/centos5_data > >> > >> Then mount it as above. Keep in mind that for snapshots, all changes > >> to the live volume are written to the COW table on the snapshot > >> volume. Make sure you allocate enough space for this. > >> > >> -Errol > >> > >> ---------------------------------------------------------------- > >> This message was sent using IMP, the Internet Messaging Program. > >> > >> > >> > >> _______________________________________________ > >> Xen-users mailing list > >> Xen-users@lists.xensource.com > >> http://lists.xensource.com/xen-users-- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Quoting Mark Williamson <mark.williamson@cl.cam.ac.uk>:>> Thanks Mark, I''m going to try that, but does lomount also work with LVM >> or just if I would use a image file? > > I think it ought to work with anything. >Thanks Mark. I didn''t know about lomount. Works great! -Errol ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users