Page 1 of 1
XFS and file allocation
Posted: Tue Jan 06, 2009 7:04 pm
by cbrigstocke
I'm hoping that somewhere down the road that xfs specific file allocation will be an option. Any chance?
Thanks.
Re: XFS and file allocation
Posted: Wed Jan 07, 2009 5:36 am
by andar
What do you mean?
I'm pretty sure XFS supports sparse file allocation. What more does one need?
Re: XFS and file allocation
Posted: Thu Jan 08, 2009 12:46 pm
by lvm
I store torrents on xfs and may confirm that you are unfortunately correct. Unfortunately, because deluge uses sparse file in full allocation mode, and even though FAQ describes it as a feature it is a whopping bug. Sparse allocation kills the very idea of full allocation which is eh... to allocate space fully and immediately. Sparse mode should be used for compact allocation.
Re: XFS and file allocation
Posted: Sat Jan 10, 2009 4:33 pm
by Ux64
And when using full allocation, pre-allocation should be done anyway to prevent needless fragmentaition.
AFAIK, every program should use pre-allocation if file system supports it, if file size is known.
Ext3 doesn't support pre-allocation without patch, but NTFS, Ext4 and BtrFS do.
Re: XFS and file allocation
Posted: Mon Jan 12, 2009 8:19 pm
by cbrigstocke
Let me preface by letting you all know that I'm by no means an expert. My downloads are very fragmented even when using deluge. I know this because I can watch them defrag using xfs_fsr, and so it's not a huge deal since the fragmentation is easily fixed. It would be nice to not have to do it though.
I read somewhere that sparse file allocation doesn't work well with XFS. Maybe fallocate works with xfs and also xfs_io from xfsprogs should work.
Thanks again for all the great work.
Re: XFS and file allocation
Posted: Sat Jan 17, 2009 12:44 pm
by lvm
cbrigstocke wrote:Let me preface by letting you all know that I'm by no means an expert. My downloads are very fragmented even when using deluge. I know this because I can watch them defrag using xfs_fsr, and so it's not a huge deal since the fragmentation is easily fixed. It would be nice to not have to do it though.
I read somewhere that sparse file allocation doesn't work well with XFS. Maybe fallocate works with xfs and also xfs_io from xfsprogs should work.
Sparse allocation works more or less the same on all filesystems and using it is the best way to get file fragmented as much as possible - the exact opposite of full allocation.
Maybe fallocate works with xfs and also xfs_io from xfsprogs should work
I believe plain lseek to the planned file size should do the trick on all filesystems.