[SOLVED]Strange disk space problem....

New to SolydXK? This is the place to start.
Please check the other subforums to see if there's a more suitable place for your question.
toothandnail
Posts: 94
Joined: 02 Jun 2013 18:45
Location: Oxfordshire, UK

[SOLVED]Strange disk space problem....

Postby toothandnail » 29 Apr 2014 14:19

This doesn't seem quite the right place, but I'm not sure where else to put it...

I've had SolydX 64-bit installed on a desktop machine (HP dc7900) for quite a while. I've been too busy to do much with it for a while, but saw the update come through a little while ago and installed it, which seemed to go without any problems.

I've now hit a really odd problem. I've got a 500 GB disk in the machine, partitioned as below:

Code: Select all

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63     1959929      979933+  82  Linux swap / Solaris
/dev/sda2         1959930   976773167   487406619    5  Extended
/dev/sda5         1959993    31262489    14651248+  83  Linux
/dev/sda6        31262553   976773167   472755307+  83  Linux
That leaves around 15 GB for /, with most of the disk used for the /home partition. A day or two ago, I tried to update the Synaptic package lists, and got an error - no space left on device.

I've had a look and indeed, there is almost no space left on the / partition, but I can't work out what is using all the space. I've uninstalled older kernels, and cleaned up everything I could, but I've still only got around a GB of free space.

I ran baobab using sudo, and it shows 13 GB used for the root directory of the partition used for /, but there is nothing visible and none of the directory contents seem to add up to such a big figure.

So I'm wondering if something has compromised the system? I've run both rkhunter and tripwire, neither of which report any problems, but I'm having no luck working out what has eaten all my free space.

Any ideas before I low level format the disk and start again? If nothing else, my broadband connection is suffering at the moment, so I'm not keen on downloading the new SolydX iso until that is fixed, and I'd be pushed for time to reinstall and get the apps I need back and working, so I'd love not to have to go the reinstall route.

Paul.

User avatar
zerozero
Posts: 5373
Joined: 10 Feb 2013 23:37
Location: West Midlands, England
Contact:

Re: Strange disk space problem....

Postby zerozero » 29 Apr 2014 15:34

i might be wrong but the first place i would look would be /var/log
bliss of ignorance

toothandnail
Posts: 94
Joined: 02 Jun 2013 18:45
Location: Oxfordshire, UK

Re: Strange disk space problem....

Postby toothandnail » 29 Apr 2014 15:41

zerozero wrote:i might be wrong but the first place i would look would be /var/log
:( No, total for all of /var is only 1.3 GB. I have no idea what is eating all that space...

Paul.

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Strange disk space problem....

Postby just » 29 Apr 2014 16:15

why not to try the good old-fashioned disk usage (du) command?

some examples (all with -h to get human readable answers):

1) how big some dir is (-s = summary)?

Code: Select all

just@alexsok ~ $ du -sh $HOME
1.7G    /home/just
just@alexsok ~ $ 
2) details about some dir (-a = all files and dirs):

Code: Select all

just@alexsok ~ $ du -ah $HOME
...<very-long-output-that-ends-up-with:>
4.0K    /home/just/.conky-steel-amber/config/conkyrc2
28K     /home/just/.conky-steel-amber/config
264K    /home/just/.conky-steel-amber
4.0K    /home/just/.bashrc.dpkg-dist
4.0K    /home/just/.gnome2/accels
8.0K    /home/just/.gnome2
4.0K    /home/just/.conky-two/conkyrc
4.0K    /home/just/.conky-two/start-conky-two.sh
8.0K    /home/just/.conky-two/rings-v1.2.1.lua
20K     /home/just/.conky-two
4.0K    /home/just/.pki/nssdb/pkcs11.txt
12K     /home/just/.pki/nssdb/cert9.db
12K     /home/just/.pki/nssdb/key4.db
32K     /home/just/.pki/nssdb
36K     /home/just/.pki
1.7G    /home/just/
just@alexsok ~ $
3) to exclude some files use --exclude option:

