linux centos 7 디스크 용량 부족 현상을 어떻게 고치나요?

ikpil의 이미지

- 환경

[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)

[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May 13 10:06:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

- 한일
1. 여러번 리붓 해보았지만, 계속 이 상태입니다.
2. 싱글모드로 들어가서 마운트 다 해제하고 xfs_repair /dev/mapper/centos-root 후 재부팅 했으나, 계속 이 상태입니다.
3. inode 확인해보다 10% 여유 있습니다.

- 증상
가상서버로 서버 올려서 몇개월간 잘 쓰고 있었습니다.
그런데 어느날 서버에 로그가 안쌓이길래 df 로 확인해 보니, 용량이 꽉 차있었습니다.
그래서 du로 용량을 찾아보니, 2G도 안썼다고 나옵니다.

이 증상으로 고칠 방법이 있나요?

- 의심되는 현상
어제 컴퓨터가 원인 모르게 꺼져 있었고, 로그 확인하려 했으나, 용량 때문인지, 아무런 로그가 없습니다.

- 증상 결과

[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/centos-root 12253184 12252184 1000 100% /
devtmpfs 929724 0 929724 0% /dev
tmpfs 938876 0 938876 0% /dev/shm
tmpfs 938876 8468 930408 1% /run
tmpfs 938876 0 938876 0% /sys/fs/cgroup
/dev/sda1 508588 182092 326496 36% /boot

[root@localhost ~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/centos-root 38752 34611 4141 90% /
devtmpfs 232431 340 232091 1% /dev
tmpfs 234719 1 234718 1% /dev/shm
tmpfs 234719 356 234363 1% /run
tmpfs 234719 13 234706 1% /sys/fs/cgroup
/dev/sda1 512000 344 511656 1% /boot

[root@localhost ~]# du -sh /*
0 /bin
153M /boot
0 /dev
22M /etc
16K /home
0 /lib
0 /lib64
11G /lost+found
0 /media
0 /mnt
0 /opt
du: cannot access `/proc/2274/task/2274/fd/4': 그런 파일이나 디렉터리가 없습니다
du: cannot access `/proc/2274/task/2274/fdinfo/4': 그런 파일이나 디렉터리가 없습니다
du: cannot access `/proc/2274/fd/4': 그런 파일이나 디렉터리가 없습니다
du: cannot access `/proc/2274/fdinfo/4': 그런 파일이나 디렉터리가 없습니다
0 /proc
44K /root
8.3M /run
0 /sbin
0 /srv
0 /sys
36K /tmp
996M /usr
101M /var

shint의 이미지

du: cannot access `/proc/2274/task/2274/fd/4'

http://blog.naver.com/gauya/220101078983
http://blog.naver.com/aika1/220112958394

이런 방법이 있다고 하네요.

----------------------------------------------------------------------------
젊음'은 모든것을 가능하게 만든다.

매일 1억명이 사용하는 프로그램을 함께 만들어보고 싶습니다.
정규 근로 시간을 지키는. 야근 없는 회사와 거래합니다.

각 분야별. 좋은 책'이나 사이트' 블로그' 링크 소개 받습니다. shintx@naver.com

bushi의 이미지

[root@localhost ~]# df
Filesystem               1K-blocks       Used   Available   Use%   Mounted on
/dev/mapper/centos-root   12253184   12252184        1000   100%   /
...

[root@localhost ~]# du -sh /*
...
11G  /lost+found
...
996M /usr
101M /var

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.