Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
weird space problem with XFS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sammael
n00b
n00b


Joined: 26 Aug 2006
Posts: 15

PostPosted: Wed Aug 30, 2006 6:04 pm    Post subject: weird space problem with XFS Reply with quote

i have a 30GB XFS partition, on which is used ~5GB, but free space is only ~4.9 GB. in fdisk, cfdisk, qtparted, everywhere it shows that it is 30GB partition, but where are those 20GB?

i found out when i ran emerge openoffice, whichcomplained i do not have >5GB free space.

how can i fix this?

this is output of fdisk /dev/hda

Disk /dev/hda: 40.0 GB, 40007761920 bytes
240 heads, 63 sectors/track, 5168 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 5 37768+ 83 Linux
/dev/hda2 6 72 506520 82 Linux swap / Solaris
/dev/hda3 73 5168 38525760 83 Linux

and this is output of df

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 9764800 5098076 4666724 53% /
udev 322148 208 321940 1% /dev
/dev/hda1 36566 4806 29872 14% /boot
/dev/sda1 304085048 95166460 208918588 32% /mnt/stuff
none 322148 0 322148 0% /dev/shm

and finally du -s -h /
6.0G /

i do not know if any other logs would be of any help, if so, please let me know and i will post them
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Thu Aug 31, 2006 8:42 am    Post subject: Reply with quote

could you output
Code:
df -h


I'm also thinking that the partition size doesn't necessarily need to be the same as the filesystem size... so if fdisk reports 30GB, it doesn't mean that your filesystem is also 30GB... that's why I wanna see your df, but in a format that I can understand :D
Back to top
View user's profile Send private message
sammael
n00b
n00b


Joined: 26 Aug 2006
Posts: 15

PostPosted: Thu Aug 31, 2006 9:09 am    Post subject: Reply with quote

alll right, here goes:

high-flyer / # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 9.4G 6.3G 3.1G 67% /
udev 315M 212K 315M 1% /dev
/dev/hda1 36M 9.0M 25M 27% /boot
/dev/sda1 290G 127G 164G 44% /mnt/stuff
/dev/sda2 8.0G 3.3M 7.6G 1% /tmp
none 315M 0 315M 0% /dev/shm

i sure hope it helps, 'cause i don't now what to do next...
Back to top
View user's profile Send private message
DougC
n00b
n00b


Joined: 09 Sep 2004
Posts: 9
Location: Milton Keynes, UK

PostPosted: Thu Aug 31, 2006 10:39 am    Post subject: Reply with quote

It's possible I'm being a bit thick here, but what partition is it exactly that's supposed to be 30Gb?

Is it possible you've got an unmounted partition?
Back to top
View user's profile Send private message
scyld
n00b
n00b


Joined: 31 Jan 2006
Posts: 59

PostPosted: Fri Sep 01, 2006 10:18 am    Post subject: Reply with quote

batistuta wrote:
I'm also thinking that the partition size doesn't necessarily need to be the same as the filesystem size... so if fdisk reports 30GB, it doesn't mean that your filesystem is also 30GB... that's why I wanna see your df, but in a format that I can understand :D

I've got exacly the same problem with XFS... kernel 2.6.17-gentoo-r6.
Emerge gentoo-sources took 3,6GB of space 8O
Rebooting helps for getting correct amount of free space. Running xfs_repair (xfsprogs-2.8.10) does not solve the problem.

I'll switch to kernel 2.6.17-gentoo-r7 maybe it'll solve something.
Back to top
View user's profile Send private message
Sachankara
l33t
l33t


Joined: 11 Jun 2004
Posts: 696
Location: Stockholm, Sweden

PostPosted: Fri Sep 01, 2006 10:31 am    Post subject: Reply with quote

Perhaps this might help: http://oss.sgi.com/projects/xfs/faq.html#dir2
_________________
Gentoo Hardened Linux 2.6.21 + svorak (Swedish dvorak)
Back to top
View user's profile Send private message
scyld
n00b
n00b


Joined: 31 Jan 2006
Posts: 59

PostPosted: Fri Sep 01, 2006 10:37 am    Post subject: Reply with quote

Sachankara wrote:
Perhaps this might help: http://oss.sgi.com/projects/xfs/faq.html#dir2

Nope... this issue is with directory corruption, and:
Quote:
Update: the fix is included in 2.6.17.7 and later kernels.

Quote:
Update: a fixed xfs_repair is now available; version 2.8.10 or later of the xfsprogs package contains the fixed version.

I've used this faq 2 weeks ago and no luck :cry:
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Fri Sep 01, 2006 11:46 am    Post subject: Reply with quote

