Re: TRIM on XFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 10, 2011 at 05:04:43PM -0500, Jeffrey Hundstad wrote:
> On 10/10/2011 03:28 PM, Greg Freemyer wrote:
> >fitrim is the batch mode.
> >
> >To enable realtime discard, add --discard to your mount options.
> >
> >Documented athttp://lxr.linux.no/#linux+v3.0.4/Documentation/filesystems/xfs.txt
> >
> >To invoke batch mode, simply use fstrim from user space.
> 
> Hello,
> 
> I'm also trying to use FITRIM on a simple XFS partition on a
> spinning magnetic hard drive (remember those).  I haven't had much
> luck.  I'm doing this just to get used to the commands when using
> this against a thinly provisioned disk.  I have no idea if this
> should work in this configuration.
> 
> On a Debian system with Linux 3.0.0-2-amd64 when I issue:
> # fstrim /
> 
> I receive:
> fstrim: /: FITRIM ioctl failed: Operation not supported
> 
> With an strace this looks like:
> open("/", O_RDONLY)                     = 3
> ioctl(3, 0xc0185879, 0x7fff4ea851b0)    = -1 EOPNOTSUPP (Operation
> not supported)

It means the block device underneath the filesystem doesn't support
the TRIM operation. Check /sys/block/<dev>/queue/discard_max_bytes -
if the value is zero then your device doesn't support discard
operations.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux