Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RipeRetina

macrumors regular
Mar 26, 2009
202
4
Maryland
You cannot "Erase Empty Space" in lion on a drive you have booted from.

For instance, on my 2011 MBP, i cannot Erase Empty Space on the SSD i boot from, but my internal secondary 500GB HDD i can.

You can try booting from your SL DVD and open Disk utility from there.

As long as TRIM is enabled, you're fine, you do not need to worry about this.

Hmm, well I remember that I could erase empty space before but whatever.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,132
15,595
California
Hm, I remember this trim enabler working for me in snow leopard & even in Lion when I first started using it. I have since restored from a time macine backup (for some complicated reasons) & About my mac says that Trim support is a 'YES' but in Disk Utility I can't Free Empty Space, what gives? I've restored the driver & tried patching it again but still doesn't let me Free Empty Space, any ideas?

If you are trying to TRIM empty space on the drive after the hack install in Lion, just boot into single user mode then type in "fsck -ffy" without the quotes.

This will TRIM free space.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,132
15,595
California
That just verified the disk. That didn't empty free space like I wanted. I could have verified the disk with disk utility if I wanted to.

If you are trying to TRIM free space, this command does that. If you are after a secure erase of free disk space, that is another matter. Perhaps boot from the Lion recovery partition then secure erase free space from there in Disk Util. Understand though, that this does not TRIM the SSDs free space..
 

fat jez

macrumors 68020
Jun 24, 2010
2,083
614
Glasgow, UK
If you are trying to TRIM free space, this command does that. If you are after a secure erase of free disk space, that is another matter. Perhaps boot from the Lion recovery partition then secure erase free space from there in Disk Util. Understand though, that this does not TRIM the SSDs free space..

from the man page for fsck, -f forces a check of filesystems marked as clean and -y assumes a yes response to any questions. I don't see any thing in either the man page or by doing a google search to suggest that it performs a TRIM operation, so I'd be interested to see where you found this info out so I can take a read of it myself.
 

RipeRetina

macrumors regular
Mar 26, 2009
202
4
Maryland
from the man page for fsck, -f forces a check of filesystems marked as clean and -y assumes a yes response to any questions. I don't see any thing in either the man page or by doing a google search to suggest that it performs a TRIM operation, so I'd be interested to see where you found this info out so I can take a read of it myself.

My feelings exactly.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,132
15,595
California
from the man page for fsck, -f forces a check of filesystems marked as clean and -y assumes a yes response to any questions. I don't see any thing in either the man page or by doing a google search to suggest that it performs a TRIM operation, so I'd be interested to see where you found this info out so I can take a read of it myself.

You may need to work on your Google Fu a little then. :)

Search Google for fsck -ffy lion trim and you get page after page of hits, including this link to post #814 in this very thread.

Also, this link comes up explaining the same thing.

Running the fsck command in Lion TRIMs free space.

My feelings exactly.

I have tried twice now in this thread to help you, even though your question has already been asked and answered earlier in the thread, and each time you have replied with snarky comments. You must be fun at parties.
 

RipeRetina

macrumors regular
Mar 26, 2009
202
4
Maryland
You may need to work on your Google Fu a little then. :)

Search Google for fsck -ffy lion trim and you get page after page of hits, including this link to post #814 in this very thread.

Also, this link comes up explaining the same thing.

Running the fsck command in Lion TRIMs free space.



I have tried twice now in this thread to help you, even though your question has already been asked and answered earlier in the thread, and each time you have replied with snarky comments. You must be fun at parties.

I did exactly what you said. The result that came from the command is a simple verify of the disk. When you empty free space, it normally puts the free space into a disk image then deletes the image, this did not happen with that command.
 

hwojtek

macrumors 68020
Jan 26, 2008
2,274
1,276
Poznan, Poland
from the man page for fsck, -f forces a check of filesystems marked as clean and -y assumes a yes response to any questions. I don't see any thing in either the man page or by doing a google search to suggest that it performs a TRIM operation

It does. Search this very thread for the output of fsck ran in single-user mode, trimming free space happens at the end.
However, it is still unknown whether this is a special build of fsck (intended for ssd-equipped MacBook Pros) introduced in 6.8 that trims on demand, or does it happen by default in Lion now.
 

RipeRetina

macrumors regular
Mar 26, 2009
202
4
Maryland
Yes, I did search for it, sorry for doubting you weaselboy but the last time that I had trim enabled, it was different so please excuse me. :D
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,132
15,595
California
Yes, I did search for it, sorry for doubting you weaselboy but the last time that I had trim enabled, it was different so please excuse me. :D

NP :) The version of fsck that came with the 2011 MBPs had this TRIM change, and now the fsck version with Lion has the change also.
 

Ger Teunis

