mkfs.xfs -n size=65536

Al Lau (alau2) alau2 at cisco.com
Tue Oct 13 02:28:48 CDT 2015


Are the xfs_db and filefrag the utilities to use to determine file fragmentation?

# df -k /var/kmem_alloc
Filesystem      1K-blocks       Used Available Use% Mounted on
/dev/sdf1      3905109820 3359385616 545724204  87% /var/kmem_alloc
# xfs_db -r -c frag /dev/sdf1 
actual 438970, ideal 388168, fragmentation factor 11.57%

# ls -l fragmented
-rw-r--r--. 1 root root 3360239878657 Oct 13 07:25 fragmented
# filefrag fragmented 
fragmented: 385533 extents found

Thanks,
-Al
-----Original Message-----
From: Dave Chinner [mailto:david at fromorbit.com] 
Sent: Monday, October 12, 2015 9:30 PM
To: Al Lau (alau2)
Cc: xfs at oss.sgi.com
Subject: Re: mkfs.xfs -n size=65536

On Tue, Oct 13, 2015 at 03:55:26AM +0000, Al Lau (alau2) wrote:
> To remedy the fragmented files in our production systems, can I run 
> the xfs_fsr utility to de-fragment the files?

Well, first you need to determine that the files are fragmented and that it is affecting performance....

Cheers,

Dave.
--
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list