You are not logged in.

#1 2010-04-06 00:31:09

bmdavll
Member
Registered: 2009-09-07
Posts: 7

[SOLVED] Ext2fsd and disappearing disk space

Hi everyone,

I've been using Arch for a while but still consider myself a newbie in terms of file system utilities. I dual-boot and installed Ext2Fsd 0.48 in order to access my ext3 /home partition in Windows XP. This setup has been working fine for a while. However, today I couldn't start Xfce because the system reported that I had no free space left in my /home partition (according to 'df'). This is clearly not the case since in Windows I had hundreds of MB left and I could save files to the drive. In order to log in, I had to go into the console and delete some files to free up space.

The problem remains though that 'df' is misreporting the free space available (it says ~200 MB is free even though I see >1 GB free in Windows). So a good chunk of the partition is just misrepresented as being used in Linux. Is it possible that Ext2Fsd is not freeing up disk space when I delete files in Windows? What utilities can I run to check the partition and possibly reclaim the free disk space? Thanks in advance for any help.

Last edited by bmdavll (2010-04-16 09:47:37)

Offline

#2 2010-04-06 00:34:43

schen
Member
Registered: 2009-06-06
Posts: 468

Re: [SOLVED] Ext2fsd and disappearing disk space

I'm not sure, but perhaps an fsck would work. Make sure you unmount the drive you fsck! However, I don't think an fsck would work.

Last edited by schen (2010-04-06 00:38:30)

Offline

#3 2010-04-06 17:17:09

bmdavll
Member
Registered: 2009-09-07
Posts: 7

Re: [SOLVED] Ext2fsd and disappearing disk space

I'm not sure, but perhaps an fsck would work.

I tried fsck and 'fsck.ext3 -fpv' (with the partition unmounted), but that didn't fix the problem. I wish Ext2Fsd had a forum where I could ask this question.

Offline

#4 2010-04-08 16:43:35

bmdavll
Member
Registered: 2009-09-07
Posts: 7

Re: [SOLVED] Ext2fsd and disappearing disk space

I tried to use a cheap solution but all I got was more weirdness. I filled up the partition with junk in Windows, thinking I would be able to delete the junk in the Linux console and reclaim the actual free space. This is what I got:

# df
Filesystem    1K-blocks   Used        Available  Use%    Mounted on
...
/dev/sda7     18766564    18241584    0          100%    /home

I should have about 500 MB of free space after the deletion, but it still thinks I have no free blocks. I tried searching everywhere for a solution; any suggestions would be greatly appreciated!

Offline

#5 2010-04-16 01:04:05

bmdavll
Member
Registered: 2009-09-07
Posts: 7

Re: [SOLVED] Ext2fsd and disappearing disk space

Bump...anyone?

Offline

#6 2010-04-16 07:54:02

charlieapples
Member
Registered: 2010-03-28
Posts: 16

Re: [SOLVED] Ext2fsd and disappearing disk space

I'd suggest the following (I have not had exactly this problem, but something similar, and though I never discovered why it happened, the steps here make some sense).

I recommend you do most of this with a Linux Live CD such as SystemrescueCD so that you work on your files without the risk of them changing while you work.
Use the console or a Linux Live CD to remove whatever junk is on your home partition that you don't want to keep.
Backup the files on the partition to separate media in such a way as to preserve their permissions and ownership info (tar lets you do this, as does cp to a certain extent - see http://wiki.archlinux.org/index.php/Tar) - don't forget the hidden files (Not patronising, tar is a bastard)
Delete the  /home partition and recreate it.
Copy your files back

You should then be able to boot up normally and any space you had should have returned, though take care to update you UUID in your fstab if you use that sort of thing.

Personally, I use a separate NTFS partition for files I wish to share to windows, because I neither trust Ext2Fsd nor ntfs-3g to mess with my /home.

Offline

#7 2010-04-16 09:45:50

bmdavll
Member
Registered: 2009-09-07
Posts: 7

Re: [SOLVED] Ext2fsd and disappearing disk space

Thanks schen and charlieapples; that was good advice. In case anyone else encounters a similar problem, here's the solution: (post from Ubuntu Forums)

The ext2/3/4 filesystems support a "reserved blocks" setting, in which a certain percentage of disk space (normally 5%) may only be used by root. Your df output indicates 18,766,564 1K blocks on /home, 5% of which is 938,328.2 1K blocks, or about 916MB, so you can't create files as a normal user until over 916MB is free.

You can change the reserved blocks percentage by using tune2fs:

sudo tune2fs -m 0 /dev/sda7

This command sets it to 0%, which is reasonable on a /home partition. (1% is also reasonable, but there's little point to having it higher than that on /home.)

This feature exists to enable root to log in and do maintenance on a system that's run out of disk space because of user activity. Direct root logins aren't possible on a default Ubuntu installation, though, and this feature is most important on the root (/) filesystem, not on /home or most other filesystems that hold user data.

Essentially, my /home partition had some blocks reserved. Ext2Fsd didn't check or respect that and let me write to the partition past the reserved limit. Then when I'd boot into Linux, the /home partition would show up as effectively 100% full.

Last edited by bmdavll (2010-04-16 09:52:04)

Offline

Board footer

Powered by FluxBB