macrumors member
Jan 2, 2010
55
0
In front of my Mac
You cannot "Erase Empty Space" in lion on a drive you have booted from.

For instance, on my 2011 MBP, i cannot Erase Empty Space on the SSD i boot from, but my internal secondary 500GB HDD i can.

You can try booting from your SL DVD and open Disk utility from there.

As long as TRIM is enabled, you're fine, you do not need to worry about this.

You can trim on while being booted I'd single user mode.
All macs on 10.6.8 and newer have the updated fsck.

Reboot Mac, during boot press cmd-s
You boot into a text only single user mode.
Now enter command:
fsck -ffy

This will trim unused blocks without booting from other partitions or DVDs.

----------

NP :) The version of fsck that came with the 2011 MBPs had this TRIM change, and now the fsck version with Lion has the change also.

All 10.6.8 macs have the updated drivers (hexeditable to enable trim) and the updated fsck.
 

Baral

macrumors member
Jun 26, 2010
90
0
If you are trying to TRIM free space, this command does that. If you are after a secure erase of free disk space, that is another matter. Perhaps boot from the Lion recovery partition then secure erase free space from there in Disk Util. Understand though, that this does not TRIM the SSDs free space..

What exactly is the difference between TRIMming free space and secure erasing free space? Don't they essentially do the same thing, which is prepare empty blocks to be written to? Is one technique better than the other?

(Just to be clear, when you say "secure erase free space" that is the same thing as a SATA secure erase?)
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,132
15,595
California
What exactly is the difference between TRIMming free space and secure erasing free space? Don't they essentially do the same thing, which is prepare empty blocks to be written to? Is one technique better than the other?

TRIM of free space goes through the unused blocks on the drive and marks them as "available" space so the SSD write speed is not slowed by having to clear the space before a write can occur. This is what happens when you run fsck in Lion.

Using Disk Util to erase free space was a work around to allow you to effectively TRIM the drive by writing to every free block then deleting the file used to fill the free space. In the end this had the same result as the fsck TRIM function, but the fsck command is better if you are just trying to TRIM the drive.

An SSD NAND cell has a finite number of write cycles (I think it is 3,000 for newer 25nm drives), and by running the Disk Util erase free space you are writing to every free cell on the drive one time thus reducing the life of the drive. The fsck command does not do this. fsck just TRIMs the free space without writing data to the drive so is the better option.

Now that the Lion version of fsck TRIMs free space, if you only want to TRIM the drive that is a better option that the Disk Util procedure (although this discussion is moot because Lion Disk Util does not seem to allow erase free space on an SSD).

That said, if you want to make sure data in free space is not available for recovery (say you are selling a drive) the Disk Util option may be better to ensure nothing can be recovered. I have read some articles saying file recovery after TRIM is impossible/difficult, but those articles seem to focus more on Windows.

(Just to be clear, when you say "secure erase free space" that is the same thing as a SATA secure erase?)

No. The Disk Util erase free space creates one large file to fill all the free space on the disk, then deltas that file. The SATA secure erase command simply clears the NAND cell. I do not believe this SATA command is supported by OS X. I have seen posts here from users who booted from a Linux CD then used the Linux HDParm program to do a SATA secure erase.
 

treestar

macrumors 6502
Feb 28, 2010
366
5
If you are trying to TRIM free space, this command does that. If you are after a secure erase of free disk space, that is another matter. Perhaps boot from the Lion recovery partition then secure erase free space from there in Disk Util. Understand though, that this does not TRIM the SSDs free space..

Sigh. This only works by booting the Lion utilities from a disc or non-boot disk. You cannot use the recovery partition.
 

RS2

macrumors member
Apr 4, 2011
84
17
Do not install TRIM Support Enabler 1.2 if you are running Lion! TRIM Support Enabler will install an older version of the IOAHCIBlockStorage kernel extension from 10.6.8. The IOAHCIBlockStorage kernel extension installed in Lion is version 2.0.0.

TRIM Enabler for Lion
 

mobilehavoc

macrumors 6502
Jun 30, 2007
377
12
Do not install TRIM Support Enabler 1.2 if you are running Lion! TRIM Support Enabler will install an older version of the IOAHCIBlockStorage kernel extension from 10.6.8. The IOAHCIBlockStorage kernel extension installed in Lion is version 2.0.0.

TRIM Enabler for Lion

Are you aware of any issues or are you saying just theoretically there could be a problem? I've used Trim Enabler 1.2 and I'm on 10.7.1. Have no issues at all and everything works fast.
 

floridonet

macrumors regular
Apr 5, 2011
150
17
Irvine, CA
Thanks for the OP for this program. It seems to be working fine for my newly installed Samsung 470 series.

I have a quick question. What speed test application can I use to test random read/write? I have the DiskSpeedTest, but it looks to only do sequential tests. Thanks!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.