Re: [Lxc-users] usb devices

2010-08-03 Thread Nirmal Guhan
On Mon, Aug 2, 2010 at 6:07 PM, Toby Corkindale
toby.corkind...@strategicdata.com.au wrote:
 On 03/08/10 09:04, Nirmal Guhan wrote:
 Hi,

 Am running fedora 12 with 2.6.32.10-90.fc12.i686 kernel. Currently I
 use bind mount to access usb disks. For instance :

 /media /lxc/f12/usbdisk none bind 0 0

 udev mounts usb devices on /media. There are some issues with this approach :

 1) Since this is hard coded config, it has to be updated everytime the
 mount point (/media in this case) changes.
 2) If I unmount /media from the host, the container can still access
 the disk from /usbdisk i.e ls /usbdisk and other operations work
 within container but not /media from the host. How is this possible ?
 3)  By #2, I assume there is some sort of usb pass-through within
 container? Is this true ?

 No, it's not true. There is no special USB pass-thru to the container.

 By making a bind-mount, you are replicating part of the filesystem so
 that it is inside the bit of the filesystem that LXC is using.
 This is done at the filesystem level - not at the USB level.

 This explains why you can still access it after unmounting at the host
 level. You have effectively mounted it twice, so it needs to be
 unmounted from both locations too.

Ah! yes. Good catch.


 4) Hot swap does not work within the container. After usb device is
 reinserted, container cannot recognize it but host can.
 5) mount within the container  always displays just one single line
 while I have few more in fstab including the above /media stuff.
       none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

 Again, that's because of the way LXC works with the filesystem.

 Perhaps you could just bind-mount the whole /media directory into the
 guest containers, to their /media directory? That might work better for
 you, although still not quite what you want.

Thanks Toby. I doubt if this will address #1 and #4 above. Basically,
how to make hot swap work? Or what are the workaround to get
notifications if I have to manually mount/umount.



 -Toby

 --
 The Palm PDK Hot Apps Program offers developers who use the
 Plug-In Development Kit to bring their C/C++ apps to Palm for a share
 of $1 Million in cash or HP Products. Visit us here for more details:
 http://p.sf.net/sfu/dev2dev-palm
 ___
 Lxc-users mailing list
 Lxc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/lxc-users


--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] usb devices

2010-08-03 Thread Toby Corkindale
On 03/08/10 17:44, Nirmal Guhan wrote:
 On Mon, Aug 2, 2010 at 6:07 PM, Toby Corkindale
 toby.corkind...@strategicdata.com.au  wrote:
 On 03/08/10 09:04, Nirmal Guhan wrote:
 4) Hot swap does not work within the container. After usb device is
 reinserted, container cannot recognize it but host can.
 5) mount within the container  always displays just one single line
 while I have few more in fstab including the above /media stuff.
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

 Again, that's because of the way LXC works with the filesystem.

 Perhaps you could just bind-mount the whole /media directory into the
 guest containers, to their /media directory? That might work better for
 you, although still not quite what you want.

 Thanks Toby. I doubt if this will address #1 and #4 above. Basically,
 how to make hot swap work? Or what are the workaround to get
 notifications if I have to manually mount/umount.


I think you would need to adjust the devices permissions for your 
container, for the usb nodes.. but I'm not sure.. then the container 
could talk to the USB devices over USB, and handle the hotswapping.
However I'd expect conflicts to occur with the host trying to talk to 
the same device.
Try adding this to your config file?

lxc.cgroup.devices.allow = c 189:* rwm

I'm no expert and I haven't tried this myself, mind, so you might prefer 
to wait for someone more qualified to answer.

-Toby

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] LXC and iperf: Why the difference between flows?

2010-08-03 Thread Daniel Lezcano
On 08/03/2010 07:53 PM, Nirmal Guhan wrote:
 On Tue, Aug 3, 2010 at 10:24 AM, Osvaldo Filhoarquivos...@gmail.com  wrote:

 Why have this difference?

 Client on container
 [  3] local 192.168.6.10 port 58172 connected with 192.168.6.1 port 5001
 [ ID] Interval   Transfer Bandwidth
 [  3]  0.0-60.0 sec  13.3 GBytes  1.90 Gbits/sec

 Client  on Host
 [  3] local 192.168.6.1 port 46711 connected with 192.168.6.10 port 5001
 [ ID] Interval   Transfer Bandwidth
 [  3]  0.0-60.5 sec  1.79 MBytes248 Kbits/sec
  

Can you give a bit more informations please ?
eg. Is 192.168.1.1 another host on the network or the host running the 
container ?

 What is the TCP window size ? Can you share the iperf command as well
 ? I tried in Fedora 12 with 2.6.32.1090.fc12.i686 and seems to be ok.


Right, MTU size maybe one issue:

https://lists.linux-foundation.org/pipermail/containers/2009-March/016355.html

TSO and SG maybe another:

http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg00386.html

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] LTSp Server on LXC container.

2010-08-03 Thread Daniel Lezcano
On 08/03/2010 03:10 AM, Osvaldo Filho wrote:
 I want to jail users to a LTSP server.
 I thought it would be easy to LXC. But I'm having problems.
 - the ltsp-build-client - arch i386 does not end.

 r...@localhost:/opt# ltsp-build-client --arch i386
 ...
 I: Extracting upstart...
 I: Extracting util-linux...
 I: Extracting zlib1g...
 error: LTSP client installation ended abnormally


On my host a quick look to /opt/ltsp/debootstrap/debootstrap.log shows 
devices can not be created.

Before building the client again the command:

  lxc-cgroup -n ubuntu devices.allow a

makes the installation to go ahead (not yet finished on my host, still 
installing and downloading packages).



--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] LTSp Server on LXC container.

2010-08-03 Thread Daniel Lezcano
On 08/04/2010 12:16 AM, Daniel Lezcano wrote:
 On 08/03/2010 03:10 AM, Osvaldo Filho wrote:

 I want to jail users to a LTSP server.
 I thought it would be easy to LXC. But I'm having problems.
 - the ltsp-build-client - arch i386 does not end.

 r...@localhost:/opt# ltsp-build-client --arch i386
 ...
 I: Extracting upstart...
 I: Extracting util-linux...
 I: Extracting zlib1g...
 error: LTSP client installation ended abnormally

  
 On my host a quick look to /opt/ltsp/debootstrap/debootstrap.log shows
 devices can not be created.

 Before building the client again the command:

lxc-cgroup -n ubuntu devices.allow a

 makes the installation to go ahead (not yet finished on my host, still
 installing and downloading packages).


Gah ! I just got:


ERROR: Neither /var/log/messages nor /var/log/syslog exists.  Unable to log.
Updating /var/lib/tftpboot directories for chroot: /opt/ltsp/amd64
/usr/sbin/ltsp-update-kernels: 155: /sbin/restorecon: not found
error: LTSP client installation ended abnormally

I installed selinux and called:

ltsp-update-kernels again.

followed by:

ltsp-update-image

Seems to work I have a ltsp login splash screen now. Still have to log 
into ...

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users