Peter Braun
2009-Jan-30 22:05 UTC
[Xen-users] pygrub CentOS domU - unable to mount lvm partition form dom0 -
Hi, am using Xen 3.3.1 ontop of Debian etch x64. Most of the domU are custom made or downloaded from jailtime.org. Am using custom 2.6.18 kernel and slowly migrating to PV-OPS kernel - 2.6.26 and higher. Specially for CentOs installation am using network install via xen image and than domU boot via pygrub with original RH/CentOS xenified kernel. Everything runs fine but suddenly yesterday I have realized something that really annoys me. Am using lvm based partitions for all domU. For xenified an pv-ops kernels there is no problem mounting the lvm domU partition from dom0. But when trying pygrub CentOS installed domU - it goes wrong: mount /dev/vg/centospy /mn/lvm/ mount: you must specify the filesystem type mount -t ext3 /dev/vg/centospy /mn/lvm/ mount: wrong fs type, bad option, bad superblock on /dev/vg/x1hd, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so in dmesg: VFS: Can''t find ext3 filesystem on dev dm-0. fdisk -l /dev/vg/x1hd Disk /dev/vg/centospy: 32.2 GB, 32212254720 bytes 255 heads, 63 sectors/track, 3916 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/vg/centospy * 1 3916 31455238+ 83 Linux During the CentOS install annaconda is reporting something like "loop partition" detected and have to reinitialize disk. Please can somene help me out how to mount this partition from dom0? Br Peter _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jan-30 22:25 UTC
Re: [Xen-users] pygrub CentOS domU - unable to mount lvm partition form dom0 -
On Sat, Jan 31, 2009 at 5:05 AM, Peter Braun <xenware@gmail.com> wrote:> Device Boot Start End Blocks Id System > /dev/vg/centospy * 1 3916 31455238+ 83 LinuxShouldn''t it be /dev/vg/centospy1 ? I''m getting the feeling you''re trying to anonymize LV name and change it on the output line but forgot to do the same on the command line (and vice-versa for the mount command)> During the CentOS install annaconda is reporting something like "loop > partition" detected and have to reinitialize disk.If you let anaconda reinitialize disk (and thus creating a new partition table), there will be a partition on top of that LVM, which fdisk SHOULD show by adding the the number "1" or "p1" to the LV name> Please can somene help me out how to mount this partition from dom0?Try using kpartx. Something like kpartx -av /dev/vg/centospy (or /dev/vg/x1hd, whatever your LV is) mount /dev/mapper/centospy1 or x1hd1 (or whatever new block device you see on /dev/mapper) unmount afterwards, and don''t forget to delete dev mappings with kpartx -dv Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Peter Braun
2009-Jan-30 22:45 UTC
Re: [Xen-users] pygrub CentOS domU - unable to mount lvm partition form dom0 -
2009/1/30 Fajar A. Nugraha <fajar@fajar.net>:> On Sat, Jan 31, 2009 at 5:05 AM, Peter Braun <xenware@gmail.com> wrote: >> Device Boot Start End Blocks Id System >> /dev/vg/centospy * 1 3916 31455238+ 83 Linux > > Shouldn''t it be /dev/vg/centospy1 ? > I''m getting the feeling you''re trying to anonymize LV name and change > it on the output line but forgot to do the same on the command line > (and vice-versa for the mount command)mount /dev/vg/centospy1 /mnt/lvm mount: special device /dev/vg/centospy1 does not exist mount /dev/vg/centospy/1 /mnt/lvm mount: special device /dev/vg/centospy/1 does not exist (a path prefix is not a directory)> >> During the CentOS install annaconda is reporting something like "loop >> partition" detected and have to reinitialize disk. > > If you let anaconda reinitialize disk (and thus creating a new > partition table), there will be a partition on top of that LVM, which > fdisk SHOULD show by adding the the number "1" or "p1" to the LV name > >> Please can somene help me out how to mount this partition from dom0? > > Try using kpartx. Something like > kpartx -av /dev/vg/centospy (or /dev/vg/x1hd, whatever your LV is) > mount /dev/mapper/centospy1 or x1hd1 (or whatever new block device you > see on /dev/mapper) > unmount afterwards, and don''t forget to delete dev mappings with kpartx -dvUnfortunately kpartx is only for debian lenny or sid and I dont wannt to mess my dom0 :(> Regards, > > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jan-31 05:01 UTC
Re: [Xen-users] pygrub CentOS domU - unable to mount lvm partition form dom0 -
On Sat, Jan 31, 2009 at 5:45 AM, Peter Braun <xenware@gmail.com> wrote:> 2009/1/30 Fajar A. Nugraha <fajar@fajar.net>: >> On Sat, Jan 31, 2009 at 5:05 AM, Peter Braun <xenware@gmail.com> wrote: >>> Device Boot Start End Blocks Id System >>> /dev/vg/centospy * 1 3916 31455238+ 83 Linux >> >> Shouldn''t it be /dev/vg/centospy1 ? > > mount /dev/vg/centospy1 /mnt/lvm > mount: special device /dev/vg/centospy1 does not existWhat I meant was, shouldn''t the output of fdisk -l has "1" on it (e.g. centospy1 instead of cenotspy) ? If yes, then you need to create the device mappings first with kpartx, and THEN mount it (it will be on /dev/mapper, NOT /dev/vg)> Unfortunately kpartx is only for debian lenny or sid and I dont wannt > to mess my dom0 :(Then you''re out of luck. Well there''s a hard way to do it, actually. Something like mount -o offset=32256 /dev/vg/centospy /mnt/lvm To get the offset (in my example 32256), do "fdisk -lu" and multiply the starting sector (usually 63) with 512 Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users