Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-05-2011, 02:07 AM
|
#1
|
Member
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798
Rep:
|
problem in exporting a partition on a usb stick as nfs volume
I have a USB disk which has 2 partitions.
It is the default behavior in the OS (Lucid 10.04 64 bit) that upon connecting a USB (be it thumb drive or hard disk) it will mount it in I have 2 patitions on the USB hard disk as follows
Quote:
ls -l /media
drwxrwxrwx 2 tkmsr tkmsr 2048 2010-02-12 04:12 HPLAUNCHER
drwx------ 7 tkmsr tkmsr 4096 1970-01-01 05:30 vol1
drwx------ 1 tkmsr tkmsr 20480 2011-01-03 17:43 vol2
|
I want to share vol2 on nfs
Here is the /etc/exports file entry on nfs server
Quote:
/media/vol2 192.168.1.0/24(rw,sync,no_subtree_check)
|
On the client machine I tried to mount the above nfs volume
Quote:
mount -t nfs 192.168.1.19:/media/vol2 /mnt/nfs
|
Things worked well upto here.
But I was not able to go inside the mounted volume at the client machine.
Hence I checked the permissions on the folder on nfs server they were as follows
Quote:
drwx------ 1 tkmsr tkmsr 20480 2011-01-03 17:43 vol2
|
and the share mounted on client machine which was above only had following permissions
Quote:
drwx------ 1 client_hostname client_hostname 20480 2011-01-03 17:43 vol2
|
Considering this to be source of problem I tried to change the permissions at the server
but this attempt failed.
Does any one has any clue as what might be the issue?
It appears to be some file system problem.
I checked by mount command the type of file system on USB disk
Quote:
/dev/sdb2 on /media/vol1 type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush)
/dev/sdb5 on /media/vol2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sr1 on /media/HPLAUNCHER type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500)
|
and the shows
Quote:
Jan 6 10:24:12 tkmsr ntfs-3g[2278]: Mounted /dev/sdb5 (Read-Write, label "vol2", NTFS 3.1)
Jan 6 10:24:12 tkmsr ntfs-3g[2278]: Cmdline options: rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,dmask=0077
Jan 6 10:24:12 tkmsr ntfs-3g[2278]: Mount options: rw,nosuid,nodev,uhelper=udisks,silent,allow_other,nonempty,relatime,fsname=/dev/sdb5,blkdev,blksize=4096,default_permissions
Jan 6 10:24:12 tkmsr ntfs-3g[2278]: Global ownership and permissions enforced, configuration type 1
|
Where I see ntfs-3g driver in use for the above volume which I want to export on nfs.Can this be the source of my problems? Or I need to check some thing else?
I notice the output of mount command
Quote:
/dev/sdb5 on /media/vol2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
|
Is there a way I can enforce to load changed permissions on the said USB and change this default behavior.
This seems to be the only cause of problem to me.If any one has any other suggestion let me know.
Last edited by tkmsr; 01-05-2011 at 11:48 PM.
|
|
|
01-06-2011, 04:53 AM
|
#2
|
Senior Member
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534
Rep: 
|
Hiho ^^
As far as i know, some filesystems work badly with nfs. Dunno if it's the case here.
Try to manually mount the drive in another folder (ie /mnt/usb), and apply you export to this folder.
I tell you this, because when HAL mounts drives in /media, folder permissions can be weird for some setups. More info here :
http://www.linuxquestions.org/questi...oblems-808364/
http://www.linuxquestions.org/questi...5/#post3971465
If you try to access the share as root, then you must use this export option : no_root_squash
Did you tried a simple nfs share of a "normal" folder in order to ensure basic setup works ?
|
|
1 members found this post helpful.
|
01-06-2011, 05:04 AM
|
#3
|
Member
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798
Original Poster
Rep:
|
Quote:
Originally Posted by Linux.tar.gz
Hiho ^^
no_root_squash
|
Ahhh shit yea I had forgotten it now it worked perfectly thanks.
Last edited by tkmsr; 01-06-2011 at 08:44 AM.
|
|
|
All times are GMT -5. The time now is 06:45 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|