Operating System - HP-UX
1754858 Members
5572 Online
108827 Solutions
New Discussion юеВ

Re: /etc/fstab and spaces in NFS volume paths

 
Andrew Cunningham
Frequent Advisor

/etc/fstab and spaces in NFS volume paths

I have a NFS volume I need to mount - the "space" in the Voume name is giving mount a fit
(HP-UX 11.0)

attempt 1)
xserveg5.sandiego.vasci.com:/Shared Items/Public/v2dev /win2kserver/v2dev nfs rw,suid,soft 0 0

mountall: entry for xserveg5.sandiego.vasci.com:/Shared has missing fields in the /etc/fstab
mountall: warning: file system table /etc/fstab is corrupt.

attempt 2)
xserveg5.sandiego.vasci.com:"/Shared Items/Public/v2dev" /win2kserver/v2dev nfs rw,suid,soft 0 0

mountall: entry for xserveg5.sandiego.vasci.com:"/Shared has missing fields in the /etc/fstab
mountall: warning: file system table /etc/fstab is corrupt.

attempt 3)
xserveg5.sandiego.vasci.com:/Shared\ Items/Public/v2dev /win2kserver/v2dev nfs rw,suid,soft 0 0

mountall: entry for xserveg5.sandiego.vasci.com:/Shared\ has missing fields in the /etc/fstab
mountall: warning: file system table /etc/fstab is corrupt.

16 REPLIES 16
Mark Grant
Honored Contributor

Re: /etc/fstab and spaces in NFS volume paths

I have heard that using the octal for a space works in this case but haven't tried it

xserveg5.sandiego.vasci.com:/Shared\040Items/Public/v2dev /win2kserver/v2dev nfs rw,suid,soft 0 0

Never preceed any demonstration with anything more predictive than "watch this"
A. Clay Stephenson
Acclaimed Contributor

Re: /etc/fstab and spaces in NFS volume paths

While spaces are allowed in UNIX pathnames they should be avoided for just this reason. Man fstab and you will find that the field separator is space or so essentially your task is hopeless with respect to fstab. However, you should be able to manually mount the filesystem using quoting and leave this filesystem entry out of fstab. You could also create an init.d to mount/umount this puppy on boot and shutdown.

Of course, you could adopt the radical notion of changing the directory name on the Windows box.


If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: /etc/fstab and spaces in NFS volume paths

The easy solution -- Remove the space. Unix doesn't much like spaces in file names. You have to remember that Unix ain't Windows!
Andrew Cunningham
Frequent Advisor

Re: /etc/fstab and spaces in NFS volume paths

Actually the NFS server is not Windows - it is a OS X XServeG5 ( BSD Unix in other words). The XServe is an outstanding file server for SAMBA, NFS and AFP. And it is basically just a UNIX box.
I can quite happily mount the file system via NFS from other OS X systems.

It would be quite painful to rename the shared folder to not have spaces ( it is shared with multiple protocols)- it seems a very arbitrary restriction to fstab

I tried the \040 suggestion....

mountall: cannot mount xserveg5.sandiego.vasci.com:/Shared\040Items/Public/v2dev
mountall: diagnostics from mount
No such file or directory
Jeff Schussele
Honored Contributor

Re: /etc/fstab and spaces in NFS volume paths

Hi Andrew,

Sometimes pain is a healthy part of life...
Get rid of it & life will be even easier.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Bill Thorsteinson
Honored Contributor

Re: /etc/fstab and spaces in NFS volume paths

Try using a backslash to quote the space.
I haven't tried with mount as I don't use spaces.
Geoff Wild
Honored Contributor

Re: /etc/fstab and spaces in NFS volume paths

Not a fix, but a work around...

How about, on the OSX box, create a symbolic link (with no spaces) to the "/Shared Items/Public/v2dev" dir and exportfs that(symbolic link) to the HP-UX 11.0 server?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: /etc/fstab and spaces in NFS volume paths

Okay, if this is OS X (and thus UNIX kinda,sorta based) you should be able to "outbushwhack" it like this:

On your OS X box create a symbolic link from the actual directory (w spaces) to another (w/o spaces).

e.g.
ln -s "/Shared Items/Public/v2dev" /Shared_Items/Public/v2dev"

Now export BOTH of these and the UNIX client can use the version w/o spaces and the other clients can use the version w spaces.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: /etc/fstab and spaces in NFS volume paths

Ooops, that should be:
ln -s "/Shared Items/Public/v2dev" /Shared_Items/Public/v2dev

(no quote at the end)

You could also simply choose to link only the "Shared Items" to Shared_Items.

If it ain't broke, I can fix that.