2024.01.11 15:12:54
3

[ubuntu] read only file system error

 

syncthing 을 설치 해서, 폴더 공유를 하려고 하는데,

외장디스크의 속성이 777로 변경되지 않았습니다.

이때, read only file system error 가 표시됩니다.

 

 

그래서 RO 를 RW로 변경하기로 합니다.

 

$sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           781M  3.5M  778M   1% /run
/dev/mmcblk0p2   15G  7.1G  6.6G  52% /
tmpfs           3.9G  1.2M  3.9G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/mmcblk0p1  253M  137M  116M  55% /boot/firmware
/dev/sda2        28G  2.9G   24G  11% /vo2
overlay          28G  2.9G   24G  11% /vo2/image/overlay2/d0ba15d83db2ad4589a11defa08a55b1e6db1f9c29f6c10a032f5c6d655af3af/merged
overlay          28G  2.9G   24G  11% /vo2/image/overlay2/ff8b83aa67b15c85c4c8574fd867c083e4ac4b84821f532b5ff9657b6efea1ef/merged
overlay          28G  2.9G   24G  11% /vo2/image/overlay2/6c426b0ef2a1e4c4e7a4c6a3d3fd5c54950dda0fca40ef25e9468aba31c5eb8e/merged
tmpfs           781M  4.0K  781M   1% /run/user/1000

 

아래 명령어로 sda2 가 RO(read only) 로 되어 있는걸 알 수 있습니다.

$cat /proc/mounts | grep /dev

udev /dev devtmpfs rw,nosuid,relatime,size=3944416k,nr_inodes=986104,mode=755,inode64 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/mmcblk0p2 / ext4 rw,relatime,discard,errors=remount-ro 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,inode64 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
/dev/loop0 /snap/core20/1977 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop1 /snap/core20/2107 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop2 /snap/lxd/24326 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop3 /snap/snapd/20298 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop4 /snap/snapd/20674 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/mmcblk0p1 /boot/firmware vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0
/dev/sda2 /vo2 ext4 ro,noatime 0 0

 

언마운트 합니다. (사용중이라는 답변을 받았네요)

$sudo umount /dev/sda2
umount: /vo2: target is busy.

 

누가 사용하는지 알아 봅니다.

$fuser -cu /dev/sda2       #-cu ; 모든 열린 파일에 대해, 프로세스의 로그인 이름 제공
$fuser -ck /dev/sda2       #-ck ; 모든 열린 파일에 대해, SIGKILL 신호를 각 로컬 프로세스에 전송

 

e2fsck 실행

$e2fsck /dev/sda2                   #fsck명령어의 확장명령어
e2fsck 1.46.5 (30-Dec-2021)
/dev/sda2 is mounted.

 

rw 로 바뀌어 있음을 알수 있습니다.

$cat /proc/mounts | grep /dev
udev /dev devtmpfs rw,nosuid,relatime,size=3944416k,nr_inodes=986104,mode=755,inode64 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/mmcblk0p2 / ext4 rw,relatime,discard,errors=remount-ro 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,inode64 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
/dev/loop0 /snap/core20/1977 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop1 /snap/core20/2107 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop2 /snap/lxd/24326 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop3 /snap/snapd/20298 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop4 /snap/snapd/20674 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/mmcblk0p1 /boot/firmware vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0
/dev/sda2 /vo2 ext4 rw,noatime 0 0

 

삭제하시겠습니까?
취소
취소

LOGIN

SEARCH

MENU NAVIGATION