Linux /dev/loop 사용률 100%로 인한 'No space left on device' 에러
페이지 정보
본문
'No space left on device 오류를 해결하는 방법입니다.
1. 홈페이지 접속이 유독 불안정해서 df 명령어로 서버의 저장공간을 확인합니다.
happyjung@happyjung_srv:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 4042396 0 4042396 0% /dev
tmpfs 815244 1420 813824 1% /run
/dev/sda4 227954100 13706928 202594924 7% /
tmpfs 4076212 0 4076212 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4076212 0 4076212 0% /sys/fs/cgroup
/dev/loop0 108416 108416 0 100% /snap/core/16202
/dev/loop1 108416 108416 0 100% /snap/core/16091
/dev/sda2 498900 226388 235816 49% /boot
/dev/sdc1 479564464 28 455130468 1% /backup
/dev/sdb1 479564464 292195816 162934680 65% /var/www
tmpfs 815240 0 815240 0% /run/user/0
tmpfs 815240 0 815240 0% /run/user/1000
2. 전에 없던 /dev/loop* 디바이스가 없었는데, 사용량 100% 의 loop 값이 확인됩니다.
내용을 더 자세히 보기 위해 아래와 같이 명령어를 실행합니다.
happyjung@happyjung_srv:~$ losetup
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC
/dev/loop1 0 0 1 1 /var/lib/snapd/snaps/core_16091.snap 0 512
/dev/loop0 0 0 1 1 /var/lib/snapd/snaps/core_16202.snap 0 512
3. root 로 로그인을 합니다.
happyjung@happyjung_srv:~$ sudo -i
[sudo] password for happyjung:
4. 아래 명령어를 실행하면 루프 디바이스가 모두 제거됩니다.
root@happyjung_srv:~# sudo apt autoremove --purge snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
snapd*
0 upgraded, 0 newly installed, 1 to remove and 96 not upgraded.
After this operation, 171 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 147954 files and directories currently installed.)
Removing snapd (2.58+18.04.1) ...
Warning: Stopping snapd.service, but it can still be activated by:
snapd.socket
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.4) ...
Processing triggers for mime-support (3.60ubuntu1) ...
(Reading database ... 147858 files and directories currently installed.)
Purging configuration files for snapd (2.58+18.04.1) ...
Stopping snap-core-16091.mount
Stopping unit snap-core-16091.mount
Waiting until unit snap-core-16091.mount is stopped [attempt 1]
snap-core-16091.mount is stopped.
Removing snap core and revision 16091
Removing snap-core-16091.mount
Stopping snap-core-16202.mount
Stopping unit snap-core-16202.mount
Waiting until unit snap-core-16202.mount is stopped [attempt 1]
snap-core-16202.mount is stopped.
Removing snap core and revision 16202
Removing snap-core-16202.mount
Discarding preserved snap namespaces
Final directory cleanup
Removing extra snap-confine apparmor rules
Removing snapd cache
Removing snapd state
5. df 명령어로 디스크 용량을 확인하니, loop 가 삭제되었습니다.
root@happyjung_srv:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 4042396 0 4042396 0% /dev
tmpfs 815244 1428 813816 1% /run
/dev/sda4 227954100 13142164 203159688 7% /
tmpfs 4076212 0 4076212 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4076212 0 4076212 0% /sys/fs/cgroup
/dev/sda2 498900 226388 235816 49% /boot
/dev/sdc1 479564464 28 455130468 1% /backup
/dev/sdb1 479564464 292195964 162934532 65% /var/www
tmpfs 815240 0 815240 0% /run/user/0
tmpfs 815240 0 815240 0% /run/user/1000
참고자료
https://beausty23.tistory.com/234
1. 홈페이지 접속이 유독 불안정해서 df 명령어로 서버의 저장공간을 확인합니다.
happyjung@happyjung_srv:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 4042396 0 4042396 0% /dev
tmpfs 815244 1420 813824 1% /run
/dev/sda4 227954100 13706928 202594924 7% /
tmpfs 4076212 0 4076212 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4076212 0 4076212 0% /sys/fs/cgroup
/dev/loop0 108416 108416 0 100% /snap/core/16202
/dev/loop1 108416 108416 0 100% /snap/core/16091
/dev/sda2 498900 226388 235816 49% /boot
/dev/sdc1 479564464 28 455130468 1% /backup
/dev/sdb1 479564464 292195816 162934680 65% /var/www
tmpfs 815240 0 815240 0% /run/user/0
tmpfs 815240 0 815240 0% /run/user/1000
2. 전에 없던 /dev/loop* 디바이스가 없었는데, 사용량 100% 의 loop 값이 확인됩니다.
내용을 더 자세히 보기 위해 아래와 같이 명령어를 실행합니다.
happyjung@happyjung_srv:~$ losetup
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC
/dev/loop1 0 0 1 1 /var/lib/snapd/snaps/core_16091.snap 0 512
/dev/loop0 0 0 1 1 /var/lib/snapd/snaps/core_16202.snap 0 512
3. root 로 로그인을 합니다.
happyjung@happyjung_srv:~$ sudo -i
[sudo] password for happyjung:
4. 아래 명령어를 실행하면 루프 디바이스가 모두 제거됩니다.
root@happyjung_srv:~# sudo apt autoremove --purge snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
snapd*
0 upgraded, 0 newly installed, 1 to remove and 96 not upgraded.
After this operation, 171 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 147954 files and directories currently installed.)
Removing snapd (2.58+18.04.1) ...
Warning: Stopping snapd.service, but it can still be activated by:
snapd.socket
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.4) ...
Processing triggers for mime-support (3.60ubuntu1) ...
(Reading database ... 147858 files and directories currently installed.)
Purging configuration files for snapd (2.58+18.04.1) ...
Stopping snap-core-16091.mount
Stopping unit snap-core-16091.mount
Waiting until unit snap-core-16091.mount is stopped [attempt 1]
snap-core-16091.mount is stopped.
Removing snap core and revision 16091
Removing snap-core-16091.mount
Stopping snap-core-16202.mount
Stopping unit snap-core-16202.mount
Waiting until unit snap-core-16202.mount is stopped [attempt 1]
snap-core-16202.mount is stopped.
Removing snap core and revision 16202
Removing snap-core-16202.mount
Discarding preserved snap namespaces
Final directory cleanup
Removing extra snap-confine apparmor rules
Removing snapd cache
Removing snapd state
5. df 명령어로 디스크 용량을 확인하니, loop 가 삭제되었습니다.
root@happyjung_srv:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 4042396 0 4042396 0% /dev
tmpfs 815244 1428 813816 1% /run
/dev/sda4 227954100 13142164 203159688 7% /
tmpfs 4076212 0 4076212 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4076212 0 4076212 0% /sys/fs/cgroup
/dev/sda2 498900 226388 235816 49% /boot
/dev/sdc1 479564464 28 455130468 1% /backup
/dev/sdb1 479564464 292195964 162934532 65% /var/www
tmpfs 815240 0 815240 0% /run/user/0
tmpfs 815240 0 815240 0% /run/user/1000
참고자료
https://beausty23.tistory.com/234
댓글목록
등록된 댓글이 없습니다.