관리 메뉴

리눅스 CentOS7 아이노드(i-node) full 이슈 해결 방법(svn: Can't find a temporary directory: Internal error) 본문

리눅스/Linux 공부내용

리눅스 CentOS7 아이노드(i-node) full 이슈 해결 방법(svn: Can't find a temporary directory: Internal error)

ª_ª 2023. 5. 20. 10:04
728x90
반응형

1. i-node 이전글 확인하기

2023.05.19 - [리눅스/Linux 공부내용] - 리눅스 CentOS7 아이노드(i-node)

 

2. i-node 용량 확인

2_1) i-node 용량 확인하기

- 명령어 : df -i

[root@localhost test]# df -i
Filesystem               Inodes  IUsed   IFree IUse% Mounted on
devtmpfs                 250467    372  250095    1% /dev
tmpfs                    253456      1  253455    1% /dev/shm
tmpfs                    253456 253456       0  100% /run
tmpfs                    253456     16  253440    1% /sys/fs/cgroup
/dev/mapper/centos-root 8910848  82174 8828674    1% /
/dev/sda1                524288    332  523956    1% /boot
tmpfs                    253456      1  253455    1% /run/user/0
[root@localhost test]#

 

2_2) 사용률이 가장 높은 디렉터리로 어디 경로가 가장 높은지 확인하기

- 명령어 : for i in *; do echo -e "$(find $i | wc -l)\t$i"; done | sort -n

* test 디렉터리에 252724개의 파일이 생성되있는걸 확인 할 수 있습니다.

[root@localhost run]# df -i
Filesystem               Inodes  IUsed   IFree IUse% Mounted on
devtmpfs                 250467    372  250095    1% /dev
tmpfs                    253456      1  253455    1% /dev/shm
tmpfs                    253456 253456       0  100% /run
tmpfs                    253456     16  253440    1% /sys/fs/cgroup
/dev/mapper/centos-root 8910848  82174 8828674    1% /
/dev/sda1                524288    332  523956    1% /boot
tmpfs                    253456      1  253455    1% /run/user/0
[root@localhost run]# cd /run
[root@localhost run]# for i in *; do echo -e "$(find $i | wc -l)\t$i"; done | sort -n
1       auditd.pid
1       console
1       cron.reboot
1       crond.pid
1       cryptsetup
1       dhclient-ens33.pid
1       dmeventd-client
1       dmeventd-server
1       ebtables.lock
1       faillock
1       firewalld
1       gssproxy.pid
1       gssproxy.sock
1       lvmetad.pid
1       mount
1       netreport
1       plymouth
1       rpcbind
1       rpcbind.lock
1       rpcbind.sock
1       sepermit
1       setrans
1       sm-notify.pid
1       sshd.pid
1       svnserve
1       syslogd.pid
1       utmp
1       xtables.lock
2       dbus
2       sudo
2       sysconfig
2       tmpfiles.d
2       tuned
2       user
2       vmware
3       chrony
4       httpd
4       log
5       lock
5       lvm
6       NetworkManager
11      initramfs
89      systemd
562     udev
252724  test
[root@localhost run]#

 

2_3) 디렉터리 파일 개수 확인

- 명령어 : ls | wc -l

- 명령어 : ls -al | more

* 해당 디렉터리에 파일이 많기 때문에 조회가 느려지기 때문에 차근차근확인

[root@localhost run]# cd test/
[root@localhost test]# ls | wc -l
252723
[root@localhost test]# ls -al | more
합계 1004080
drwxr-xr-x.  2 root root 5054500  5월 19 00:09 .
drwxr-xr-x. 30 root root     940  5월 19 00:05 ..
-rw-r--r--.  1 root root      23  5월 19 00:09 file_1.txt
-rw-r--r--.  1 root root      24  5월 19 00:09 file_10.txt
-rw-r--r--.  1 root root      25  5월 19 00:09 file_100.txt
-rw-r--r--.  1 root root      26  5월 19 00:09 file_1000.txt
-rw-r--r--.  1 root root      27  5월 19 00:09 file_10000.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100000.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100001.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100002.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100003.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100004.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100005.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100006.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100007.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100008.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100009.txt
-rw-r--r--.  1 root root      27  5월 19 00:09 file_10001.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100010.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100011.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100012.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100013.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100014.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100015.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100016.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100017.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100018.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100019.txt
-rw-r--r--.  1 root root      27  5월 19 00:09 file_10002.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100020.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100021.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100022.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100023.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100024.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100025.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100026.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100027.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100028.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100029.txt
-rw-r--r--.  1 root root      27  5월 19 00:09 file_10003.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100030.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100031.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100032.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100033.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100034.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100035.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100036.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100037.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100038.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100039.txt
-rw-r--r--.  1 root root      27  5월 19 00:09 file_10004.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100040.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100041.txt
-rw-r--r--.  1 root root      28  5월 19 00:09 file_100042.txt

 

3. 파일 생성

3_1) 해당 경로에 파일 생성해보기

- 명령어 : touch test

* touch: cannot touch `test': 장치에 남은 공간이 없음

* svn: Can't find a temporary directory: Internal error

[root@localhost test]# touch test
touch: cannot touch `test': 장치에 남은 공간이 없음
[root@localhost test]#

 

4. 파일 삭제

4_1) 해당 경로에 불필요한 파일 삭제

- 명령어 : rm -rf file_*

* 파일 삭제 후 i-node 용량 확보 및 파일 생성 가능

[root@localhost test]# rm -rf file_*
[root@localhost test]# ls | wc -l
0
[root@localhost test]# ll
합계 0
[root@localhost test]# df -i
Filesystem               Inodes IUsed   IFree IUse% Mounted on
devtmpfs                 250467   372  250095    1% /dev
tmpfs                    253456     1  253455    1% /dev/shm
tmpfs                    253456   733  252723    1% /run
tmpfs                    253456    16  253440    1% /sys/fs/cgroup
/dev/mapper/centos-root 8910848 82174 8828674    1% /
/dev/sda1                524288   332  523956    1% /boot
tmpfs                    253456     1  253455    1% /run/user/0
[root@localhost test]# touch test
[root@localhost test]# ll
합계 0
-rw-r--r--. 1 root root 0  5월 19 00:35 test
[root@localhost test]#

 

 

 

728x90
반응형
Comments