Code: Select all

just@alexsok ~ $ du -ah --exclude "*.conky*" $HOME
...<very-long-output-that-ends-up-with:>
100K    /home/just/.macromedia/Flash_Player/#SharedObjects/D7PVHRJC
104K    /home/just/.macromedia/Flash_Player/#SharedObjects
168K    /home/just/.macromedia/Flash_Player
172K    /home/just/.macromedia
4.0K    /home/just/dsk/.directory
8.0K    /home/just/dsk
4.0K    /home/just/.bashrc.dpkg-dist
4.0K    /home/just/.gnome2/accels
8.0K    /home/just/.gnome2
4.0K    /home/just/.pki/nssdb/pkcs11.txt
12K     /home/just/.pki/nssdb/cert9.db
12K     /home/just/.pki/nssdb/key4.db
32K     /home/just/.pki/nssdb
36K     /home/just/.pki
1.6G    /home/just
just@alexsok ~ $ 
no more .conky* included.

4) we can even discover when we created our space-eaters, with --time option:

Code: Select all

just@alexsok ~ $ du -ah --exclude "*.conky*" --time $HOME
...<very-long-output-that-ends-up-with:>
/home/just/.macromedia/Flash_Player/#SharedObjects
168K    2014-04-20 05:31        /home/just/.macromedia/Flash_Player
172K    2014-04-20 05:31        /home/just/.macromedia
4.0K    2014-01-27 19:54        /home/just/dsk/.directory
8.0K    2014-01-27 19:54        /home/just/dsk
4.0K    2014-01-27 19:54        /home/just/.bashrc.dpkg-dist
4.0K    2014-01-27 21:51        /home/just/.gnome2/accels
8.0K    2014-02-23 20:12        /home/just/.gnome2
4.0K    2014-03-20 21:06        /home/just/.pki/nssdb/pkcs11.txt
12K     2014-03-20 21:06        /home/just/.pki/nssdb/cert9.db
12K     2014-03-20 21:06        /home/just/.pki/nssdb/key4.db
32K     2014-03-20 21:06        /home/just/.pki/nssdb
36K     2014-03-20 21:06        /home/just/.pki
1.6G    2014-04-29 17:51        /home/just
just@alexsok ~ $ 
all these (and more, du --help) commands may be executed for *any* dir, / included. just run it as root. and save the output somehow - it will be *extremely* long:

5) details about / situation:

Code: Select all

alexsok just # du -ah --time / > du-example
du: cannot access ‘/proc/11557/task/11557/fd/4’: No such file or directory
du: cannot access ‘/proc/11557/task/11557/fdinfo/4’: No such file or directory
du: cannot access ‘/proc/11557/fd/4’: No such file or directory
du: cannot access ‘/proc/11557/fdinfo/4’: No such file or directory
alexsok just # exit
just@alexsok ~ $ 
just be patient - it took about 6 mins to finish here, and produced some 320 MiB du-example.

it's a pity you aren't on kde - kdirstat could be of great help for you. maybe filelight doesn't require many dependencies on xfce? don't now. both are in standard solyd repos.

toothandnail
Posts: 94
Joined: 02 Jun 2013 18:45
Location: Oxfordshire, UK

Re: Strange disk space problem....

Postby toothandnail » 29 Apr 2014 16:36

:) That's exactly what I have done. Which didn't show anything significant, so I tried baobab as well, which wasn't much more help.

Paul.

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Strange disk space problem....

Postby just » 29 Apr 2014 17:31

toothandnail wrote:
That's exactly what...
don't want to insist, but let's try smth *slightly* :) different. try to sort du's output, maybe in reverse order. you'll get the biggest files/dirs at the top of the listing:

Code: Select all

