LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-05-2011, 02:07 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
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
Quote:
/media.
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

Quote:
chmod -R 755 /media/vol2
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
Quote:
/var/log/syslog
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.
 
Old 01-06-2011, 04:53 AM   #2
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
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.
Old 01-06-2011, 05:04 AM   #3
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Quote:
Originally Posted by Linux.tar.gz View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SYSLINUX on fat32 USB-Stick partition ? Vilius Linux - Software 4 05-07-2010 08:14 PM
problem exporting /dev via NFS raz3k Linux - Networking 3 03-06-2008 08:02 AM
Very Slow Exporting during NFS Start / Many NFS Problems VorlonInfoTech Linux - Networking 3 06-28-2006 06:48 PM
Transcend Jetflash 1GB USB Memory Stick on Fedora Core 3: Give it a volume label. Jim_Farmer Linux - Hardware 1 04-29-2005 12:32 PM
exporting one NFS folder to another NFS and exporting it.... stellarmarine1 Linux - Networking 3 09-20-2004 06:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration