SSD refresh on M1 Mac

  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in please checkout the “Tips & Tricks” page for some very handy tips!

    /Steve.
  • BootAble – FreeDOS boot testing freeware

    To obtain direct, low-level access to a system's mass storage drives, SpinRite runs under a GRC-customized version of FreeDOS which has been modified to add compatibility with all file systems. In order to run SpinRite it must first be possible to boot FreeDOS.

    GRC's “BootAble” freeware allows anyone to easily create BIOS-bootable media in order to workout and confirm the details of getting a machine to boot FreeDOS through a BIOS. Once the means of doing that has been determined, the media created by SpinRite can be booted and run in the same way.

    The participants here, who have taken the time to share their knowledge and experience, their successes and some frustrations with booting their computers into FreeDOS, have created a valuable knowledgebase which will benefit everyone who follows.

    You may click on the image to the right to obtain your own copy of BootAble. Then use the knowledge and experience documented here to boot your computer(s) into FreeDOS. And please do not hesitate to ask questions – nowhere else can better answers be found.

    (You may permanently close this reminder with the 'X' in the upper right.)

squirrel

Active member
Oct 4, 2020
36
10
Having heard Steve talk about the need to refresh dodgy bits in the cells of the SSD, am I right in thinking that when the Mac gets an update (most recent was Ventura), that the new software will overwrite the operating system area so at least that part of the SSD will be made fully functional again if it was dodgy before? For the app area would deleting the apps then reinstalling them repair dodgy bits in the app area?

I’ve already got Spinrite 6.0 and looking forward to getting 6.1 so hopefully then I can checkout my 4T HDD in my Synology NAS server using my Lenovo T430 with Linux on it. I had a few dodgy pdf files that looked okay in a folder listing but using my Mac they wouldn’t copy or move or load as an error cropped up. I managed to load the pdf with my Linux machine and export the damaged pdf with a new file name. I suspect that there is a hdd problem at the root of this problem.
 
Hi @squirrel I don' know anything about Mac so someone else with general knowledge can jump in. I don't know if rewriting an existing file rewrites to the same sector. But, generally, any solid state memory including SSD's has wear leveling. That means each new write to a logical block from the user interface writes to a new physical location on the disk. That way the writes are spread all over the media. If you have the capability to, backup your Mac drive. Then, you could run Spinrite on level 2 which will read all the sectors. OR, you could run it on level 4. Level 4 will read each sector, invert each sector, write it back, read it again, invert it again, write it again. This totally refreshes every sector. SSD's have limited drive writes. There will be a spec somewhere that says how many TB can be written or how many total times the drive can be filled (Total Drive Writes). A level 4 sweep will use up 2 Total Drive Writes, but it will totally refresh the drive. Consider getting the SSD manufacture's own software for monitoring drive health. For Samsung, it's Samsung Magician. This will allow you to check how many total drive writes or how many TB have been written and compared to the total longevity of the drive. There may be a percentage used up indicator. If the drive is close to its end of life, get the data off of it and replace it. Different drives will do different things when they reach end of life. There's a possibility that your data could be come inaccessible. Somebody with Mac experience can tell you about the Mac specifics.

May your bits be stable and your interfaces be fast. :cool: Ron
 
  • Like
Reactions: squirrel
Hi @squirrel I don' know anything about Mac so someone else with general knowledge can jump in. I don't know if rewriting an existing file rewrites to the same sector. But, generally, any solid state memory including SSD's has wear leveling. That means each new write to a logical block from the user interface writes to a new physical location on the disk. That way the writes are spread all over the media. If you have the capability to, backup your Mac drive. Then, you could run Spinrite on level 2 which will read all the sectors. OR, you could run it on level 4. Level 4 will read each sector, invert each sector, write it back, read it again, invert it again, write it again. This totally refreshes every sector. SSD's have limited drive writes. There will be a spec somewhere that says how many TB can be written or how many total times the drive can be filled (Total Drive Writes). A level 4 sweep will use up 2 Total Drive Writes, but it will totally refresh the drive. Consider getting the SSD manufacture's own software for monitoring drive health. For Samsung, it's Samsung Magician. This will allow you to check how many total drive writes or how many TB have been written and compared to the total longevity of the drive. There may be a percentage used up indicator. If the drive is close to its end of life, get the data off of it and replace it. Different drives will do different things when they reach end of life. There's a possibility that your data could be come inaccessible. Somebody with Mac experience can tell you about the Mac specifics.

May your bits be stable and your interfaces be fast. :cool: Ron
I can add some clarifications…

First of all, Apple devices do not support DOS, and their EFI CSM implementation was really limited to supporting Windows. All of it is going away, if not already gone when they dropped Windows XP or 32-bit Windows support.

