A
A
alexdora2015-12-10 20:09:23
Xen
alexdora, 2015-12-10 20:09:23

Why is the additional disk not connected to DomU?

Everywhere Ubuntu 14.04

For each DomU created a 10Gb img on a central SSD drive, in the same place as Dom0

dd if=/dev/zero of=/vm/domU-disk.img bs=1024k count=10240

Everything is fine, DomU is all installed and everything is working. It was necessary to allocate additional space for one DomU, so I first decided to connect a folder on another HDD through the config.
disk=['file:/vm/domU-asterisk.img,xvda,w', phy:/dev/sdс,hda,w]

I tried various options for a fool: [/dev/sdc,hda, ], [/dev/sdc1,hda][/dev/sdc,hda1] and so on, including other screws.
DomU: fdisk -l 

Disk /dev/xvda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e0d7

    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1            2048    18874367     9436160   83  Linux
/dev/xvda2        18876414    20969471     1046529    5  Extended
/dev/xvda5        18876416    20969471     1046528   82  Linux swap / Solaris


xl block-list domU prints something is connected

[email protected]:/# xl block-list asterisk
Vdev  BE  handle state evt-ch ring-ref BE-path                       
51712 0   1      4     17     8        /local/domain/0/backend/qdisk/1/51712
768   0   1      5     22     879      /local/domain/0/backend/qdisk/1/768


I tried to connect not through the xl block-attach config, I tried to connect not the device, but the created image as during installation. Same song. domU doesn't want to see the drive.

I searched everything I could and couldn't find an answer. Config example:

name="asterisk"
vcpus=2
memory=1024
disk=['file:/vm/domU-asterisk.img,xvda,w', 'file:/mnt/mp/domU-disk100gb.img,xvda,w']
vif=['ip=172.16.0.2,script=vif-route']
vfb=['vnc=1']
#kernel="/var/lib/xen/images/asterisk/vmlinuz"
#ramdisk="/var/lib/xen/images/asterisk/initrd.gz"
extra="console=hvc0"
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'
bootloader="pygrub"


And here is what the machine itself writes after loading (768 - disk id via xl block-list)
[email protected]:~# dmesg | grep 768
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.004000] pid_max: default: 32768 minimum: 301
[   21.390512] vbd vbd-768: 16 xlvbd_add at /local/domain/0/backend/qdisk/4/768
[   21.390628] vbd vbd-768: failed to write error node for device/vbd/768 (16 xlvbd_add at /local/domain/0/backend/qdisk/4/768

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2015-12-11
@alexdora

And why do you take down the brain of the hypervisor? What are you doing:
xvda twice
xvda twice
In the second case, the red-haired brunette will understand what xvdb should be!

P
Puma Thailand, 2015-12-11
@opium

well, put a xen server if you don’t want to understand anything at all, mount the files twice into one disk and be surprised

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question