reynierpm at gmail.com
2015-Sep-11 18:57 UTC
[CentOS] Cannot open: No space left on device
I have a VBox VM running CentOS 6.7 and I want to extract the content of a 14G tar file. I'm doing as: *tar -xvf www.tar.gz* But I am getting a lot of errors like the ones shown below: html/elclarinweb.dev/wp-content/uploads/2015/03/12-Aura-?vila-400x320.jpg tar: html/elclarinweb.dev/wp-content/uploads/2015/03/12-Aura-?vila-400x320.jpg: Cannot open: No space left on device html/elclarinweb.dev/wp-content/uploads/2015/03/Julianne-Moore-11-585x378.jpg tar: html/elclarinweb.dev/wp-content/uploads/2015/03/Julianne-Moore-11-585x378.jpg: Cannot open: No space left on device So, trying to find why the VHDD (Virtual HDD) has left out of space I ran the following command: *df -h* Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_server-lv_root 26G 24G 869M 97% / tmpfs 2.0G 0 2.0G 0% /dev/shm /dev/sda1 477M 80M 373M 18% /boot And then I've tried to find the conflictive files by running: *du -hsx * | sort -rh | head -10* du: cannot access `proc/3662/task/3662/fd/4': No such file or directory du: cannot access `proc/3662/task/3662/fdinfo/4': No such file or directory du: cannot access `proc/3662/fd/4': No such file or directory du: cannot access `proc/3662/fdinfo/4': No such file or directory 14G var 1.8G usr 278M lib 77M boot 31M etc 27M lib64 15M sbin 7.8M bin 188K dev 112K root Why *df -h* is reporting 24G used? Where the space did go? How I can fix this?
On Sep 11, 2015, at 12:57 PM, reynierpm at gmail.com wrote:> > html/elclarinweb.dev/wp-content/uploads/2015/03/12-Aura-?vila-400x320.jpg: > Cannot open: No space left on device > > *df -h* > Filesystem Size Used Avail Use% Mounted on > /dev/mapper/vg_server-lv_root 26G 24G 869M 97% /Linux boxes typically reserve the last 5% of volume space for use by root only, so as far as your normal user is concerned, the volume is in fact full.> *du -hsx * | sort -rh | head -10* > du: cannot access `proc/3662/task/3662/fd/4': No such file or directory > du: cannot access `proc/3662/task/3662/fdinfo/4': No such file or directory > du: cannot access `proc/3662/fd/4': No such file or directory > du: cannot access `proc/3662/fdinfo/4': No such file or directoryYou need to be careful with commands that descend into /proc like that, because its contents changes rapidly. Here, you?ve seen that PID 3662 disappeared between the time your * glob was evaluated and the du command actually tried to run on it. Your du -x argument says restrict to a single filesystem, but that is evaluated per FILE argument, so it doesn?t prevent du from walking off the LVM and into /proc. To do that, you?d need to say ?du -hsx /?, but then you don?t get the results you want. Instead, I?d recommend just explicitly listing the most likely pigs: /usr, /var, /home, and /etc.> 14G var > 1.8G usr > 278M lib > 77M boot > 31M etc > 27M lib64 > 15M sbin > 7.8M bin > 188K dev > 112K rootI see about 16 GiB.> Why *df -h* is reporting 24G used? Where the space did go? How I can fix > this?24 - 16 = 8, which sounds suspiciously like the size of a swap file. What does mount say?
reynierpm at gmail.com
2015-Sep-11 19:18 UTC
[CentOS] Cannot open: No space left on device
On Fri, Sep 11, 2015 at 2:45 PM, Warren Young <wyml at etr-usa.com> wrote:> 24 - 16 = 8, which sounds suspiciously like the size of a swap file. What > does mount say?What do you mean with "mount says"? Can you point me on the right command to execute?
On 09/11/2015 11:57 AM, reynierpm at gmail.com wrote:> Why*df -h* is reporting 24G used? Where the space did go? How I can fix > this?This is a FAQ. For future reference, you can locate such files in Linux: ls -l /proc/*/fd | grep deleted Deleted files are still present in the filesystem until they are closed.