How to mount-umount nullfs [-ro] at the command-line?

Inside fstab.jail this will allow read-only permission
Code:
/usr/src       /myjails/Database1/usr/src   nullfs  ro  0   0
At the command-line this works for read/write permission . . .
Code:
mount_nullfs -o /dev/ada0s1f /usr/src /myjails/Database1/usr/src
but it don’t work for read-only permission …
Code:
mount_nullfs -ro /dev/ada0s1f /usr/src /myjails/Database1/usr/src
What is the sequence that can be used to mount and umount a directory with read-only permission at the command-line, or is it even possible?
.
 
Hi Max, I haven't checked it myself, but -o is for options.
I guess there is insufficient argument checking for illegal options, else it would complain at your second example.
So I believe the correct way would be to write it like

mount -t nullfs -o ro /usr/src /myjails/Database1/usr/src
or
mount_nullfs -o ro /usr/src /myjails/Database1/usr/src
 
The option is either -r or -o ro.

Code:
     -r      The file system is to be mounted read-only.  Mount the file sys-
             tem read-only (even the super-user may not write it).  The same
             as the ro argument to the -o option.
Code:
             ro      The same as -r; mount the file system read-only (even the
                     super-user may not write it).
See mount(8).
 
Back
Top