Which drive is which?

Status
Not open for further replies.

John M. Długosz

Contributor
Joined
Sep 22, 2013
Messages
160
If the ZFS system refers to a drive as /dev/hda etc., and my cables use sockets labeled SATA2 or SAS4 etc., how do I reconcile the two? Eventually I'll need to know which disk FreeNAS is complaining about, or refer to the right one when configuring something.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
What I do is smartctl -a /dev/hda. Then take note of the serial number it lists. Write that number down. Then shutdown the system and find that disk. Normally, however, they are numerically listed in order. So da0 might be your USB stick, da1 might be your SATA0 port, da2 will be SATA1 and so on. But definitely use serial numbers. Plenty of people have lost data because they offlined the wrong drives and then couldn't rebuild their pools.

I just helped someone last week that had a RAIDZ2 of 6 disks. First he noticed that a disk was bad. He then offlined the wrong disk. Thanks to the bad disk, pool performance was less than 1MB/sec so rebuilding the pool before offlining the bad disk was impossible. Then I stepped in and helped him offline the correct disk. Just imagine his horror if he had offlined a second wrong disk! He'd have a pool that could have taken years to resilver(assuming it ever finished) and would have certainly lost his data.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
And don't label them with stickers for da0, da1, etc. If da1 goes away and you reboot da2 will now be come da1. So you'll make bad assumptions about the bad disk and you'll kill your pool due to not understanding what is going on. Plenty of people have gleefully pulled good disks because they implicitly trusted those stickers.

Go by serial number or go home. :)
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
print out (paper, sticker paper, label maker) each serial number
attach to the section of disk you can actually see (depending on orientation in case), just dont cover the 'breather' holes you see on the drives.
 

John M. Długosz

Contributor
Joined
Sep 22, 2013
Messages
160
Yes, I was thinking of labeling the ends of the drive with a short code of my own. The end with the connectors have very little space, and non-hotswap bays have the cable end facing out. So just use a 3-letter code of my own.
Then keep a log of information on that disk, by code: when I bought and where (so I can find the invoice again) for warranty use, any issues, etc. I should include the brand and serial number with that.

Too bad the normal displays in the FreeNAS GUI don't use the serial numbers or user-defined names.

Edit: By the way, you used the example /dev/hda. "hda" would be something in linux as it uses letters. FreeBSD uses numbers, so you'd expect sd0, da0, ada0, etc.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If you can't see the serial numbers in the FreeNAS GUI then you probably have a configuration that isn't completely compatible with FreeNAS. All of your disk serial numbers should be under Storage/Volumes/View Disks.

If they are blank(or wrong) then you should be asking yourself what is going on and opening a ticket/asking the forum for help. My first guess would be you are using a RAID controller where you shouldn't be. This also means that you probably can't run SMART test and/or SMART monitoring(either of those are very bad for reliability's sake).

What hardware are you using?
 
Status
Not open for further replies.
Top