Re: 'nilfs' TRIM issue?

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

 



On Wed, 5 Sep 2012 13:52:20 -0700, Mark Trumpold wrote:
> Hello Vyacheslav,
> 
> > Do you use NILFS as root file system?
> >
> Actually, 'nilfs' on this system is just a container that contains loop
> images, one of which is the root filesystem.  As you can see this is
> a little out of the norm, so I think I should do more homework before
> involving a lot of your time..  At this point it in not clear if TRIM is
> working at all for 'ext4' or 'nilfs' on our system.  It may be that the
> warning from 'nilfs' is legitimate.

Actually, ext4 does not emit warning even if the TRIM is not supported
by underlying block devices; it simply ignores the error status of the
discard request.

> I think it might be best for me to first find a way to test whether or
> not TRIM is working in general for a particular configuration.
> I've gone to a totally generic system with just a test 'nilfs' and 'ext4'
> partition to get some experience.  One thing I've noticed is 'ext4' does
> not complain if you mount with 'discard' on a device that does NOT
> support it -- so that's no help.
> 
> I've tried the following simple sequence:
> dd if=/dev/urandom of=tempfile bs=1M count=3
> hdparm --fibmap tempfile    <-- get start address of the file
> hdparm --read-sector [ADDRESS] /dev/sda
> rm tempfile && sync && sleep 120
> hdparm --read-sector [ADDRESS] /dev/sda   <-- should be all zero's
> 
> Got this off the Internet.  The last step NEVER returns zero's for either
> 'nilfs' or 'ext4'.
> 
> If you happen to know of a better test, that would be appreciated.

mkfs.nilfs2 issues TRIM/DISCARD by default.

With mkfs.nilfs2, you can test if the TRIM is supported on the device
if you have an empty partition:

 # dd if=/dev/urandom of=/dev/sdc2
 # mkfs -t nilfs2 -v /dev/sdc2

 where /dev/sdc1 is the empty partition in this example.

You will see the following message if TRIM is supported.

 Discard succeeded and will return 0s - skip wiping

Then, you can confirm the device is actually cleared, for exapmle,
with dd command:

 # dd if=/dev/sdc2 iflag=direct 2> /dev/null | hexdump


With regards,
Ryusuke Konishi


> Thanks for your attention.
> Best regards,
> Mark Trumpold
> 
> 
> -----Original Message-----
> From: Vyacheslav Dubeyko [mailto:slava@xxxxxxxxxxx]
> Sent: Tuesday, September 04, 2012 11:31 PM
> To: Mark Trumpold
> Cc: 'linux-nilfs@xxxxxxxxxxxxxxx'
> Subject: Re: 'nilfs' TRIM issue?
> 
> Hi Mark,
> 
> On Tue, 2012-09-04 at 16:32 -0700, Mark Trumpold wrote:
> > Greetings,
> >
> > I am seeing the following message a few minutes after booting a system:
> >
> 
> Do you use NILFS as root file system?
> 
> > "NILFS warning: error -95 on discard request, turning discards off for the device"
> >
> 
> As I can see from message that operation is not supported (-95). So, it means that you try to use discard in the case of no support of it on the flash.
> 
> How did you mount NILFS (I mean mount options)?
> Could you share mount utility output without any options?
> Could you share content of your fstab file?
> 
> > We are using the "Satadom-150" flash part which does support TRIM, as
> > evidenced by 'ext4' filesystems having no issue with the mount 'discard' option.
> >
> 
> You want that it hasn't any error message when you use 'discard' mount option in the case no support of it on flash. Am I correct?
> 
> With the best regards,
> Vyacheslav Dubeyko.
> 
> 
> > I am running:
> >    Debian 6.0.5
> >    Linux kernel 3.3.1
> >    Nilfs-utils 2.1.1
> >
> > Any thoughts would be greatly appreciated.
> >
> > Thanks in advance,
> > Mark Trumpold
> >
> >
> > Confidentiality Notice:  The information contained in this electronic e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and is confidential and/or privileged. If you and we have a confidentiality agreement or other non-disclosure obligations between us, this Notice shall be deemed to mark and identify the content of this email and any attachments as confidential and proprietary.   If any reader of this communication is not the intended recipient, unauthorized use, disclosure or copying is strictly prohibited, and may be unlawful.  If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system.  Thank you.
> 
> >
> > IRS Circular 230 Disclosure: To ensure compliance with requirements imposed by the IRS, please be advised that any U.S. federal tax advice contained in this communication (including any attachments) is not intended or written to be used or relied upon, and cannot be used or relied upon, for the purpose of (i) avoiding penalties under the Internal Revenue Code, or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.
> >
> > E-mail is susceptible to data corruption, interception, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nilfs"
> > in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo
> > info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 
> 
> Confidentiality Notice:  The information contained in this electronic e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and is confidential and/or privileged. If you and we have a confidentiality agreement or other non-disclosure obligations between us, this Notice shall be deemed to mark and identify the content of this email and any attachments as confidential and proprietary.   If any reader of this communication is not the intended recipient, unauthorized use, disclosure or copying is strictly prohibited, and may be unlawful.  If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system.  Thank you.
> 
> IRS Circular 230 Disclosure: To ensure compliance with requirements imposed by the IRS, please be advised that any U.S. federal tax advice contained in this communication (including any attachments) is not intended or written to be used or relied upon, and cannot be used or relied upon, for the purpose of (i) avoiding penalties under the Internal Revenue Code, or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.
> 
> E-mail is susceptible to data corruption, interception, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux