Mounting a read-only md FS as read-only

Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl
Mon Feb 18 08:14:49 UTC 2008


> want to change the image, just examine it, I specified -o readonly
> to mdconfig and the equivalent to mount.  Is there some reason why
> this should not work?  The backing file, and the mountpoint, do
> exist.

does mount_ext2fs support readonly at all?

try -o readonly before -f filename in mdconfig but i don't know if it does 
matter.



>
> # ls -ld [filename]
> -rw-r--r--  1 perryh  perryh  104857600 Mar 16  2007 [filename]
> # mdconfig -a -t vnode -f [filename] -o readonly
> md0
> # ls -ld /dev/md0 /[mountpoint]
> crw-r-----  1 root  operator    1,  15 Nov 24 21:17 /dev/md0
> drwxr-xr-x  2 perryh  perryh        512 Feb 17 21:57 /[mountpoint]
> # mount -r -o noexec -t ext2fs /dev/md0 /[mountpoint]
> mount_ext2fs: /dev/md0: Read-only file system
> # mount -o ro,noexec -t ext2fs /dev/md0 /[mountpoint]
> mount_ext2fs: /dev/md0: Read-only file system
> # /sbin/mount_ext2fs -o ro,noexec /dev/md0 /[mountpoint]
> mount_ext2fs: /dev/md0: Read-only file system
> # mdconfig -l -u 0
> md0     vnode     100M  /[mountpoint]
> # uname -a
> FreeBSD fbsd61 6.1-RELEASE FreeBSD 6.1-RELEASE #30: Mon Jan  1 23:01:34 PST 2007     perryh at fbsd61:/usr/src/sys/i386/compile/GENERIC  i386
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
>


More information about the freebsd-questions mailing list