just@alexsok ~ $ du -ah $HOME | sort -rh | less
2.0G    /home/just
1.1G    /home/just/.steam
635M    /home/just/.steam/ubuntu12_32
321M    /home/just/du-example
310M    /home/just/.steam/ubuntu12_32/steam-runtime
205M    /home/just/.steam/package
196M    /home/just/.config/chromium
196M    /home/just/.config
174M    /home/just/.config/chromium/Default
157M    /home/just/.config/chromium/Default/Extensions
155M    /home/just/.steam/ubuntu12_32/steam-runtime/i386
155M    /home/just/.steam/ubuntu12_32/steam-runtime/amd64
150M    /home/just/.local/share
150M    /home/just/.local
149M    /home/just/.local/share/akonadi/db_data
149M    /home/just/.local/share/akonadi
148M    /home/just/.steam/ubuntu12_32/steam-runtime/i386/usr
148M    /home/just/.steam/ubuntu12_32/steam-runtime/amd64/usr
96M     /home/just/.cache
94M     /home/just/.steam/ubuntu12_32/steam-runtime.tar.xz
78M     /home/just/.mozilla/firefox/mwad0hks.default
78M     /home/just/.mozilla/firefox
78M     /home/just/.mozilla
77M     /home/just/.steam/ubuntu12_32/steam-runtime/i386/usr/lib
75M     /home/just/.steam/ubuntu12_32/steam-runtime/amd64/usr/lib
:
otherwise, if you are decided to go for a (low level) format, try to get kdirstat before doing it. it's a graphical du's analog. i have no SolydX available right now, but simulating its installation on fedora 20 cinnamon it wants to get 32M of various kde- and qt-dependencies.

there *must* be smth that eats all that space! for me, it was a very bad surprise to discover that my own home dir, with only a dozen of thoroughly created symlinks in it, is 1.6G large :shock: . i thought it was not more than 4..8K. in my case, almost all that space is stolen by .steam dir. even though all its game/data files reside on another partition.

toothandnail
Posts: 94
Joined: 02 Jun 2013 18:45
Location: Oxfordshire, UK

Re: Strange disk space problem....

Postby toothandnail » 29 Apr 2014 22:56

:) Thanks. The reverse sort by size finally showed me what the problem was....

First time I tried it, I forgot to umount the NFS shares that I normally have connected. Which made it take quite a while to go through. Not to mention making the list slow to read. So I went back, umounted all 3, then tried again.

When I read the second list, I found references to things that should only be there when one of the NFS shares is mounted. Had a look and found that there must have been a failure in the mount at some stage, and my script needs a bit more error checking. There was a 7.5 GB backup archive sitting in /mnt/icy/backup. Move that to where it should have been and the results look a lot healthier:

Code: Select all

fang@deneb:/$ df -h --total
Filesystem                   Size  Used Avail Use% Mounted on
/dev/sda5                     14G  5.0G  8.0G  39% /
udev                          10M     0   10M   0% /dev
tmpfs                        195M  800K  194M   1% /run
tmpfs                        5.0M     0  5.0M   0% /run/lock
tmpfs                        580M   92K  580M   1% /run/shm
/dev/sda6                    451G   63G  389G  14% /home
sms:/home/files/data-1/stor  932G  355G  577G  39% /mnt/sms
openwrt:/mnt/sda2/stor       466G  420G   46G  91% /mnt/icy
openwrt:/mnt/sdb1/stor       466G   31G  435G   7% /mnt/icy2
total                        2.3T  873G  1.5T  38% -                           
:) /dev/sda5 is the / partition, now showing8.0 GB free....

Now all I have to do is work out why the backup was so big - should be less than 2 GB

Thanks for the suggestion.

Paul.

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Strange disk space problem....

Postby just » 30 Apr 2014 03:36

glad you have it (almost) solved.


Return to “Newbie Questions”

Who is online

Users browsing this forum: No registered users and 6 guests