Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking into Android secure erase functions and realized a few things:

Android uses eMMC as its storage media, eMMC standards are set by the JEDEC organization (currently most of the manufactured eMMCs are >= 4.41). The 4.41 eMMC standard describes two commands SECURE ERASE and SECURE TRIM, and that these commands should be supported from now on for every eMMC manufactured. That's great, but Android runs ext4 as a filesystem, and I haven't been able to find if ext4 has a way of communicating with the storage media an eMMC SECURE ERASE command.

I know that mounting ext4 with the 'discard' option is one way of enabling TRIM after every deletion, but it is also a poor solution as it will severely slow down performance since the storage has to TRIM after each delete command.

So my question, is there a way of sending a SECURE ERASE command from an ext4 file system short of mounting with the 'discard' option?

Thank you!

Related links:

share|improve this question
    
Re: 'discard' option: isn't it the other way around? Using TRIM on any kind of flash device should increase performance (not decrease it) because the FTL layer becomes aware that it no longer has to track a particular block (maintain the mapping from logical block to physical block, refresh the block once in a while for wear leveling, etc...) –  Celada Jun 29 '13 at 14:42
    
Technically yes, but issuing the TRIM command after each delete will degrade usability performance as seen in the second link I posted, a deletion of 30,000+ files totaling ~450MB followed by a sync command results in ~40 seconds of wait time. –  Alistair Jun 29 '13 at 14:54

1 Answer 1

You can run fstrim once in a while. I run it daily through cron on SSD disks (desktop PC).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.