Skip to contentSkip to conversation

What happen to blktap2 in Xen 4.1 ??

DISCUSSION Sarge I 2 participants 4 messages Apr 4, 2011 – Apr 5, 2011 1 message not in the archive

lore
Share & tools
lore

Sarge I

author
#0 lore raw

Good day.
Im having problems with xen 4.1 in blktap2 operation.
1) can`t attach vhd image with tapdisk2 –n vhd:/path/to/file , application respond with “usage: tapdisk2 <-u uuid> <-c control socket>”, in previous version it was “usage: tapdisk2 <-n file>”. Question is, how to attach image file in xen 4.1 , please ?

2) after stopping domU with tap2:vhd images, tapdisk2 processes remain in memory as well as devices in /sys/class/blktap2. On other hand, there are no longer possibility to list attached images in /sys/class/blktap2/devices:
sarge@kxen pts/2: cat /sys/class/blktap2/devices
0 €L©
1 €—˜4
2 €wøã
3 €÷9

instead of expected (from previous 4.0.1) :
0 vhd:/etc/xen/images/webserver.vhd
how to read currently attached disks please ?

best regards

Rene

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 6 lines · Sarge I

Good day.
Im having problems with xen 4.1 in blktap2 operation.
1) can`t attach vhd image with tapdisk2 –n vhd:/path/to/file , application respond with “usage: tapdisk2 <-u uuid> <-c control socket>”, in previous version it was “usage: tapdisk2 <-n file>”. Question is, how to attach image file in xen 4.1 , please ?

Never. Try tap-ctl -n <..>

Quoted 2 lines

2) after stopping domU with tap2:vhd images, tapdisk2 processes remain in memory as well as devices in /sys/class/blktap2.

Yeah, this is normal at least by xl right now. Normally the toolstacks are supposed to keep a refcount on the device usage, I don't think that presently happens.

Quoted 7 lines

On other hand, there are no longer possibility to list attached images in /sys/class/blktap2/devices:
sarge@kxen pts/2: cat /sys/class/blktap2/devices
0 €L©
1 €—˜4
2 €wøã
3 €÷9

Interesting. It's not used by xl or tap-ctl, actually it was just left around for backward compat with older toolstacks. That said, it should work nonetheless, and this looks broken indeed. I'll check it out.

Quoted 3 lines

instead of expected (from previous 4.0.1) :
0 vhd:/etc/xen/images/webserver.vhd
how to read currently attached disks please ?

There's a tap-ctl list command, which performs a scan through all spawned tapdisk processes and the set of allocated disk nodes, and which connects to which.

Daniel

A message that is not in the archive (sent off-list or not yet received): 1C3547AF02364BF5B82C814D86959A16@rw764

#3 lore raw
Quoted 7 lines · Sarge I
Quoted 7 lines

On other hand, there are no longer possibility to list attached images in /sys/class/blktap2/devices:
sarge@kxen pts/2: cat /sys/class/blktap2/devices
0 €L©
1 €—˜4
2 €wøã
3 €÷9

I seem not to easily repro the garbage. Can you give me a hint what kernel you're using and what state those nodes where in? If you didn't use tap-ctl, and tapdisk2 failed, how did those devicee nodes even get allocated?

Thanks,
Daniel

author
#4 lore raw

Hi, there are not problem to create domU with vhd disks, im using devices with tap2:vhd:/path/to/file.vhd in domU config files, using xl to create and manage domains, in this part everything is ok, just tapdisk2 remain in processes after domU shutdown with /sys/class/blktap2/ folders for each blktap device. Garbage in /sys/class/blktap2/devices show while domU is running and after shutdown. Just an little irritation. Problem is I cant mount disk image in dom0 (at last im not able to find documentation how to do it, because README in tools/blktap2/ is quite old and dont reflect current state ).
In past (4.0.2-rcX) im used to mount image with tapdisk -n <type:file> , then kpartx , mount nlk device and do a job, then list device from /sys/class/blktap2/devices and remove device with command "echo 1 > /sys/class/blktap2/blktapX/remove" . Is it a solution for mounting images in Dom0 using the blktap2 driver, please?

About my setup:
Im running weekly updated gentoo systems on recent intel i7 and xeon boxes, i need recent kernel for devices as well as usb passthrough, so I choose suse linux kernel from 11.4 branch, currently 2.6.37.6 (having very good experience with this tree, its stable, faster than linux-2.6.32-pvops.git), tested nearly all from 2.6.18-xen , 2.6.32-pvops (also other branches from jeremy`s git), previous suse xenified kernels 2.6.32 ,34.

-----Original Message----- From: Daniel Stodden
Sent: Tuesday, April 05, 2011 1:20 AM
To: Sarge I
Cc: [email protected]
Subject: Re: [Xen-devel] What happen to blktap2 in Xen 4.1 ??

Quoted 7 lines · Sarge I
Quoted 7 lines

On other hand, there are no longer possibility to list attached images in /sys/class/blktap2/devices:
sarge@kxen pts/2: cat /sys/class/blktap2/devices
0 €L©
1 €—˜4
2 €wøã
3 €÷9

I seem not to easily repro the garbage. Can you give me a hint what kernel you're using and what state those nodes where in? If you didn't use tap-ctl, and tapdisk2 failed, how did those devicee nodes even get allocated?

Thanks,
Daniel