*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" on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" 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* [root@tanuj-xen-new virtual]# xm list --long (domain (domid 0) (uuid 00000000-0000-0000-0000-000000000000) (vcpus 4) (cpu_weight 1.0) (memory 1594) (shadow_memory 0) (maxmem 1776) (features ) (name Domain-0) (on_poweroff destroy) (on_reboot restart) (on_crash restart) *(device (vbd (backend 0) (dev /dev/xvda1:disk) (mode w))*) (state r-----) (shutdown_reason poweroff) (cpu_time 509.951158471) (online_vcpus 4) ) (domain (domid 2) (uuid 3d9ab75d-e08f-bac9-b56c-1cd6a43d1e35) (vcpus 4) (cpu_weight 1.0) (memory 300) (shadow_memory 0) (maxmem 300) (bootloader /usr/bin/pygrub) (features ) (name tanuj) (on_poweroff destroy) (on_reboot restart) (on_crash restart) (image (linux (ramdisk /var/lib/xen/boot_ramdisk.X6ua5E) (kernel /var/lib/xen/boot_kernel.5FFIR6) (args ''ro root=/dev/VolGroup00/LogVol00 console=xvc0 rhgb quiet'') ) ) (device (vif (backend 0) (script vif-bridge) (bridge xenbr0) (mac 00:16:3e:32:e9:5f) ) ) (device (vbd (backend 0) (dev xvdb:disk) (uname phy:/dev/sda11) (mode w))) (device (tap (backend 0) (dev xvda:disk) (uname tap:aio:/virtual/tanuj.dsk) (mode w) ) ) (state -b----) (shutdown_reason poweroff) (cpu_time 29.647193284) (online_vcpus 4) (up_time 83.3499569893) (start_time 1261119399.57) (store_mfn 191144) (console_mfn 191143) ) [root@tanuj-xen-new virtual]# *and in block-list too* [root@tanuj-xen-new virtual]# xm block-list 0 --long (51713 ((backend-id 0) (virtual-device 51713) (device-type disk) (state 1) (backend /local/domain/0/backend/vbd/0/51713) ) ) [root@tanuj-xen-new virtual]# *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 *Regards, Tanuj _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
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" > on_poweroff = "destroy" > on_reboot = "restart" > on_crash = "restart" > 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 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yes, I know to use kpartx and it is easy but need to know this also...please let me know...where is attached device On Fri, Dec 18, 2009 at 12:47 PM, Pasi Kärkkäinen <pasik@iki.fi> wrote:> 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" > > on_poweroff = "destroy" > > on_reboot = "restart" > > on_crash = "restart" > > 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 > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Dec 18, 2009 at 12:50:24PM +0530, Tanuj Bansal wrote:> Yes, I know to use kpartx and it is easy but need to know this > also...please let me know...where is attached device >I have never seen anyone doing this, so I don''t know if it''s supported. -- Pasi> On Fri, Dec 18, 2009 at 12:47 PM, Pasi Kärkkäinen <[1]pasik@iki.fi> wrote: > > 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" > > on_poweroff = "destroy" > > on_reboot = "restart" > > on_crash = "restart" > > 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 > > References > > Visible links > 1. mailto:pasik@iki.fi_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tanuj, Have you been able to mount other partition images to dom0 with block-attach? What about mounting this partition image (or others) to domUs with block-attach? If you could, were they using the same kernel as dom0? I don''t have my notes on block-attach with me, and I have only used it on HVM domUs thus far, but those would be basic troubleshooting steps that might help you resolve this issue. I should think block-attach should work in dom0, but I don''t know this for a fact. I don''t even know whether you can attach anything to PV domUs (dom0 is PV) with block-attach, much less partitions (vs full disks). After re-reading your config, it looks like you are using a disk image, not a partition image. In that case, at the very least, your command should change to this: xm block-attach 0 tanuj.dsk /dev/xvda w 0 Dustin From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Tanuj Bansal Sent: Friday, December 18, 2009 02:20 To: Pasi Kärkkäinen Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] block-attach on dom0 missing Yes, I know to use kpartx and it is easy but need to know this also...please let me know...where is attached device On Fri, Dec 18, 2009 at 12:47 PM, Pasi Kärkkäinen <pasik@iki.fi> wrote: 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" > on_poweroff = "destroy" > on_reboot = "restart" > on_crash = "restart" > 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 cani> mount it even if my domU is down > > I know that the /dev/xvda1 data can be taken by using losetup andkpartx> 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 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users