NFS: Cannot unshare directory. | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

NFS: Cannot unshare directory.

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-17-2010
sparcman sparcman is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 19 June 2012, 6:21 AM EDT
Posts: 53
Thanks: 11
Thanked 0 Times in 0 Posts
NFS: Cannot unshare directory.

Hi,

I'm currently having a problem unsharing a directory. When I specify the command. Below is an example of the problem. Any ideas?




Code:
# share
- /test/dir1 rw ""
- /test/dir2 root=10.0.0.1,root=10.0.0.1 ""
- /test/dir3 root=10.11.1.1,root=10.11.1.1 ""
- /test/dir4 root=10.11.1.2,root=10.11.1.2 ""
 
# unshare /test/dir1
nfs unshare: /test/dir1: not shared
#

(I need to be able to unshare /test/dir1 and just share out /test. I get the error below.)


Code:
# share /test
share_nfs: /test: sub-directory (/test/dir1) already shared
#



Thanks,

Sparcman

Last edited by DukeNuke2; 05-18-2010 at 02:11 AM.. Reason: code tags
Sponsored Links
    #2  
Old 05-17-2010
Reboot's Avatar
Reboot Reboot is offline
Registered User
 
Join Date: Sep 2008
Last Activity: 12 July 2012, 4:30 AM EDT
Location: meri jaan Mumbai, from mera desh BHAARAT.
Posts: 147
Thanks: 7
Thanked 15 Times in 15 Posts
Quote:
Originally Posted by sparcman View Post
Hi,

I'm currently having a problem unsharing a directory. When I specify the command. Below is an example of the problem. Any ideas?



# share
- /test/dir1 rw ""
- /test/dir2 root=10.0.0.1,root=10.0.0.1 ""
- /test/dir3 root=10.11.1.1,root=10.11.1.1 ""
- /test/dir4 root=10.11.1.2,root=10.11.1.2 ""

# unshare /test/dir1
nfs unshare: /test/dir1: not shared
#

(I need to be able to unshare /test/dir1 and just share out /test. I get the error below.)

# share /test
share_nfs: /test: sub-directory (/test/dir1) already shared
#



Thanks,

Sparcman


What is the output of :



Code:
#dfshares

Sponsored Links
    #3  
Old 05-18-2010
sparcman sparcman is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 19 June 2012, 6:21 AM EDT
Posts: 53
Thanks: 11
Thanked 0 Times in 0 Posts
Hi Reboot,

Below is the output from dfshares

# dfshares
RESOURCE SERVER ACCESS TRANSPORT
hostname:/test/dir1 hostname - -
hostname:/test/dir2 hostname - -
hostname:/test/dir3 hostname - -
hostname:/test/dir4 hostname - -


Thanks,

Sparcman

Last edited by sparcman; 05-18-2010 at 09:38 AM..
    #4  
Old 05-18-2010
solaris_user solaris_user is offline
Registered User
 
Join Date: Aug 2009
Last Activity: 20 September 2014, 12:21 PM EDT
Location: Croatia
Posts: 440
Thanks: 32
Thanked 18 Times in 17 Posts
did you tried manually force unmount ?
Sponsored Links
    #5  
Old 05-18-2010
sparcman sparcman is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 19 June 2012, 6:21 AM EDT
Posts: 53
Thanks: 11
Thanked 0 Times in 0 Posts
Hi Solaris User. Unfortunately it's not a force unmount that is required. I have unmounted this share from all servers that had it mounted. Now I just want to unshare the /test/dir1 share. There is no force unshare command I can use. I can put a new entry into the /etc/dfs/dfstab file and reboot the server but I don't want to have to reboot to get this working.

Thanks,

Sparcman
Sponsored Links
    #6  
Old 05-19-2010
Reboot's Avatar
Reboot Reboot is offline
Registered User
 
Join Date: Sep 2008
Last Activity: 12 July 2012, 4:30 AM EDT
Location: meri jaan Mumbai, from mera desh BHAARAT.
Posts: 147
Thanks: 7
Thanked 15 Times in 15 Posts
Sorry for late replying...
Well, First check wether all these file systems i.e :

Code:
1./test/dir1 
2./test/dir2 
3./test/dir3
----- ----
----- ----

are mounted or not :


Code:
#mount -v|egrep 'dir1|dir2|dir3|dir4'

Above command will tell you that...

Because in certain cases where filesystem is not mounted but still it is shared, they give the same error...

The Following User Says Thank You to Reboot For This Useful Post:
sparcman (05-20-2010)
Sponsored Links
    #7  
Old 05-20-2010
sparcman sparcman is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 19 June 2012, 6:21 AM EDT
Posts: 53
Thanks: 11
Thanked 0 Times in 0 Posts
Hi Reboot.

I managed to get it working. I removed the entry for /test/dir1 in the /etc/dfs/sharetab file. I then unshared /test/dir1 and then share /test and it worked.

Thanks for looking into this for me. Your help was appreciated.

Sparcman.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Move the latest or older File from one directory to another Directory pp_ayyanar Shell Programming and Scripting 1 03-24-2010 03:22 PM
Restricting SFTP user to a defined directory and home directory sftpuser Solaris 1 10-16-2009 07:00 PM
Move a file from windows directory to unix directory kingpeejay Shell Programming and Scripting 1 06-19-2009 01:31 PM
Creating date directory and moving files into that directory ravi030 Shell Programming and Scripting 3 12-05-2008 03:18 AM
moving files from a unix directory to a windows directory gleads UNIX for Dummies Questions & Answers 2 08-29-2002 08:42 PM



All times are GMT -4. The time now is 10:49 PM.