Subject: Re: [vserver] Mounting USB disk into vserver using LABELs
From: Juraj Pisarcik <juraj.pisarcik@f4s.sk>
Date: Tue, 18 May 2010 15:25:26 +0200

 Tue, 18 May 2010 15:25:26 +0200
I had made workaround by using symlinks to disk devices in /dev filesystem:

Directory /dev/disk/by-label/ contains useful symlinks for me!
So my vserver's fstab contains following lines:

/dev/disk/by-label/BACK1 /BACK1  ext3    auto  0       0
/dev/disk/by-label/BACK2 /BACK2  ext3    auto  0       0

If someone will need it, there are more /dev/disk/by-xxx directories:
  by-id
  by-label
  by-path
  by-uuid

Another big positive is, that I have new a kernel on server. :)

Thanks

Juraj

On Mon, May 17, 2010 at 4:13 PM, Herbert Poetzl <herbert@13thfloor.at> wrote:
> On Wed, May 12, 2010 at 09:25:54AM +0200, Juraj Pisarcik wrote:
>> Hi!
>
>> I'm trying to mount USB disk into vserver using LABELs.
>> In host OS it works, but not in vserver.
>> I'm using Debian lenny.
>
>> Thanks for help
>
>> Juraj
>
>> host:/# uname -a
>> Linux vserver 2.6.26-2-vserver-686-bigmem #1 SMP Tue Mar 9 19:46:38
>> UTC 2010 i686 GNU/Linux
>
> known broken kernel, don't use it ...
>
>> host:/# cat /etc/vservers/vserver1/bcapabilities
>> CAP SYS ADMIN
>
> dangerous, guest can easily take over the host
> (not required either)
>
>> host:/etc/vservers# vserver vserver1 start
>> secure-mount: mount(): No such file or directory
>> /etc/vservers/vserver1/fstab:5:1: failed to mount fstab-entry
>> secure-mount: mount(): No such file or directory
>> /etc/vservers/vserver1/fstab:6:1: failed to mount fstab-entry
>> Starting enhanced syslogd: rsyslogd.
>> Starting MTA: exim4.
>
> what is the util-vserver version?
>
>> host:/etc/vservers# vserver vserver1 enter
>
>> vserver:/# df
>> Filesystem           1K-blocks      Used Available Use% Mounted on
>> /dev/hdv1             45087388  37436704   7650684  84% /
>> df: `/proc/bus/usb': No such file or directory
>
> expected, as the /proc/bus is hidden by default
>
>> vserver1:/# cat /etc/vservers/vserver1/fstab
>> none    /proc           proc    defaults                0 0
>> #none   /tmp            tmpfs   size=16m,mode=1777      0 0
>> none    /dev/pts        devpts  gid=5,mode=620          0 0
>> #need for USB devices access:
>> usbfs   /proc/bus/usb   usbfs   rw,nosuid,nodev,noexec  0 0
>> LABEL=BACK1 /BACK1  ext3    auto  0       0
>> LABEL=BACK2 /BACK2  ext3    auto  0       0
>



-- 
S pozdravom

Juraj Pisarčík
Factory4Solutions