[Lxc-users] LXC and iSCSI mounting for the container
Serge Hallyn
serge.hallyn at ubuntu.com
Mon Oct 14 12:33:00 UTC 2013
Quoting Bill Anderson (bill.anderson at RACKSPACE.COM):
> First things first:
>
> * Wheezy
> * Open-icsi 2.0.873-3
> * Lxc 0.8.0~rc1-8+deb7u1
>
>
> I have containers deploying to LVM just fine, and I have iSCSI working just fine on the host. I am using a bridged network config and the systems in question can talk to each other. There are no port blockages via firewalls between the target and initiators.
>
> Inside the container, iscsiadmin scanning for targets just sits there until I Ctrl-C it. So I thought I'd use the config file to set an lxc.mount.entry= line to mount the iSCSI volume inside the container at boot time per the examples. I am using filesystem label to identify the mount target, which works fine in the host.
>
> I get no errors, yet the mount is not active. The contents of the iSCSI target's FS is not present in the defined mountpoint, nor doe sit show up as mounted anywhere.
>
> If anyone has some ideas not already listed above as tried and/or working config examples for LVM backed rootfs containers mounting an iSCSI target (to include gettign iSCSI to work from within the container) I would appreciate them sharing.
I haven't used it so don't know the detailed commands, but you should
be able to use iscsi over tcp, with a daemon running on the host.
iscsi over netlink will not work.
So per the manpage, something like
iscsiadm -m discoverydb -t st -p ${hostip}:port -I eth0 --discover
perhaps
iscsiadm -m discoverydb -t st -p 10.0.3.1:3260 -I eth0 --discover
should work.
-serge
More information about the lxc-users
mailing list