On 19/06/2015 11:10, Wolfgang Mader wrote:
Dear list,
please CC me on reply, since I am off-list.

I have a linux server on which a linux quest is running in a qemu virtual
machine. To the server, I attached an external hd enclosure (usb) of 8 disks.
4 of these disks form a btrfs raid which is already formated and full of data.
I am now searching for a way to connect the disks to the virtual machine.

I already found out, that I can mount the btrfs file system on the server and
export the mount point folders to the virtual machine. This approach, however,
seem to imply nasty problems with data permission. The files on the btrfs file
system do belong to different people, and I want to keep it that way. Since
qemu is running as a user process, I do not see how is is possible to get r/w
access to the data.

What I rather would like to archive is to wire the bare metal disks up to the
virtual machine and manage the btrfs filesystem on file-system level from
withing the virtual machine.  How can this be done?

Thanks for your help!
Simple really: Instruct qemu to provide the physical
disks as "raw disk images", by simply using their
device names on the host (e.g. /dev/sdk and /dev/sdm)
as the filenames of the disk images on the qemu
command line.  Then the guest OS will see those two
physical disks as physical disks with different names,
such as /dev/vdb and /dev/vdc or /dev/sdb and /dev/sdc
depending on the type of virtual hardware you specified
for them on the qemu command line.

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded

Reply via email to