You are not logged in.

#1 2012-02-25 18:59:10

raxbg
Member
Registered: 2011-04-05
Posts: 105

Bugged home folder

Hi, can my home get bugged? The reason I think so is because everytime an installation of something fails the space used is not recovered. Here is an example: Before about 2 months I tried to install autocad through wine and the installation crashed somewhere in the middle and the space that was already taken did not recover after the crash. I deleted the .wine folder hoping that it might be hidden somehow, but this didn't help. I tought it might be some wine bug. It was like that up until today when I tried to install a game (regnum the linux version) and it at about 70 percent(reason was my /tmp ran out of space) and the space accupied during the installation was again not freed. A friend of mine also using arch x64 said he never had such problems and his space is always recovered. So can my /home be bugged? And can I somehow restore the lost space? There are about 8 gig wandering in the open space big_smile

Offline

#2 2012-02-25 19:17:44

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Bugged home folder

Try running something like the following: (in your /home/user/ directory)

du -h --max-depth=1 | sort -rh

Or use ncdu (pacman -S ncdu).
Then try work out where the space is going.

Edit: There's not much we can do if you don't tell us anything about your mountpoints / df output.

Last edited by Earnestly (2012-02-25 19:18:49)

Offline

#3 2012-02-25 19:35:44

raxbg
Member
Registered: 2011-04-05
Posts: 105

Re: Bugged home folder

The command u suggested did not work. --max-depth=1 is not recognized. Here is my df -h output ->

Filesystem      Size  Used Avail Use% Mounted on
rootfs           11G  9.8G  552M  95% /
/dev            1.5G     0  1.5G   0% /dev
/run            1.5G  308K  1.5G   1% /run
/dev/sda8        11G  9.8G  552M  95% /
shm             1.5G  3.8M  1.5G   1% /dev/shm
/dev/sda10       14G   13G  302M  98% /home
/dev/sda9       242M   32M  197M  14% /boot
tmpfs           1.5G  168K  1.5G   1% /tmp

Offline

#4 2012-02-25 20:39:31

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Bugged home folder

That's very strange, from man du:

--max-depth=N
    print the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument; --max-depth=0 is the same as --summarize

The problem with df in this instance is it's not detailed enough to work out much., however, I see that /tmp is mounted as tmpfs which is good.

I honestly recommend trying that command (or something that will list the biggest files in your /home directory) -- perhaps you typed it incorrectly?
Get ncdu from the repos and run that in your /home. It will give you a nice list you can dig through and hunt down any offending files.

(PS: 14G is pretty small for /home and gaming)

Last edited by Earnestly (2012-02-25 20:45:41)

Offline

#5 2012-02-26 12:39:51

raxbg
Member
Registered: 2011-04-05
Posts: 105

Re: Bugged home folder

Sorry for the late reply, I usually don't play games but just wanted to try this one. Anyway ncdu gave me this  "Total disk usage:  11.9GiB  Apparent size:  11.8GiB "
How is this possible when it must be 14 gig drive? 2 gigs are lost somewhere

Offline

#6 2012-02-26 14:45:09

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Bugged home folder

I assume you're using ext4.

The disparity can sometimes be due to reserved blocks, usually set to 5%. (Which only accounts for ~1G of 14G).
To check the size of your reserved block run the command:

# Where X is your drive and [0-9] is the partition number 
sudo tune2fs -l /dev/sdX[0-9] | grep "Reserved block count"

You can alter this size by using:

# where X = number, percentage
sudo tune2fs -m X /dev/sdX[0-9]
man tune2fs wrote:

-m reserved-blocks-percentage
Set the percentage of the filesystem which may only be allocated by privileged processes. Reserving some number of filesystem blocks for use by privileged processes is done to avoid filesystem fragmentation, and to allow system daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. Normally, the default percentage of reserved blocks is 5%.

This should be safe on non-root partitions unless you're doing a lot of IO over a long period of time.
Other than that, you'll probably need to do some digging on your own. (Unless someone else knows what the problem might be as I've not encountered it yet).

Last edited by Earnestly (2012-02-26 14:48:29)

Offline

#7 2012-02-26 21:50:24

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: Bugged home folder

raxbg wrote:

The command u suggested did not work. --max-depth=1 is not recognized.

You are using Arch aren't you...?

Also, please use code tags to make output easier to read:

Filesystem      Size  Used Avail Use% Mounted on
rootfs           11G  9.8G  552M  95% /
/dev            1.5G     0  1.5G   0% /dev
/run            1.5G  308K  1.5G   1% /run
/dev/sda8        11G  9.8G  552M  95% /
shm             1.5G  3.8M  1.5G   1% /dev/shm
/dev/sda10       14G   13G  302M  98% /home
/dev/sda9       242M   32M  197M  14% /boot
tmpfs           1.5G  168K  1.5G   1% /tmp

Offline

#8 2012-02-26 23:51:21

raxbg
Member
Registered: 2011-04-05
Posts: 105

Re: Bugged home folder

Kaustic, yes its ext4 partition. I ran what u suggested and it gave

 Reserved block count:     178920 

Isn't this around 170 mb? Very strange huh.

Offline

#9 2012-02-27 00:38:43

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Bugged home folder

The only other thing I can think of doing is running lsof (Pacman it)

lsof +L1
# or
lsof | grep deleted

There might be a bunch of unlinked files on your system, however (you've probably done this numerous times), it should be cleared when you end the process causing the issue. Logout or reboot if you're unsure.
Other obvious things also include; checking your fstab for any potential issues or even running a fsck (make sure to unmount before doing that).

Other than that, I honestly don't know what else to suggest. hmm

Last edited by Earnestly (2012-02-27 00:39:38)

Offline

Board footer

Powered by FluxBB