bind mount を -o ro を使って read only で mount しようとして、read only にできない。read only にするには、-o remount, ro と、remount 時に ro に設定すればよい。
bind mount を使えば、directory を 別の場所にマウントできる。例えば、以下は /tmp を /mnt にマウントしている
# mount –bind /tmp /mnt
# mount
…
/tmp on /mnt type none (rw,bind)
read only で mount しよとすると -o ro をつけて以下の様に mount すればよいはずだが、実際は 、mount の見た目は ro にもかかわらず、rw になってしまう。
# mount –bind -o ro /tmp/ /mnt/
# mount
…
/tmp on /mnt type none (ro,bind)
# touch /mnt/au
read only にするために、remount を使う。remount 時に ro にするとなぜか read only にすることができる。
# mount -o remount,ro /mnt/
# touch /mnt/au
touch: cannot touch `/mnt/au’: 読み込み専用ファイルシステムです
参考: