PDA

View Full Version : Disk Problem - Help to recover 4G disk space



pau1knopp
01-28-2006, 02:17 PM
I have a non-system disk partition (hdb1) that filled up, and I could not read or write anything to it till I went into .Trash-0 and .Trash-1000 on that partition and manually deleted the items in the files subdirectory inside. However, now it looks as if I "lost" 4G of disk space. when I run a df -h command I see the following:

Filesystem Size Used Avail Use% Mounted on
/UNIONFS/dev/hdb1 76G 71G 1.1G 99% /mnt/hdb

It seems like it *should* say 5G available and not 1.1G available. The fsck command says that the ext2 partition is clean, so I am not sure what to try next. Any suggestions would be greatly appreciated.

Best regards to the group,

Paul

nad
01-31-2006, 02:55 PM
By default, an ext2 filesystem reserves 5% for the superuser. If you have emptied all of your trash, this could be your problem. Use tune2fs to adjust this amount. On the other hand, a file system that has seen this kind of use can become seriously fragmented. Copying to a clean partition will resolve this.

pau1knopp
02-01-2006, 07:49 PM
nad,

thanks for the reply... couple o' questions

if i copy the data to another partition, then copy it back, will i (to the best of your knowlege) recover this disk space?

also, what (if any) downsides are there to changing the amount of disk space reserved to superuser? The tune2fs trick definately seems to be working. what does superuser need with this disk space anyways?

regards,

paul

nad
02-04-2006, 12:15 AM
Copying the files off then back may free up a small amount of blocks. The main reason is for disk performance and reorganizing to free up larger contiguous blocks (especially if you are streaming data such as music).

The reserved amount is basically for a one disk system. Just to start up, an OS needs space to append to log files and such. If this is a second drive, you may decrease this percentage (1% will still leave you ~750MB) without worry.

Just keep in mind that a nearly full file system is an invitation to disaster. Decreasing the space available for any overhead needed by the system must be monitored.