Finally, Apple SSDs are assembled by Apple and, as such, run their firmware. If memory serves me right, Disk Utility will get the SMART data for the drive, and you can use smartmontools to get the detailed data from the SSD. I have not check on an Apple Silicon SSD, so I don’t know if that would apply there.
 
  • Like
Reactions: squirrel
All data, sitting at rest, suffers potential "bitrot". You're relying on the reliable storage of a chunk of data in the face of all the ways data can die. Magnetic domains can suffer magnetic interference, flash can suffer signal weakening over time, cosmic rays may flip bits on any medium, heat and cold and humidity have their effects too. Basically the passage of time is not a friend to your data, be it offline, nearline or online. Your only defence is to read the data occasionally to make sure you still can, and to rewrite it before you can no longer read it any more.

You mentioned a Synology NAS. They have a feature which will audit your data regularly, you should enable this feature. Never the less RAID is NOT A BACKUP and make sure you have a backup plan that works for you. If your data matters to you, then the 3-2-1 rule applies: Three copies, on two different media, one of which is offsite.
 
  • Like
Reactions: squirrel
Apple devices do not support DOS
That's interesting. If @squirrel cannot run SR. Here are some things to consider as alternatives. As I said, I don't know about Mac's. I only know a teeny bit more about Linux since I only use it once every two years or so when I want to try having it on my system as a backup in case Windows crashes. My latest attempt to update Mint on a separate partition crashed that Linux system. Have to fix it later. Anyway, if I recall, Mac's have a Linux subsystem or something like it under the hood, especially the command line.

Backing up the SSD with an image backup (every sector) would force the SSD to read all sectors and, as the SR docs say, bring the drives attention to each sector. An AV scan will force the drive to read all executables. You could use DD from the command line to copy every sector to /dev/null. Turn on verbose logging and tell it to ignore errors initially. You still want to read every sector that it can. But, errors show a need for further maintenance or troubleshooting. Make double dog super ultra incredibly measure thrice cut once sure you know which DD parameter is which and which DRIVE is which. Copy in the wrong direction and you could erase your SSD and all your data. If that sounds really scary, you may not want to do it. You may find something like Disk Utility in the utilities which may be able to a read sector scan. There may be something like Windows chkdisk. I think it's the fsck command but I don't know if that does sector scans. It may be only the file system.

If you want to fill the SSD to force it to write empty sectors, you can use DD to copy /dev/random or /dev/urandom to some actual files. I don't remember the difference between those commands. ( https://en.wikipedia.org/wiki//dev/random ) Years ago, I made numerous gibberish files on on Linux and transported them to Windows. I sometimes use them to fill hard drives. I made something like 32 MB, 64 MB, 128 MB, 256 MB, 512 MB, 1024 MB, 2048 MB, 4096 MB, and 8192 MB files. You can specify the size. Again, make double dog sure you get the DD parameters right. Make sure you clearly specify the output path. Don't just point it to a "drive". Then, just copy them repeatedly with new file names to fill up space. Windows can automatically generate new file names while copying from the GUI file manager. Not sure about Linux / Mac.

You may wish to fill up an SSD briefly for testing, but make sure your system still has space for temp files and swap space or you could crash the system. Generally you want to leave 10% of an SSD empty. This is called overprovisioning and it allows space for the drive to do housekeeping operations. The TRIM command allows the OS to tell the drive which blocks need erasing. The drive can then do this in the background which speeds up performance when writing to sectors that were previously occupied. You want the TRIM function to be turned on. You can Google for ways to check on that.

You storage gurus, Linux gurus, and Mac gurus with more knowledge jump in with specifics if needed. Hope this helps.

May your bits be stable and your interfaces be fast. :cool: Ron
 
  • Like
Reactions: squirrel
Thank you all for your comments, I’ll study the content. Of course I now realise that saying I had Linux on my Lenovo was irrelevant, what I should have said was that it had an intel processor so runs SR just fine. Of course my Mac is a different story as it has an Apple silicon M1 processor and therefore won’t run SR in its present from thus my question of a workaround.
Any files or photos I’m working on are immediately copied to my server. Then every few months my main server is backed up to my older server which normally is not powered.
 
Last edited:
If the question is resilience of your data and backups, maybe do what I do:
3x MacBook > TimeMachine (on Synology, over SMB) > CloudSync to OneDrive. You could replace the CloudSync with SyncThing to replicate one-way to another device.

In parallel, our MacBooks also have OneDrive integrated and sync into a personal account each.

On running SpinRite on the M1 SSD, the question is whether it can be extracted and put into a caddy for a compatible machine to run SR on it. With the above solution, I so-don't-care if it dies because it's easily recovered (less time and effort than taking the case apart and removing the drive).
 
  • Like
Reactions: squirrel
FYI, all Apple Silicon Macs (M1 and M2 variants) are SOC (system on a chip) devices. You can't remove the RAM or SSD...they are part of the M1/M2 SOC chip.