27.01.2016 13:29, Stanislav Kinsburskiу пишет:

27 янв. 2016 г. 11:12 AM пользователь Evgenii Shatokhin 
<eshatok...@virtuozzo.com> написал:

Hi,

Is there a way to make a partition of a physical HDD, say, sdb1 directly
available to a container, bypassing ploop?


Hi,

There is a way of exposing a device to a container.
First of all, you'll need device node in /dev.
You can create it manually.

I created it with
vzctl set 101 --devnodes sdb1:rw --save

The node is now present in the CT. However, if I try to mount it in the CT (mount /dev/sdb1 /mnt), no error is reported but mount seems to have no effect. No files are seen in /mnt that are present on that partition.

So, I guess, additional steps are needed?

If you need sysfs layout for this, it's also possible (but a bit more tricky).
Please, note, that device access will be shared with the host. IOW, it's not 
bypassing, but sharing of a device and you can share it with as many virtual 
environments as you want.

That is OK. I just need to compare the behaviour of the CT when accessing the FS on a "real" partition and on a ploop device.


In my case, this is only needed to simplify debugging of some issues.

'prlctl --device-add hdd <...>' adds a ploop device anyway, it seems.

Regards,
Evgenii
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to