Scenario: I create a domU in an LVM using virt-install (CentOS current). The installation goes as expected and all is well. I thought that I would be able to mount this file system like so: mount -o loop /dev/VolGroup00/vm_name /mnt/image ...yet I cannot, it tells me I have to provide the filesystem type. When I do (ext3), that fails telling me it can''t find a valid block device. Can someone point out what I have done wrong? thanks, -- ------------------------------------------------------------------------ Charles Farinella Appropriate Solutions, Inc. (www.AppropriateSolutions.com) cfarinella@AppropriateSolutions.com voice: 603.924.6079 fax: 603.924.8668 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Charlie Farinella wrote:> Scenario: > > I create a domU in an LVM using virt-install (CentOS current). The > installation goes as expected and all is well. > > I thought that I would be able to mount this file system like so: > > mount -o loop /dev/VolGroup00/vm_name /mnt/image > > ...yet I cannot, it tells me I have to provide the filesystem type. > When I do (ext3), that fails telling me it can''t find a valid block > device. > > Can someone point out what I have done wrong? >The virtual disk has a partition table -- use losetup and kpartx like this: losetup /dev/VolGroup00/vm_name kpartx -av /dev/loopN where /dev/loopN is the device created by losetup. I think that''s the right syntax -- check the manual pages for details. (And just in case you think it is, kpartx is nothing to do with X or KDE.) jch _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Charlie Farinella wrote:> Scenario: > > I create a domU in an LVM using virt-install (CentOS current). The > installation goes as expected and all is well. > > I thought that I would be able to mount this file system like so: > > mount -o loop /dev/VolGroup00/vm_name /mnt/image > > ...yet I cannot, it tells me I have to provide the filesystem type. > When I do (ext3), that fails telling me it can''t find a valid block > device. > > Can someone point out what I have done wrong?Why would you use the -o loop flag if you are using a LVM partition? I have no idea if this is the reason why it fails, but I know that you don''t need it. LVs are not files, they are plain devices. Thomas _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Monday 17 November 2008, Thomas Goirand wrote:> Charlie Farinella wrote: > > Scenario: > > > > I create a domU in an LVM using virt-install (CentOS current). The > > installation goes as expected and all is well. > > > > I thought that I would be able to mount this file system like so: > > > > mount -o loop /dev/VolGroup00/vm_name /mnt/image > > > > ...yet I cannot, it tells me I have to provide the filesystem type. > > When I do (ext3), that fails telling me it can''t find a valid block > > device. > > > > Can someone point out what I have done wrong? > > Why would you use the -o loop flag if you are using a LVM partition? I > have no idea if this is the reason why it fails, but I know that you > don''t need it. LVs are not files, they are plain devices. > > ThomasI''m kind of new to all of these and am sort of feeling my way. It seems I was putting a default CentOS install which contains a /boot partition and another LVM partition inside an LVM on the host. I don''t know if that''s good or bad, but for now I am installing all guests as a single root partition inside the host LVM and can mount them like so: lomount -t ext3 -diskimage /dev/VolGroup00/vg_name -partition 1 /mnt/image Thanks for the responses. --charlie -- ------------------------------------------------------------------------ Charles Farinella Appropriate Solutions, Inc. (www.AppropriateSolutions.com) cfarinella@AppropriateSolutions.com voice: 603.924.6079 fax: 603.924.8668 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users