# NFS with usb mount



## Ofloo (Feb 13, 2011)

I was wondering and I have been looking on google, .. for weeks, .. only found options for linux which don't seem to work for FreeBSD like root_squash

Now my problem, I have this 1TB usb disk which I usually use for backups ...  however I would like this disk to be readable from nfs, so this disk is not plugged in all the time.

But when I mount this disk under a directory in on my nfs server this directory can't be read, ..


----------



## SirDice (Feb 14, 2011)

Ofloo said:
			
		

> But when I mount this disk under a directory in on my nfs server this directory can't be read, ..


Restart nfsd and mountd or send a SIGHUP to them.


----------



## Ofloo (Feb 15, 2011)

Right, I'll have to do some tests all over again then.


----------



## jalla (Feb 15, 2011)

You should give a more precise account of what you're trying to do, what commands you have performed, and how it fails.

Based on the information given it's hard to decide what's actually your problem.


----------



## Ofloo (Feb 16, 2011)

Well I got an nfs share /usr/local/nfs and I'm trying to mount an usb disk under /usr/local/nfs/disk however when I try to enter the directory nothing is there. The nfs share works however the disk contents is not visible, however when I go on the shell it is visible.

edit: 

I've tried several ways to mount it the usb disk that is and then in exports I have tried various ways to map all directories to a specific user.

Can't remember all the commands I've done so far, .. however when I create new export outside the current nfs share it works just fine.


----------



## SirDice (Feb 16, 2011)

Ofloo said:
			
		

> Well I got an nfs share /usr/local/nfs and I'm trying to mount an usb disk under /usr/local/nfs/disk however when I try to enter the directory nothing is there.



That's to be expected. You can export _one_ local filesystem at at time. Since /usr/local/nfs/disk/ is a different filesystem you'll have to export it separately.


----------



## Ofloo (Feb 17, 2011)

Yes, I figured as much however overlapping directory do not work either. It is only visible outside the other primary nfs share, so basically it's impossible.


----------

