* [linux-lvm] Trim support on stripped volumes ?
@ 2011-05-24 9:20 Franck Routier (personnel)
2011-05-24 9:51 ` Franck Routier (personnel)
0 siblings, 1 reply; 5+ messages in thread
From: Franck Routier (personnel) @ 2011-05-24 9:20 UTC (permalink / raw)
To: linux-lvm
Hi,
I have set-up of server with 4 SSDs (OCZ Vertex 2) stripped using LVM.
Logical volume has been created using the -i 4 option (iostat confirms
that the 4 disks work in parallel when I write a file).
Ext4 fs is used on the volume, mounted with -discard option.
I am using kernel 2.6.38.
My question is : is there a chance that TRIM command makes its way to
the disks through LVM ? I've read contradictory informations on the web
and I'm sure this is the best place to ask.
My second question is : how would I make _sure_ it works ?
I've found a way to do it with hdparm --fibmap and hdparm --read-sector
here http://askubuntu.com/questions/18903/how-to-enable-trim
But I don't think this can work with LVM. Would there be a similar way
to make sure it is working while using LVM ?
Thanks a lot,
Franck
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Trim support on stripped volumes ?
2011-05-24 9:20 [linux-lvm] Trim support on stripped volumes ? Franck Routier (personnel)
@ 2011-05-24 9:51 ` Franck Routier (personnel)
2011-05-24 13:14 ` Mike Snitzer
0 siblings, 1 reply; 5+ messages in thread
From: Franck Routier (personnel) @ 2011-05-24 9:51 UTC (permalink / raw)
To: LVM general discussion and development
I found this commit
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7b76ec11fec40203836b488496d2df082d5b2022
that suggests it could work, but I'm not sure at all...
Franck
Le mardi 24 mai 2011 à 11:20 +0200, Franck Routier (personnel) a écrit :
> Hi,
>
> I have set-up of server with 4 SSDs (OCZ Vertex 2) stripped using LVM.
> Logical volume has been created using the -i 4 option (iostat confirms
> that the 4 disks work in parallel when I write a file).
>
> Ext4 fs is used on the volume, mounted with -discard option.
>
> I am using kernel 2.6.38.
>
> My question is : is there a chance that TRIM command makes its way to
> the disks through LVM ? I've read contradictory informations on the web
> and I'm sure this is the best place to ask.
>
> My second question is : how would I make _sure_ it works ?
> I've found a way to do it with hdparm --fibmap and hdparm --read-sector
> here http://askubuntu.com/questions/18903/how-to-enable-trim
>
> But I don't think this can work with LVM. Would there be a similar way
> to make sure it is working while using LVM ?
>
> Thanks a lot,
>
> Franck
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Trim support on stripped volumes ?
2011-05-24 9:51 ` Franck Routier (personnel)
@ 2011-05-24 13:14 ` Mike Snitzer
2011-05-25 8:11 ` Franck Routier (personnel)
0 siblings, 1 reply; 5+ messages in thread
From: Mike Snitzer @ 2011-05-24 13:14 UTC (permalink / raw)
To: Franck Routier; +Cc: LVM general discussion and development
On Tue, May 24 2011 at 5:51am -0400,
Franck Routier (personnel) <alci@mecadu.org> wrote:
> I found this commit
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7b76ec11fec40203836b488496d2df082d5b2022
> that suggests it could work, but I'm not sure at all...
Yes, that is the commit that added discard support to the stripe target,
it works.
> Le mardi 24 mai 2011 � 11:20 +0200, Franck Routier (personnel) a �crit :
> > Hi,
> >
> > I have set-up of server with 4 SSDs (OCZ Vertex 2) stripped using LVM.
> > Logical volume has been created using the -i 4 option (iostat confirms
> > that the 4 disks work in parallel when I write a file).
> >
> > Ext4 fs is used on the volume, mounted with -discard option.
When using -o discard, ext4 will log a warning if a discard failed (and
will disable discards).
So ext4 is a great indicator for whether discards are working on your
striped LV volume.
Mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Trim support on stripped volumes ?
2011-05-24 13:14 ` Mike Snitzer
@ 2011-05-25 8:11 ` Franck Routier (personnel)
2011-05-25 13:23 ` Mike Snitzer
0 siblings, 1 reply; 5+ messages in thread
From: Franck Routier (personnel) @ 2011-05-25 8:11 UTC (permalink / raw)
To: LVM general discussion and development
Le mardi 24 mai 2011 à 09:14 -0400, Mike Snitzer a écrit :
> When using -o discard, ext4 will log a warning if a discard failed (and
> will disable discards).
>
> So ext4 is a great indicator for whether discards are working on your
> striped LV volume.
>
Just out of curiosity, how does ext4 tell if discards is working or
not ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Trim support on stripped volumes ?
2011-05-25 8:11 ` Franck Routier (personnel)
@ 2011-05-25 13:23 ` Mike Snitzer
0 siblings, 0 replies; 5+ messages in thread
From: Mike Snitzer @ 2011-05-25 13:23 UTC (permalink / raw)
To: LVM general discussion and development
On Wed, May 25 2011 at 4:11am -0400,
Franck Routier (personnel) <alci@mecadu.org> wrote:
> Le mardi 24 mai 2011 � 09:14 -0400, Mike Snitzer a �crit :
>
> > When using -o discard, ext4 will log a warning if a discard failed (and
> > will disable discards).
> >
> > So ext4 is a great indicator for whether discards are working on your
> > striped LV volume.
> >
>
> Just out of curiosity, how does ext4 tell if discards is working or
> not ?
It checks the return code from ext4_issue_discard() -- which comes from
sb_issue_discard(). See: fs/ext4/mballoc.c:release_blocks_on_commit()
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-25 13:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 9:20 [linux-lvm] Trim support on stripped volumes ? Franck Routier (personnel)
2011-05-24 9:51 ` Franck Routier (personnel)
2011-05-24 13:14 ` Mike Snitzer
2011-05-25 8:11 ` Franck Routier (personnel)
2011-05-25 13:23 ` Mike Snitzer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.