Recently i did a truenas new build. I inserted the sata data cables. does the order matter?
and how would i know which drive in which bay to remove if later need replacing?
and if done wrong, can i simply shutdown the nas and rewire, will truenas be ok doing that or will that corrupt the zraid pool?
*update
found this
Thanks a lot!
So to summarize, I will have to;
_ In GUI, detach Zpool and then shut down the NAS
_ Disconnect and clean everything, re-assemble
_ Restart NAS and in GUI import back Zpool (auto-import may work, I guess).
ok so that solves the issue for how to safely change the sata ports i assume?
but can anyone explains how this works. like in truenas, how will i know which drive bay had the bad drive to remove that? that’s what i’m worried about
Order does not matter, ZFS uses UUID to identify drives. It’s a unique, serial-number-like identifier.
As long as all the drives in the pool can be ‘seen / presented to’ the CPU, it’ll import the pool just fine. So you could move connectors around on the motherboard, add a HBA, etc. it doesn’t matter. If you move stuff to a HBA, you’ll have to ensure that the HBA is presenting the moved drives to the CPU.
UUID is not the serial # of the drive. The human-readable serial number associated with each of my hard drives is printed on a separate sticker on the edge / back of each HDD (thank you, HGST, RIP), see here.
If your drives do not feature a serial # on the edge or the drives are not visible inside their hot swap bays, then I suggest using a label printer to mark them or the hot swap cover associated with each drive.
It displayed a lot of info, but is there some way to also display the sata port number it is using for each drive?
That way i can then check my motherboard manual to see which sata port that is connected to, to then know which drive bay that drive is located.
So i don’t accidentally remove the wrong drive in future.
Also i can then check if the sata ports are in order, or whether i need to reinsert the sata data cables or not in the right order (for me it would be from left to right port sata ports 1…2…3. and so on).
The Plan
We want to discover the serial number of the hard drive connected to SATA port 6. That way, we can open the system and locate the hard drive easier because the serial number is usually printed on the drive’s label. Each hard drive in this system has the serial number, model number, and WWN (World Wide Name) printed on the label. Hard drive label information can vary, so check labels to be sure of the kind of data you are looking for in Bash. We can use any combination of this information to identify the physical hard drive.
But how can we find this information from a command line?
lsblk
lsblk (List Block Devices) shows a wealth of information about all connected hard drives.
sounds similar to my predicament
I guess that would be the simplest way wouldnt it. After u discover a drive problem, it says the serial number is the issue.
Boot down truenas. Remove the drive from bay, check the serial number. Easy enough. Just to be 100% sure, you are pulling out the right drive. Cauz imagine for a 4 drive raidz, if u pull the wrong one, so 2 disks out of commission then your whole pool goes kapoot (sure ud still have backups hopefully but still it’s not pleasant)
But i just wondered is there a way to check from shell? so i can associate which drive is using which ports for each of the bays, then i can label them (or perhaps recable them) as necessary.
As a new builder, this is probably one mistake i did, cauz i didn’t know about this i just plug in all the sata ports without much thought tbh.
hm in truenas disks it shows column serial. I’m assuming these serials matches the seagate exos labels on the drive
Yes, in the TrueNAS GUI, it does show the human-readable form of a S/N. But ZFS uses the UUID instead, which presumably goes a level deeper re: preventing the duplicate instances of S/N across drives / OEMs / whatever.
Presumably that also helps ZFS deal with niceties such as someone partitioning their hard drive three ways and using each partition for a different purpose, such as SLOG, boot drive, and L2ARC. We cannot do that with the GUI, but the CLI allows all sorts of clever things that can later really bite you in the butt if you don’t know what you’re doing.