Read-only file system
2014.12.30 15:09
가상서버에서 확인하고 정리한 글입니다. 참고용으로만 봐주세요
[root@localhost ~]# touch a
touch: cannot touch `a': Read-only file system
파일 a를 생성해봤으나 Read-only file system 파일시스템이 나옵니다.
현재 이 가상서버의 시점은 파일시스템에 문제가 생겨 부팅이 안되는 현상이 발생한후
파일시스템 복구를 돌린 상태입니다.
[root@ocalhost ~]# mount
/dev/sda1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).
It's possible that information reported by mount(8) is not
up to date. For actual information about system mount points
check the /proc/mounts file.
mount로 마운트가 어떻게 잡혀있는지 확인했습니다.
/dev/sda1 ... rw? 그런데 왜 파일이 안만들어지는지 모르겠네요.
[root@ocalhost ~]# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 ro,data=ordered 0 0
/dev /dev tmpfs rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
이번엔 다른 방식으로 확인해봤습니다. 이번엔 ro로 표시되네요.
[root@ocalhost ~]# mount -o remount,rw /
mount: block device /dev/sda1 is write-protected, mounting read-only
보통은 아래와 같이 리마운트를 해주고 fstab를 확인한후 잘 되는것이 정상이지만
제가 살펴본 가상서버는 왜 그런지 remount가 적용이 되지 않았습니다.
[root@ocalhost ~]# cat /proc/mounts
/dev/root / ext3 rw,data=ordered 0 0
기묘한건 싱글 모드에서는 rw라고 나옵니다. 저상태에서 리마운트 하고 부팅한뒤 다시확인해봤지만
ro로 나오더군요. 이것에 대해 다른곳에서 좀더 알아볼 필요가 있어보입니다.