sammael wrote:
alll right, here goes:
/dev/hda3 9.4G 6.3G 3.1G 67% /
udev 315M 212K 315M 1% /dev
/dev/hda1 36M 9.0M 25M 27% /boot
/dev/sda1 290G 127G 164G 44% /mnt/stuff
/dev/sda2 8.0G 3.3M 7.6G 1% /tmp
none 315M 0 315M 0% /dev/shm

I don't see your 30GB partition. Was that supposed to be your / partition on hda3?
If this is correct, then your filesystem is not 30GB (it's 9.4Gb) regardless of the /hda3 partition reported by fdisk. If I'm correct, this leaves you with three options:
- The filesystem size is not as big as your partition. Solution: type
Code:
# xfs_growfs /
to expand your filesystem to the full partition size. Make sure your partition IS mounted before doing that. And of course backup your data before since I'm not responsible for what this can do.

- your partition is not as big as you think. Show us the partition table output from fdisk in Kb or Mb or something other than blocks
- bug in xfs

In any case, I have no idea why you are using xfs. It's supposed to be a good filesystem for veeery large files, but otherwise it has been known to cause many problems, specially if not properly shutdown. I would seriously consider using another filesystem like reiser3 or ext3 if you care about your data.
Back to top
View user's profile Send private message
sammael
n00b
n00b


Joined: 26 Aug 2006
Posts: 15

PostPosted: Mon Sep 04, 2006 9:27 pm    Post subject: Reply with quote

batistuta wrote:
Code:
# xfs_growfs /
to expand your filesystem to the full partition size. Make sure your partition IS mounted before doing that. And of course backup your data before since I'm not responsible for what this can do.

high-flyer / # xfs_growfs /
/dev/root: No such file or directory
Usage: xfs_growfs [options] mountpoint

high-flyer / # xfs_growfs /dev/hda3
xfs_growfs: /dev/hda3 is not a mounted XFS filesystem

high-flyer / # mount
.
.
.
/dev/hda3 on / type xfs (rw,noatime)
.
.
.
any suggestions?

batistuta wrote:
In any case, I have no idea why you are using xfs. It's supposed to be a good filesystem for veeery large files, but otherwise it has been known to cause many problems, specially if not properly shutdown. I would seriously consider using another filesystem like reiser3 or ext3 if you care about your data.

i, being a total newbie when installing gentoo, accidentally confused xfs with reiserfs :oops: . i don't know about any method of converting xfs partition to reiserfs, apart from doing a clean install for which i do not have time...
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Mon Sep 04, 2006 10:54 pm    Post subject: Reply with quote

copy all your data to another partition and then reformat. Make sure, when you copy, to use the -a flag to keep permisions. If this is not possible because you don't have an extra partition you can

- Consider getting a new hard drive (they are reaaaally cheap nowadays)
- Backup to CDrom or DVD. There are scripts for doing that (stage4) or you can use kdar. It's always good to have a backup system, and it might be a good idea to already set up one now...
Back to top
View user's profile Send private message
sammael
n00b
n00b


Joined: 26 Aug 2006
Posts: 15

PostPosted: Mon Sep 04, 2006 11:57 pm    Post subject: Reply with quote

Code:
# xfs_growfs /

thank you for making me aware of this command, i rebooted to slax livecd, typed it and voila my filesystem has 40GB now.

if i may, one final question:
as unintentional shutdowns occur nearly not at all in my case, what else would i gain with reformatting to reiserfs? is reiserfs faster than xfs? it's an older laptop 5400 rpm drive, so i'd like to format it with some fast filesystem.

thanks again for your time and patience...
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Tue Sep 05, 2006 6:59 am    Post subject: Reply with quote

First let me say that I'm not an expert on filesystems, neither have I experienced any particular difference from one filesystem to the other. They all perform pretty much the same on my desktop. That said, I like to play with them, and I can repeat what I've read maaaany times.

reiser/Reiser4 are good for many small files. So if you run a mail server with milions of small files, you will see the difference. In a desktop, probably not much. Reiser4 is supposed to be much faster at the expense of more CPU power, which is a good thing in modern computers where HD are bottleneck. Reiser is more suceptible to fragmentation compared to ext3. This one I DID experience myself!! So I would really suggest to avoid using reiser with /usr/portage (I haven't tried reiser4 though)

So if all filesystems perform more or less the same for a desktop, I'd go for one of the following options:
- Experiment with what you like, but backup often
- Go for something safe

The safest filesystems, as far as I understand (grain of salt please) are ext3 and then reiser (not reiser4 which is not stable). My linux almost never crashes, and I almost never get a power failure. When my power supply failed was always during power-up. So in theory the shutdown problem of xfs is not a typical case, but it *could* happen. So it is up to you to evaluate whether the risk is worth it. If you ask me, I'd say playing with data is not a smart choice, specially the /home partition. But then you should evaluate that yourself. Whatever you end up doing, make sure to backup your important data often.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum