On Fri, Dec 18, 2009 at 12:33:37PM +0530, Tanuj Bansal wrote:
> I have one domU using the disk file tanuj.dsk
>
> [root@tanuj-xen-new virtual]# cat /etc/xen/tanuj
> name = "tanuj"
> uuid = "3d9ab75d-e08f-bac9-b56c-1cd6a43d1e35"
> maxmem = 300
> memory = 300
> vcpus = 4
> bootloader = "/usr/bin/pygrub"
> >
> >
> >
> vfb = [ ]
> disk = [ "tap:aio:/virtual/tanuj.dsk,xvda,w", "phy:/dev/sda11,xvdb,w" ]
> vif = [ "mac=00:16:3e:32:e9:5f,bridge=xenbr0" ]
> [root@tanuj-xen-new virtual]#
>
> and this domU has disk /dev/xvda1 mounted at /boot
>
> [root@tanuj ~]# df -h /boot
> Filesystem Size Used Avail Use% Mounted on
> /dev/xvda1 99M 13M 81M 14% /boot
> [root@tanuj ~]#
>
> now I am trying to attach that /dev/xvda1 on my dom0
>
> # xm block-attach 0 tanuj.dsk /dev/xvda1 w 0
>
> Now I can see the attached device in xm list --long
>
<snip>
>
> But I am not able to locate that disk /dev/xvda1 on my dom0 and how can i
> mount it even if my domU is down
>
> I know that the /dev/xvda1 data can be taken by using losetup and kpartx
> but need to know about this
>
Why do you need this? just use kpartx (no need for losetup), it's much
easier and it works.
-- Pasi