Forum
Showing used space -but cant find where - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: Showing used space -but cant find where (/thread-1064.html)

Pages: 1 2


Showing used space -but cant find where - anthonyonions - 30th Jun, 2013 06:29 PM

Ive moved some movies that have finished downloading but I'm still showing 2.9g used space when running df -h.

I've also run 'find // -xdev -type f -size +10000000c -exec ls -ladh {} \;' but nothing is coming up there.

Anyone have any other ideas on how I can see where this space has gone to?

Thanks
Ant


RE: Showing used space -but cant find where - mk01 - 1st Jul, 2013 11:50 AM

ext4 or btrfs ?


RE: Showing used space -but cant find where - anthonyonions - 1st Jul, 2013 04:40 PM

how do I check that? It showing under the rootfs as / if that helps?

Thanks
Ant


RE: Showing used space -but cant find where - mk01 - 1st Jul, 2013 07:40 PM

if you run "mount" you will see line like this:
Code:
/dev/mmcblk0p2 on / type btrfs (rw,noatime,thread_pool=1,compress=lzo,ssd,space_cache,autodefrag)

the one column in red is fstype.
ok so no tags inside those windows, BTRFS (fifth column)


RE: Showing used space -but cant find where - anthonyonions - 1st Jul, 2013 07:53 PM

Ok thanks for that. I'll have a look when I'm at home tonight and post back.


RE: Showing used space -but cant find where - anthonyonions - 2nd Jul, 2013 03:59 AM

/dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)

So it's ext4. Any ideas what I need to do to find what's taking this space up?

Thanks
Ant


RE: Showing used space -but cant find where - mk01 - 2nd Jul, 2013 04:37 AM

isn't any folder with content mounted with network over it?

then it would be "hidden" to your searches.

if all unmounted, do "du -xhd1 / | sort -rh ", you will get list of top level folders by occupied space. then take the one really big, and change the "/" to the folder, like "du -xhd1 /usr | sort -rh" ... and with recursive approach you will hopefully find the cause.


RE: Showing used space -but cant find where - anthonyonions - 2nd Jul, 2013 04:35 PM

ok thanks will give that a go. I normally move the directories to a mounted NAS drive, so I would likely start with something there.

I'll report back my findings.

Thanks again.
Ant


RE: Showing used space -but cant find where - anthonyonions - 3rd Jul, 2013 03:08 AM

Ok I've run the above with the NAS drive turned off, and got the following:


root@xbian /home/xbian # df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 7.3G 2.9G 4.4G 40% /
/dev/mmcblk0p2 7.3G 2.9G 4.4G 40% /
tmpfs 38M 240K 38M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 10M 0 10M 0% /dev
tmpfs 75M 0 75M 0% /run/shm
/dev/mmcblk0p1 34M 11M 23M 33% /boot
root@xbian /home/xbian # du -xhd1 / | sort -rh
553M /usr
50M /lib
15M /home
7.0M /sbin
3.6M /etc
40K /root
36K /media
16K /mnt
4.0K /srv
4.0K /selinux
0 /proc
0 /dev

To me that looks ok.

Thought I found something then. There were 2 files, both 1.3g in size in /var/log/samba - but deleting them has done nothing to the used space!


RE: Showing used space -but cant find where - mk01 - 3rd Jul, 2013 03:48 AM

(3rd Jul, 2013 03:08 AM)anthonyonions Wrote:  Thought I found something then. There were 2 files, both 1.3g in size in /var/log/samba - but deleting them has done nothing to the used space!

run e2fsck on unmounted partition.


RE: Showing used space -but cant find where - anthonyonions - 3rd Jul, 2013 04:21 AM

ok I'm lost now. What would I run it against? Not sure what the unmounted partition would be in my case.

I think this space issue came from an rsync that didn't finish nicely. I think my ssh client (on iPad) timed out and didn't finish the script that was running - if this sheds any more light on what might be the issue.


RE: Showing used space -but cant find where - mk01 - 3rd Jul, 2013 05:14 AM

if you are on alpha5, try initramfs fail by changing root= to a disk which does not exists. it will write error (root not accessible) and drop to shell.

then, run e2fsck /dev/mmcblk0p2

then change cmdline.txt back

or take the card out put into other linux booted system and fix there.


RE: Showing used space -but cant find where - anthonyonions - 3rd Jul, 2013 05:20 AM

Ok thanks for your help. I am on Alpha5, but this is all waaaay beyond my unix skills. I think I'll just reinstall the SD again and set it up from scratch.

Thanks again for trying.
Ant


RE: Showing used space -but cant find where - mk01 - 3rd Jul, 2013 07:59 AM

ok, so :

edit /boot/cmdline.txt
find root=/dev/mmcblk0p2 and change it to root=/dev/nothing

reboot

you will get command prompt with error message (not important)

run "e2fsck /dev/mmcblk0p2"

then edit /boot/cmdline.txt again with those steps:
mount -t vfat /dev/mmcblk0p1 /tmp
vi /tmp/cmdline.txt

in the vi editor, you have to press "i" to start editing
change root= to root=/dev/mmcblk0p2
now:
press ESC, then ":" and "w". hit enter
then run
umount /tmp; sync
reboot -f


RE: Showing used space -but cant find where - anthonyonions - 3rd Jul, 2013 05:32 PM

Great thanks, I will give these steps a go. Thanks for dumbing them down to my level :-)