Dual SSD's NOT in Raid. One TRIMs the other does NOT. Help.

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
I have just *mostly* finished a system rebuild and while going through and checking to be sure that TRIM was working on my second SSD, I found out that it is not. TRIM is working fine on the primary SSD. I then prepared to do (yet another) backup of the system onto the standard HD on the system in preparation for some playing around with configurations, etc., and noticed that the second SSD isn't being included in the backup set.

I had LOTS of fun with this system getting the SSD's to read, and resolving all the weird driver issues, and now I'm sitting here stuck with no clue what to do. At this point if I simply yank the second SSD out of the machine I think everything will be working perfectly. But I’d rather not do that, because that would be giving up. LOL.

System Info follows:

[EDIT] [Windows 7 Ultimate]

Mainboard: ASROCK Z68 Extreme 4 / 8GB / i7-2700 @3.5GHz

SSDs are both Kingston Hyper X 3K 120GB models - The drives are NOT configured in RAID. I have one I use for the operating system, and another I will use for games. Both are configured to allow Windows to use them for virtual memory.

Standard HD is a 2TB Seagate something or another that used to be my main drive.

The SSD's are located in SATA3 0 and SATA3 1 ports. The front case I/O panel, HD, and a DVD burner are on three of the other [EDIT] [NON-Marvell] SATA ports.

BIOS is the most updated BIOS available from ASROCK.

System Drivers are up to date per DriverNavigator with the exception of some strange Matrox PCI driver which cannot possibly have anything to do with my machine, as the GPU is a GTX560. Intel Smart Connect and Intel Display Audio drivers are not loaded into the machine at all, and are disabled in BIOS.

Kingston website provided tools detect both drives fine. The operating system detects them fine for reading and writing.

Nothing on this machine is overclocked. It’s all factory spec. CPU, RAM, GPU. Air cooled. Power is from an 850W Thermaltake that is roughly 1 year old. System is fed by a voltage regulating UPS, which is in turn protected by a high capacity surge suppressor with power conditioning.

As I mentioned above I thought all was well, but decided that just detecting if the TRIM service was running wasn't enough, I wanted to TEST it. So I did, using TRIMcheck. The SATA3 0 acting as the boot drive tests perfectly. The SATA3 1 supplemental drive will not TRIM at all. I have even gone as far as rebooting, and just checked again after roughly 1 hour total time has passed, about 50 minutes of which was uptime on the machine, and it still has not trimmed the drive.

Everything is talking. The Device Manager seems relatively content.

The only thing that pops into my head as a possibility is formatting? I did reformat both of the drives at one point to recover from a lovely blunder involving the wrong drivers for ASROCK mainboard hardware. Then when reinstalling the OS, after yet another driver issue (I'm NOT a fan of Asrock's driver documentation for this mobo) I am confident that Windows reformatted the C: drive again.

So before going into deep dive land, can someone verify if the format of an SSD can impact its ability to be trimmed, while not impacting its ability to read/write? Are some formats not supported by Windows Backup for SSD’s?
As I click to activate this post, I am starting yet another backup, in preparation for whatever mad !science! is proposed here.

[EDIT] [Changed post type from discussion to question]

[EDIT] [Performed a chkdsk / reboot and checked event viewer logs. Both drives are NTFS 4096, and neither drive generated errors during the chkdsk, so it doesn't seem to be a format-related issue? At this point I'm completely confused.]

[EDIT] [Noticed that all three of my hard drives are being picked up as USB devices that can be removed. I dug into that a bit in Google, and it seems to be considered a cosmetic issue by most responders, but could it be related?] If the drives are all being seen on the USB bus, maybe only one of the drives gets the TRIM commands from the operating system?]

[EDIT] [Fixed the weird USB borked recognition issue by defining the SATA ports 0-5 on my machine as non-removable media in the registry. No change to TRIM function on either drive. C: still trims fine. E: fails to trim.]
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
I have found a solution to the safely remove hardware weirdness afflicting my drives.

I found this, and it worked for me. My SATA drives no longer indicate that they are removable, because I told the system via the registry that they are internal devices.

http://www.overclock.net/t/974023/fix-ahci-sata-drives-showing-in-safely-remove-hardware.

I am now testing to see if Trim is working on both drives now...

No Go. Drive C: is still trimming fine, Drive E: is failing to trim. Other than that, drive E is working with no errors.

Any ideas? Are there any third party software programs that can force SSD's to trim, so I can see if the drive is even capable of trimming?

At this point all I know is that it isn't trimming. I don't know if that's a problem with Windows, the drivers, firmware, or hardware.
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
Wow, two days now of digging through tech support sites, and I still have yet to see any serious consideration of this issue. Every time I see a reference to drives not trimming, I see people saying to check and see if the trimming function is enabled in Windows, and if t is, then the drives should be trimming.

But from my own example, I can say that an otherwise 100% functional drive might not actually be trimming, even if the trim feature is turned on. Even if the boot SSD can trim.

