[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] [Solved] look into VHD VDI from Control Domain in XCP 1.6


  • To: xen-api@xxxxxxxxxxxxx
  • From: Alexandre Kouznetsov <alk@xxxxxxxxxx>
  • Date: Wed, 09 Jan 2013 18:55:30 -0600
  • Delivery-date: Thu, 10 Jan 2013 00:55:46 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>

Hello.

I can confirm, I have successfully mounted partitions from my VHD VDI under Dom0. Thanks a lot!

El 08/01/13 12:07, George Shuklin escribiÃ:
Ok, here important stuff. When VBD is plugged to dom0, it plugging not
as 'normal' device (with udev attention), but as device in /dev/sm/backend.

Yes, that was important. Where have you learned that occult stuff?

Here sample log (change uuids on you taste):

xe vbd-create vm-uuid=53c3d878-b60b-48ec-aaac-73f7adf9ab3d
vdi-uuid=5e2c31a5-1d1b-4abe-9892-1fa3bc47b532 device=6
xe vbd-plug uuid=407eb3a6-919f-f605-0883-e12aaa91321d

ls -la /dev/sm/backend/55ea20d2-8611-1121-9e9e-c26b35ac1852/
ÐÑÐÐÐ 4
drwxr-xr-x 2 root root     80 ÐÐÐ  8 21:57 .
drwxr-xr-x 3 root root     60 ÐÐÐ 18 17:40 ..
brw------- 1 root root 253, 0 ÐÐÐ  8 21:57
5e2c31a5-1d1b-4abe-9892-1fa3bc47b532
-rw-r--r-- 1 root root    852 ÐÐÐ  8 21:57
5e2c31a5-1d1b-4abe-9892-1fa3bc47b532.attach_info
I have done the process as you described.
Got the same result as you, except that I don't have *.attach_info file, only the device file.

What is the relevance of device=6 under vbd-create command? Really did not knew what to put there, I have used device=autodetect, hope XCP is smart enough to clean up everything nicely after I unplug it.


I have no idea why '55' uuid (and what it means), but
5e2c31a5-1d1b-4abe-9892-1fa3bc47b532 is block device after whole VHD
tree joining/parsing and so on.
For reference, it seems like the new created device full path is:
/dev/sm/backend/<sr-uuid>/<vdi-uuid>
That "55..." must be your SR.


Reference (wide and confusing output, I know):

root@xcp47 ~]# xe vbd-create device=autodetect vm-uuid=ef5eedc4-cb8c-4d58-abf9-26179195ef62 vdi-uuid=fd118da1-c3dd-466b-8b27-32c5db1fcce7
# Returns VBD uuid: b30fdfcd-e846-0ed4-6e63-fd9871ac2a65
# no /dev/sm at all, yet

root@xcp47 ~]# xe vbd-plug uuid=b30fdfcd-e846-0ed4-6e63-fd9871ac2a65
# Now visible /dev/sm/backend/<sr-uuid>/<vdi-uuid>

root@xcp47 ~]# fdisk -l /dev/sm/backend/cfc7419f-8b4e-8c51-d619-dfdee09841a2/fd118da1-c3dd-466b-8b27-32c5db1fcce7 Disco /dev/sm/backend/cfc7419f-8b4e-8c51-d619-dfdee09841a2/fd118da1-c3dd-466b-8b27-32c5db1fcce7: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Unidades = cilindros de 16065 * 512 = 8225280 bytes


           Disposit. Inicio    Comienzo      Fin      Bloques  Id  Sistema
/dev/sm/backend/cfc7419f-8b4e-8c51-d619-dfdee09841a2/fd118da1-c3dd-466b-8b27-32 1 200 1606468+ 83 Linux /dev/sm/backend/cfc7419f-8b4e-8c51-d619-dfdee09841a2/fd118da1-c3dd-466b-8b27-32 201 391 1534207+ 83 Linux

root@xcp47 ~]# kpartx -a /dev/sm/backend/cfc7419f-8b4e-8c51-d619-dfdee09841a2/fd118da1-c3dd-466b-8b27-32c5db1fcce7 root@xcp47 ~]# mount /dev/mapper/fd118da1-c3dd-466b-8b27-32c5db1fcce7p1 /mnt/aa1 root@xcp47 ~]# mount /dev/mapper/fd118da1-c3dd-466b-8b27-32c5db1fcce7p1 /mnt/aa2
[root@xcp47 ~]# ls /mnt/aa1
lost+found  xvdb1_flag
[root@xcp47 ~]# ls /mnt/aa2
lost+found  xvdb2_flag


--
Alexandre Kouznetsov


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.