[Devel] [Q] Connecting a physical HDD/partition to a container
Stanislav Kinsburskiу
skinsbursky at odin.com
Wed Jan 27 05:29:16 PST 2016
27 янв. 2016 г. 14:24 пользователь Evgenii Shatokhin <eshatokhin at virtuozzo.com> написал:
>
> 27.01.2016 15:00, Stanislav Kinsburskiy пишет:
> >
> >
> > 27.01.2016 12:58, Evgenii Shatokhin пишет:
> >> 27.01.2016 13:29, Stanislav Kinsburskiу пишет:
> >>>
> >>> 27 янв. 2016 г. 11:12 AM пользователь Evgenii Shatokhin
> >>> <eshatokhin at 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?
> >>
> >
> > You might need sysfs layout.
> > Please, strace your mount call and send it as a reply (attached).
> >
>
> Here it is.
>
> As far as I can see in strace log, mount tries to open
> /sys/dev/block/8:17, indeed. This file is present on the host but not in
> the CT.
>
Expectable.
Then you have to expose sysfs for this device to the container.
Igor, could you advice, please?
> Regards,
> Evgenii
>
More information about the Devel
mailing list