Re: [Vserver] mount a NFS filesystem into a vserver
On Tue, Sep 13, 2005 at 09:49:42AM -0600, [EMAIL PROTECTED] wrote: > > > I am looking to mount a NFS filesystem into a vserver. I have searched > the archives, the site, and the web but can not find a straight answer > to this. What is the proper/preferred method of doing this? Does > anyone have the steps? depends on your setup/permissions ... if you have access to the host system, simply mount it there > I would like to mount a nfs filesystem from a non vserver (nfs server) > into a vserver (nfs client). inside, you have to use some kind of userspace nfs daemon as you do not have/get kernel support without proper permissions ... HTH, Herbert PS: I really appreciate the system description below! > Thanks > sig > > > -- > Linux-VServer Test [V0.13] Copyright (C) 2003-2005 H.Poetzl > chcontext is working. > chbind is working. > Linux 2.6.12.4-vs2.0 i686/0.30.208/0.30.208 [Ea] (0) > VCI: 0002:0001 273 0316 > --- > [000]# succeeded. > [001]# succeeded. > [011]# succeeded. > [031]# succeeded. > [101]# succeeded. > [102]# succeeded. > [201]# succeeded. > [202]# succeeded. > > > --- > Versions: >Kernel: 2.6.12.4-vs2.0 >VS-API: 0x00020001 > util-vserver: 0.30.208; Aug 24 2005, 21:26:20 > > Features: >CC: gcc, gcc (GCC) 3.4.3 (CRUX) > CXX: g++, g++ (GCC) 3.4.3 (CRUX) > CPPFLAGS: '' >CFLAGS: '-g -O2 -std=c99 -Wall -pedantic -W > -funit-at-a-time' > CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W > -fmessage-length=0 -funit-at-a-time' >build/host: i686-pc-linux-gnu/i686-pc-linux-gnu > Use dietlibc: yes >Build C++ programs: yes >Build C99 programs: yes >Available APIs: compat,v11,v13,fscompat,net,oldproc,olduts > ext2fs Source: e2fsprogs > syscall(2) invocation: alternative > vserver(2) syscall#: 273/glibc > > Paths: >prefix: /usr/local > sysconf-Directory: ${prefix}/etc > cfg-Directory: ${prefix}/etc/vservers > initrd-Directory: $(sysconfdir)/init.d >pkgstate-Directory: ${prefix}/var/run/vservers > Kernelheaders: /lib/modules/2.6.12.4-vs2.0/build/include > vserver-Rootdir: /vservers > > > Assumed 'SYSINFO' as no other option given; try '--help' for more information. > > ___ > Vserver mailing list > Vserver@list.linux-vserver.org > http://list.linux-vserver.org/mailman/listinfo/vserver ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] mount a NFS filesystem into a vserver
Le mar 13/09/2005 à 17:49, [EMAIL PROTECTED] a écrit : > I am looking to mount a NFS filesystem into a vserver. > I have searched the archives, the site, and the web but > can not find a straight answer to this. > What is the proper/preferred method of doing this? > Does anyone have the steps? > > I would like to mount a nfs filesystem from a non vserver (nfs server) into a > vserver (nfs client). Hi I remember having done from the root server: chbind --ip myvserverip --bcast myvserverbroadcast mount -t nfs mynfsserver:/myshare /vservers/myvserver/mnt/mymountpoint Nowwaydays you probably have to be in the right namespace so do at first: vnamespace -e myvserver /bin/bash Not tested recently. If all went well the nfs share shoud be visible inside the vserver. -- Marcel de Riedmatten signature.asc Description: Ceci est une partie de message numériquement signée. ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
RE: [Vserver] mount a NFS filesystem into a vserver
-Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 10:10 AM To: Magnuson, Sig Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] mount a NFS filesystem into a vserver On Tue, Sep 13, 2005 at 09:49:42AM -0600, [EMAIL PROTECTED] wrote: > > > I am looking to mount a NFS filesystem into a vserver. I have searched > the archives, the site, and the web but can not find a straight answer > to this. What is the proper/preferred method of doing this? Does > anyone have the steps? depends on your setup/permissions ... if you have access to the host system, simply mount it there I have tried this, I can mount the nfs filesystem but it is not viewable inside the vserver. Something else I need to do? On the host system df -k Filesystem 1K-blocks Used Available Use% Mounted on ... ... calnfs01:/nfs_oracle_u99 524272000 158032896 366239104 31% /vservers/unixdev1/mnt ls -la /vservers/unixdev1/mnt total 460911 drwxrwxrwx 6 201 201 160 Sep 8 16:11 . drwxr-xr-x 18 root root 4096 Sep 7 08:55 .. drwxr-xr-x 9 ops 2001 384 Sep 13 09:33 bashful-restore -rw-r--r-- 1 root root 471506944 Aug 18 11:00 failedlogin drwxr-xr-x 25 201 201 984 Sep 9 16:38 oracle drwxr-xr-x 3 201 20172 Sep 8 16:11 oradata On the guest system (unixdev1) df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/hdv1 60199660 8360668 48731624 15% / none 65536 0 65536 0% /tmp ls -la /mnt total 8 drwxr-xr-x 2 root root 4096 Sep 7 00:00 . drwxr-xr-x 18 root root 4096 Sep 7 08:55 .. sig ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] mount a NFS filesystem into a vserver
Tue, 2005-09-13 at 09:49 -0600, [EMAIL PROTECTED] wrote: > I am looking to mount a NFS filesystem into a vserver. I have > searched the archives, the site, and the web but can not find a > straight answer to this. > What is the proper/preferred method of doing this? > Does anyone have the steps? > > I would like to mount a nfs filesystem from a non vserver (nfs server) > into a vserver (nfs client). You should be able to put the mount entry in /etc/vservers/XXX/fstab, and it will be mounted at the appropriate time on vserver startup. The alternative is to turn on "secure mounts", whereby the vserver can do mount operations, with certain restrictions. I haven't needed to use this myself. Sam. ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
RE: [Vserver] mount a NFS filesystem into a vserver
Sam, That worked like a charm. I was thinking that is was going to be more complicated than that. For anyone interested here are my steps On NFS server (non vserver) --- added vserver host/root system ip address to nfs shares ie: sudo vi /etc/exports /nfs_unix_data vserverhost.corporate.net(rw,sync,insecure,no_root_squash) sudo exportfs sudo exportfs -r (to reread your config changes) sudo exportfs On vserver host/root system --- start portmap start rpc.statd sudo vi /usr/local/etc/vservers/unixdev1/fstab calnfs01.corporate.net:/nfs_unix_data /unix_data nfs hard,intr,nolock 0 0 sudo vserver unixdev1 stop sudo vserver unixdev1 start sudo vserver unixdev1 enter df -h FilesystemSize Used Avail Use% Mounted on /dev/hdv1 58G 8.0G 47G 15% / none 64M 0 64M 0% /tmp calnfs01.corporate.net:/nfs_unix_data 100G 406M 100G 1% /unix_data I wasn't able to find any other process that worked. The above will work fine for what I need. On a minor note: Anyone know how to umount this now that it is mounted? I am ok with restarting the vserver if that is the only way. ssh unixdev1 sudo umount /unix_data umount: /unix_data: must be superuser to umount umount: /unix_data: must be superuser to umount thanks sig -Original Message- From: Sam Vilain [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 6:38 PM To: Magnuson, Sig Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] mount a NFS filesystem into a vserver Tue, 2005-09-13 at 09:49 -0600, [EMAIL PROTECTED] wrote: > I am looking to mount a NFS filesystem into a vserver. I have > searched the archives, the site, and the web but can not find a > straight answer to this. > What is the proper/preferred method of doing this? > Does anyone have the steps? > > I would like to mount a nfs filesystem from a non vserver (nfs server) > into a vserver (nfs client). You should be able to put the mount entry in /etc/vservers/XXX/fstab, and it will be mounted at the appropriate time on vserver startup. The alternative is to turn on "secure mounts", whereby the vserver can do mount operations, with certain restrictions. I haven't needed to use this myself. Sam. ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
RE: [Vserver] mount a NFS filesystem into a vserver
Sam, That worked like a charm. I was thinking that is was going to be more complicated than that. For anyone interested here are my steps On NFS server (non vserver) --- added vserver host/root system ip address to nfs shares ie: sudo vi /etc/exports /nfs_unix_data vserverhost.corporate.net(rw,sync,insecure,no_root_squash) sudo exportfs sudo exportfs -r (to reread your config changes) sudo exportfs On vserver host/root system --- start portmap start rpc.statd sudo vi /usr/local/etc/vservers/unixdev1/fstab calnfs01.corporate.net:/nfs_unix_data /unix_data nfs hard,intr,nolock 0 0 sudo vserver unixdev1 stop sudo vserver unixdev1 start sudo vserver unixdev1 enter df -h FilesystemSize Used Avail Use% Mounted on /dev/hdv1 58G 8.0G 47G 15% / none 64M 0 64M 0% /tmp calnfs01.corporate.net:/nfs_unix_data 100G 406M 100G 1% /unix_data I wasn't able to find any other process that worked. The above will work fine for what I need. On a minor note: Anyone know how to umount this now that it is mounted? I am ok with restarting the vserver if that is the only way. ssh unixdev1 sudo umount /unix_data umount: /unix_data: must be superuser to umount umount: /unix_data: must be superuser to umount thanks sig -Original Message- From: Sam Vilain [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 6:38 PM To: Magnuson, Sig Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] mount a NFS filesystem into a vserver Tue, 2005-09-13 at 09:49 -0600, [EMAIL PROTECTED] wrote: > I am looking to mount a NFS filesystem into a vserver. I have > searched the archives, the site, and the web but can not find a > straight answer to this. > What is the proper/preferred method of doing this? > Does anyone have the steps? > > I would like to mount a nfs filesystem from a non vserver (nfs server) > into a vserver (nfs client). You should be able to put the mount entry in /etc/vservers/XXX/fstab, and it will be mounted at the appropriate time on vserver startup. The alternative is to turn on "secure mounts", whereby the vserver can do mount operations, with certain restrictions. I haven't needed to use this myself. Sam. ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver