This will still write to
/dev/foo if there is a journal:
mount -oro /dev/foo /mnt/disk
How can I treat
/dev/foo as read-only?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
mount -oro,noload /dev/foo /mnt/disk
If you make the device readonly first:
blockdev --setro /dev/foo
then the filesystem will be unable to write to it, so you don't need to know any special type-dependent filesystem options.