[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lxc-users
Subject:    [lxc-users] hot plug usb storage
From:       Ivan Sergio Borgonovo <mail () webthatworks ! it>
Date:       2017-01-25 16:28:31
Message-ID: 0328e29e-bb50-dff4-dcf7-147692a152cf () webthatworks ! it
[Download RAW message or body]

I'd like to backup some file inside a container on a usb hot plugged drive.

While I can:

lxc.aa_profile = lxc-container-default-with-mounting
lxc.cgroup.devices.allow = b 8:* rwm

+

lxc-device --name [NAME] add /dev/[PARTITION]

and then

mount /dev/[PARTITION] /mnt/somewhere
umount /mnt/somewhere

But there is no
lxc-device remove

and I can't recycle device names in the guest.

eg.
Once I issue

lxc-device --name [NAME] add /dev/sdc1 /dev/sdc1

there is no way to

lxc-device --name [NAME] add /dev/sdd1 /dev/sdc1

I get no error but /dev/sdc1 in the guest is still pointing to sdc1 in 
the host.

Furthermore, no matter if the usb is plugged or not the /dev entry in 
the guest is permanent and I don't know how to check if there is a real 
device behind it.

thanks

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it http://www.borgonovo.net

_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic