Skip to contentSkip to conversation

How to pass "-n" option to the mount command via automounter?

DISCUSSION Ondrej Valousek 2 participants 3 messages Jul 30, 2008 – Jul 31, 2008 Kernel automounter

lore
Share & tools
lore
#0 lore raw

Hi List,

I am wondering - I have diskless systems deployed here with /etc being read-only -> I need to pass "-n" option to the mount command in order to make it working.
I tried:

Quoted 1 line

automount -O "-n"

but it passes the -n option after -o, like this:

mount_mount: mount(nfs): calling mount -t nfs -s -o -n hercules:/ext3/tmp /proj/tmp

I need the -n option to be passed before "-o". How could I do it? Many thanks for your help.

Ondrej

#1 lore raw

From what I see in the source for automounter, the answer is "no" :-( I even tried automount -O "rw -n" hack - should work but it does not. In the spawn.c file I see comment that autofs ver. 5 needs to have /etc/mtab file updated. This is not a problem as most diskless environments have /etc/mtab pointed to /proc/mounts.

I believe this is a bug. Can we have it fixed? (for example detect if /etc/mytab is a symlink and if it is, pass the -n option to the mount command automagically)

Thanks,
Ondrej

Quoted 24 lines · Ondrej Valousek

Hi List,

I am wondering - I have diskless systems deployed here with /etc being read-only -> I need to pass "-n" option to the mount command in order to make it working.
I tried:

Quoted 2 lines

automount -O "-n"

but it passes the -n option after -o, like this:

mount_mount: mount(nfs): calling mount -t nfs -s -o -n hercules:/ext3/tmp /proj/tmp

I need the -n option to be passed before "-o". How could I do it? Many thanks for your help.

Ondrej

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

maintainer
#2 lore raw
Quoted 9 lines · Ondrej Valousek

From what I see in the source for automounter, the answer is "no" :-( I even tried automount -O "rw -n" hack - should work but it does not. In the spawn.c file I see comment that autofs ver. 5 needs to have /etc/mtab file updated. This is not a problem as most diskless environments have /etc/mtab pointed to /proc/mounts.

I believe this is a bug. Can we have it fixed? (for example detect if /etc/mytab is a symlink and if it is, pass the -n option to the mount command automagically)

ln -s /proc/mounts /etc/mtab
in the partition that is used for your /etc should do what you need.

Quoted 34 lines

Thanks,
Ondrej

Quoted 17 lines · Ondrej Valousek

Hi List,

I am wondering - I have diskless systems deployed here with /etc being read-only -> I need to pass "-n" option to the mount command in order to make it working.
I tried:

Quoted 2 lines

automount -O "-n"

but it passes the -n option after -o, like this:

mount_mount: mount(nfs): calling mount -t nfs -s -o -n hercules:/ext3/tmp /proj/tmp

I need the -n option to be passed before "-o". How could I do it? Many thanks for your help.

Quoted 7 lines

Ondrej

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs