Kaseya Community

test for SSD vs platter based HDD?

  • Anyone know a good way to determine the hard disk technology that is installed in a machine?

     

    We are starting to deploy SSDs in some of our units, and need to avoid certain things  (like defrag.exe) to preserve the life of the drive, as well as make sure certain settings in windows 7 are turned off.

     

    Any ideas?

     

  • would any of the smart information tell you anything - I know there a few command line tools to pull smart data from a disk it might mention SSD somewhere in it.

    beyondlogic have a smart tool for telling you health of disk using smart data.

    Just a thought

  • Apparently (If you're running Windows 7) that Windows detects whether or not the drive itself is Solid State or Mechanical so that when it comes time for Windows to defrag it overlooks the SSD and goes onto the next drive.

    You could try CrystalDiskInfo to determine the HDD's - Might be what you need

    If you need to easily disable services to preserve life of the SSD try SSD Tweaker - Great tweaking tool that does everything you need to get the most out of an SSD, Speed/Storage/Life wise.

  • Rhys: to the best of my knowledge, 7 only does things different during install by offsetting the sectors slightly to optimize speed. No other changes are made.  Chkdsk will still run as part of the automated cleanup.

    We are already using ssdtweak for the changes to the systems during our imaging process.

    we are simply looking to automate some defrag during off hours on the rest of the workstation inventory and dont want the SSDs to get caught up in those scheduled events. (we would add an if statement to avoid defragging if a SSD was found).

  • Why don't you just disable the defrag services on those PC's that have SSD's? Unless they have mech drives too.



    [edited by: Rhys at 5:23 PM (GMT -8) on 1-6-2011] Missing a word
  • Isnt the whole point of kaseya to be able to script and be flexible so you dont have to touch every last PC by hand?

    Im just trying to futureproof (and dumb*** proof) the procedure so it cant accidentally be applied later, and the humans dont have to keep track of which systems are which.

  • Hi Guys,

    I am really getting into wmic as I am amazed how much information can be pulled out of it. I would suggest looking at

    "wmic diskdrive list full" or "wmic diskdrive list brief" on a ssd machine and see if the model string contains SSD or one of the other fields.

  • great idea. just ran both and although it offered a wealth of info, nothing specific to note other than the model of the drive.  But that would require drive make/model lock-in to guarantee it would work, and as soon as they disco'd that drive model family (eg Vertex) we would be hosed.

  • I like Lingario's idea. You should be able to output the command "wmic diskdrive list brief" to a file and then check the file contents for SSD. Good stuff.



    [edited by: SMason at 12:43 PM (GMT -8) on 1-9-2011] Fixed wording.
  • Only one problem SMason... that command doesnt return the drive type. I can only see the drive model, which opens a "whole 'nother can of worms".

    here is an example from my laptop:

    wmic diskdrive list brief

    Caption     DeviceID            Model       Partitions  Size

    OCZ-VERTEX  \\.\PHYSICALDRIVE0  OCZ-VERTEX  1           256052966400

    As you can see, nowhere does it list they TYPE of drive it is, so its pretty useless.

    In theory I could key off the drive model (if caption=vertex then skip, or if caption=vertex2, etc, etc, etc) that would work for a while, but as soon as somebody bought another brand/model of drive that SSD wouldnt be included in the script logic.

    SO using WMIC is incredibly unreliable, and would require excessive vigilance and administrative overhead to make sure it works as time moves on.

  • I don't have access to a computer with SSD at the moment and I have looked into this. WMI would have been my first place to look at but after several hours of research I can't find anybody that has looked into this and has a workable solution not even the ppl from MS seems to have an idea on how to do this.

    Some suggested to look if the TRIM command has been activated by using the following command "fsutil behavior query DisableDeleteNotify" and if the returned value is = 0 then it is enabled however I got a 0 return value on my workstation that has no SSD's drives not to mention that some controllers don’t pass the TRIM command to the drive so that option is completely bogus.

    My next step down the WMI path is to check the properties under Win32_DiskDrive specifically the “TotalCylinders”, “TracksPerCylinder” Property values. The PNPDeviceID might also contain some info that can be mined.

    Something else to try would be the smartctl tool used for S.M.A.R.T monitoring and yes SSD's does support it, I suspect if you do a "smartctl -i" on the drive it might provide additional info not available in WMI. You can download the smartctl tool from http://smartmontools.sourceforge.net

    Would be good if somebody with time can try my theories else I will look into it later when I have access to a machine with a SSD.

     

     

  • This is an interesting one. As per HardKnoX above, smartmontools COULD help, from what I've seen, running a smartctl -i on your boot disk willl usually give 'SSD' in the model somewhere, but that's not a definite I don't believe. It's not hard to log the output from smartctl and test for the text 'SSD' so that would work in situations where the drive does report SSD in the model. I'll have to keep digging for a solution on this.

    I thought about TRIM options but seems very hit and miss also depending on hardware. There should be a way as Win 7 automatically switches off certain functionality (readyboost etc) on SSD drives to my knowledge.

    Cheers,

    Josh

  • a-HA!

    === START OF INFORMATION SECTION ===

    Model Family:     Indilinx Barefoot based SSDs

    Device Model:     OCZ-VERTEX

    Serial Number:   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    Firmware Version: 1.3

    User Capacity:    256,060,514,304 bytes

    Device is:        In smartctl database [for details use: -P show]

    ATA Version is:   7

    ATA Standard is:  Exact ATA specification draft version not indicated

    Local Time is:    Sun Jan 09 20:22:34 2011 EST

    SMART support is: Available - device has SMART capability.

    SMART support is: Enabled

    I think we are getting somewhere! its not a windows native option, but its alot more reliable than the alternatives.

    Thanks HardKnox!

  • Arg... WMIC and SMART utility have been inconsistent in showing "SSD" on the drives I've tested.

    It was too good to be true :(



    [edited by: SMason at 10:35 AM (GMT -8) on 1-10-2011] Added quotes.
  • The likelihood that pre Windows 7 and Server 2008 server products will have a SSD in the Small business or corporate environment is very small and that would be another filter to include. Systems with a SSD and a older OS would more then likely be a custom built machine for gaming or more task specific that requires high IO throughput such as a DB server and the majority of custom built DB servers that I know of with SSD's would also have a non-Windows based OS to get around the file system issues.

    So to recap we are looking for Windows 7 and Server 2008 systems that has "SSD" text under WMI Win32_DiskDrive and/or when you the smartctl tool with the -i switch. To speed the process up I would make a procedure that adds a dummy registry value to indicate the a specific drive letter/s is a SSD drive and make your disk maintenance procedure skip it at the same time you could make a procedure to configure this dummy registry key value that you could run manually for systems that you know has an SSD drive.