• 1 Post
  • 13 Comments
Joined 11 months ago
cake
Cake day: October 24th, 2023

help-circle





  • If out of other options just do a simply zero format (e.g. diskutil zeroDisk diskX on macOS), and a long SMART test afterwards (e.g. smartctl -t long diskX). That’s what I do with my new disks and it served me well so far. For large capacity disks it is like a heavy 2 day process (1 day formatting, 1 day testing), but it gives me a piece of mind afterwards.


    Extra Hint: During any SMART long test make sure to disable disk sleep in your OS for the time, else test will abort (e.g. caffeinate -m on macOS). Also avoid crappy external enclosures that put the disks to sleep by themselves (or you may want to run a script that regularly reads a block from the disk to keep it awake.)

    Here’s my macOS script to handle the job (I needed it recently because a temporary crappy USB enclosure). It reads a block every 2 minutes via raw I/O w/o caching involved (“/dev/rdisk”)

    #!/bin/bash
    # $Id: keepdiskawake 64 2023-10-29 01:55:56Z tokai $
    
    if [ "$#" -ne 1 ]; then
    	echo "keepdiskawake: required argument required (disk identifier, volume name, or volume path)." 1>&2
    	exit 1
    fi
    
    MY_DISKID=`diskutil info "${1}" | awk '/Device Identifier:/ {print $3}'`
    
    if [[ ! -z "${MY_DISKID-}" ]]; then
    	printf '\033[35mPoking disk \033[1m"%s"\033[22m with identifier \033[1m"%s"\033[22m…\033[0m\n' "${MY_DISKNAME}" "${MY_DISKID}"
    	MY_RDISKID="/dev/r${MY_DISKID}"
    	echo "CTRL-C to quit"
    	while true; do
    		echo -n .
    		dd if="${MY_RDISKID}" of="/dev/null" count=1 2>/dev/null
    		sleep 120
    	done
    else
    	echo "keepdiskawake: Couldn't determine disk identifier for \"${1}\"." 1>&2
    	exit 1
    fi
    



  • If you improperly eject a disk while the filesystem is in a flux state it doesn’t matter which disk you use you’re very likely encounter that issue again. More so with some filesystems than others. APFS is for some reason worse in this regard, so best stick with the traditional “HFS+ w/ Journaling” on a Mac.

    If you transfer large collections of data you could/ probably should use rsync and not the Finder, preferably in a screen or tmux session. That way any crash of any of any the UI components will not mess up the copy process (even if Terminal.app goes down you’ll be able to reconnect to the screen/tmux session with the copy process still doing its thing). Also make sure your external disk has proper power all the time during the process (preferably do not attach another device during that time.)





  • I always buy new. But the used prices are typically not cheap enough here to make them worthwhile. If I only can save like ~20 EUR per disk, I rather go new than take a used/refurbished one with higher risk attached. I don’t buy below 18TB anymore though, so the market for tiny drives like 6TB may be a different situation.

    My recommendation check the TB not the drive price. You probably save a lot when you buy larger capacity disks.