Has anyone found anywhere else where this is even discussed? Or are most tech savvy people still wrongly thinking that if one SSD is trimming, they all are?

Or do I have some sort of extremely oddball configuration issue that only disables trim on one drive without impacting any of it's other features?

*brain hurts*

Time to download Dwarf Fortress again, and take a break from digging for fixes to this for at least a few hours.
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530


The trim checking software generates a scenario where trimming should happen, then checks to see if it activates.

I found it here: http://thessdreview.com/daily-news/latest-buzz/trimcheck-does-your-ssd-really-have-trim-working/

Works perfectly on one drive, never on the other.
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
Tonight's Test.

I will be doing a full backup of both SSD's, then powering down the machine, then swapping the drive carriers to change the drive positions in the machine without adjusting anything physically except the power and signal cable ends at the drives. Then I will do a full restore on the machine.

That will leave the old OS drive as the game drive, and the old game drive as the OS drive.

Testing TRIM at that point should tell me if it's hardware or software.

Wish me luck!
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
Swap of SSD's performed.

The C: drive which used to TRIM just fine on SATA 0 is on SATA 1 Drive E: now, and is no longer trimming.

The E: drive which would never TRIM before on SATA 1 is on SATA0 Drive C: now, and is trimming just fine.

[EDIT] [To be clear, I not only swapped drive positions, I swapped the data on the drives. SATA 0 which was my OS drive now has SETI on it, and is on SATA1. The other drive's data was also swapped when it was moved to the other SATA port.]

So this issue appears to have absolutely nothing to do with the drives themselves?

Anyone have any ideas why Windows 7 Ultimate 64 bit might choose to completely ignore TRIM functions on SATA 1, when SATA 1 is a standalone (non-RAID) SSD? While at the same time SATA 0 is Trimming perfectly, no matter which SSD is connected to the ports?
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
Since this does not seem to be a drive issue, can someone point me at a place where I can learn how TRIM actually works for newer model SSD drives? Kingston technical support is also coming up blank on this issue for the time being.

It's beginning to look to me like this is some sort of issue with Windows 7 either not sending the proper command, or the mainboard not routing the command properly? Before I go to Either Microsoft or Asrock, I'd like to know a bit more about modern TRIM functionality. Preferably without having to slog through pages of documentation of old TRIM methods.
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
Formatting has been performed on this drive several times, but I'll move the data off and format it again just to be sure.

Since the problem is staying on the SATA 1 port rather than following the drive I'm not sure how this can help, but with the speed of the SSD, it won't take long to test :)

 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
OK, while doing the format, I decided to check something else, and found that When I swapped SSD's, the machine apparently decided that it was going to be "helpful" and swap my BIOS settings.

So even though I swapped cables on my SSD before restoring the two drives, expecting that data would be swapped, the OS stayed on the same physical drive.

I'm going to completely remove the OS drive from the system and re-install the OS on the other drive, and test it.

I've never heard of a machine performing automated BIOS boot reassignments before, is this something new, or just something I missed?
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
*************OK results of tests as a single drive system. One SSD attached, the other detached.

Drive 1 with Windows 7 OS performs TRIM functions on either SATA 0 or SATA 1

Drive 2:

Drive 2 with Windows 7 OS performs TRIM functions on either SATA 0 or SATA 1

************ Now results of the dual drive system tests.

With Windows 7 on BOTH drives, both drives TRIM no matter if they are on SATA 0 or SATA 1

However, when I reformatted the secondary drive to clear the second OS and return drive 2 to it's normal configuration, it returns to it's prior behavior and refuses to TRIM.

Back to where I started. The OS drive will TRIM, the secondary drive will not.

**************

I did consider utilized drive space as being a possible trigger for TRIM activity, and loaded the secondary drive to more than 50% capacity, which is more space than the basic OS of Windows 7 requires. This had no effect.

Based on this, it appears that *something* is looking for the presence of an operating system on the SSD before it allows TRIM to activate.

Either that or I don't have the SSD formatted with the correct format, unless I allow Windows Install to format it for me? The SSD is currently formatted as NTFS with Allocations of 4096. It was not formatted with a label before, but now has label SSD-2.

What I'm thinking? Kingston, intentionally or not, has firmware on the drive looking for data to indicate the drive is an OS drive. If it is not an OS drive, TRIM is not allowed to operate. Does this make any sense?
 
If you cannot get trim to work on both drives, you might be better off configuring the SSD's in RAID0 and manually doing trim once a week or two or three.

Trim can be made to work in RAID0 but it is hard to configure. Here's an article from Anandtech about it:
http://anandtech.com/show/6477/trim-raid0-ssd-arrays-work-with-intel-6series-motherboards-too

Edit:
When you install windows there should be an advanced disk options icon/link that gives you the options to highlight and then quick format each drive then highlight the one that you want to boot windows from and load windows on it.
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
Drive 1 is for the OS
Drive 2 is for SETI @ Home - but will also be home to whatever game I am currently playing.

I do not want any possibility of one drive failing and losing the data of both drives, so RAID 0 is not an option

Putting Both Drives into a RAID 1 array will reduce the available space to that of one drive.

Neither option is acceptable. I need one drive for the OS, the other for SETI. If I lose data from one OR the other that's an acceptable risk, and I have a backup drive to restore from. I don't want to lose data from both at the same time though, and I don't want to fill the drives until they have little free space.

What I need to know is why these SSDs aren't activating TRIM when they don't have an OS on them. It looks like a firmware issue, but it might also be a Windows 7 issue. It might, conceivably, be a BIOS issue, I suppose.

So what is causing Kingston Hyperx 3k SSD's to TRIM when they have an OS on them, but NOT trim when they are just being used for applications?

Can I take a single file from the OS drive, put it on the storage drive, and fool the drive into thinking an OS is installed?
 
Does your C drive and the other show up in the USB "Safely Remove hardware" option? If it does there is a way to set up the registry so that windows recognizes both as an internal drive. I remember reading about it just yesterday. Will post more about it if and when I find the info again.
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530


I have already fixed that. Posted a link to it above. All of my SATA ports are now designated internal. f I ever choose to use an ESATA port, I might have to revisit that decision for one of my ports, but for now all is internal.
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
More Data. During my back and forth with Kingston, the validity of TRIMcheck came into question, so I was thinking about how to test it. I realized that TRIMcheck works by checking the status of previously written data to see if it has been reverted to zero after being marked as unused - and I have a program that can zero free space on drives - Ccleaner Drive Wiper.

So, apparently I found a way to test TRIMcheck itself, to some degree. I have just used Ccleaner’s Drive Wiper to set all free space bits to zero on my storage SSD that TRIMcheck says is not performing TRIM. This should emulate the TRIM feature of the SSD, I would think? After running TRIMcheck to establish a test, then Drive Wiper to zero the unused space, then TRIMcheck again to check for the status of the test data, TRIMcheck indicates that TRIM on the drive is working. So TRIMcheck does appear to be properly detecting the status of the bit data that it recorded. I then tested the drive again WITHOUT using Ccleaner’s Drive Wiper, and TRIMcheck once again indicates TRIM is not active. So it appears that when a third-party program performs a bit-zeroing operation on the drive, TRIMcheck detects the zeroing properly, and thinks TRIM is working, but then when tested again, it once again detects that TRIM is not working.

So, TRIMcheck is validated as being capable of detecting whether or not the data it wrote on a storage drive has been zeroed. It's a crude test, but a pretty solid one I'd think.
 

popatim

Titan
Moderator
I'm curious if you have monitored drive activity during all this testing. afaik the drive has to be inactive for trim to begin to do its thing which is sad because with win7 & 8 i usually see the drive activity light always flashing at least once every second or two.

My other observation/question has to do with how do yo know it was trim and not GC that took care of drive 0 ?
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530


While testing the storage drive I have always intentionally avoided doing anything active on it. Right now it has SETI@Home, TRIMcheck, and a single game on it. None of which I use when testing TRIM in response to folks here, or Kingston tech support. I have tested the drive both with, and without pagefile active on the drive. I have also tested before and after reboots. After up to several hours of complete inactivity with and without the pagefile. (Yay for paper books!) I have even left the TRIMcheck test up for 24 hours a couple times, both with SETI active and with it inactive, and the data TRIMcheck sees does not change (it actually tells you the values of the data that it wrote when it does the check, and the values that it is reading back).

My understanding of Garbage collection on Win7 is that it is active when the drive is not active, or when the machine reboots, so with the testing that I have performed, if GC is active on the OS drive, I would think it should also be active on the storage drive? At least on a couple occasions? This drive has Never activated TRIM when acting as a storage drive, no matter what I did. It has always activated TRIM when loaded as a OS drive, even if it's not the boot drive.

However my understanding of garbage collection is certainly not perfect. What would you suggest as a test to determine if TRIM or GC is cleaning the OS drive? If we do find that GC is cleaning the OS drive, and not TRIM, can you think of any reason why GC would be active and functional on an idling OS drive, but never activate on an inactive storage drive?

The simplest way I could imagine would be to disable garbage collection long enough to do some testing, but a quick Googling on garbage collection for Windows 7 did not reveal any straightforward answer on whether or not it is even possible to do this safely in Windows.
 

Cheopis

Honorable
Aug 11, 2013
34
0
10,530
Another bit of information just came up - doesn't change anything, but helps clarify the scenario a bit more. I discovered that the Intel SSD toolkit can look at any SSD for some details - one of which is the word 169 value that the drives use to determine if SSD's are ready to receive OS commands for TRIM.

The Intel SSD Toolkit can be found here: http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=18455

I checked both drives, and both have word 169 set the same way:

"Bit 0 - Data Set Management Supported" has Hex value 1. This means both drives should be ready to accept TRIM commands from the OS.