I need to replace a bad disk in a zpool on FreeNAS.
zpool status
shows
gptid/5fe33556-3ff2-11e2-9437-f46d049aaeca UNAVAIL 0 0 0 cannot open
How do I find the serial # of that disk?
More:
glabel status
gives:
Name Status Components
ufs/FreeNASs3 N/A da0s3
ufs/FreeNASs4 N/A da0s4
ufsid/4fa405ab96518680 N/A da0s1a
ufs/FreeNASs1a N/A da0s1a
ufs/FreeNASs2a N/A da0s2a
gptid/5f3c0517-3ff2-11e2-9437-f46d049aaeca N/A ada1p2
gptid/60570005-3ff2-11e2-9437-f46d049aaeca N/A ada3p2
gptid/60ebeaa5-3ff2-11e2-9437-f46d049aaeca N/A ada4p2
gptid/a767b8ef-1c95-11e2-af4c-f46d049aaeca N/A ada6p2
gptid/61925b86-3ff2-11e2-9437-f46d049aaeca N/A ada9p2
gptid/4599731b-8f15-11e1-a14c-f46d049aaeca N/A ada10p2
I don't see gptid/5fe33556
in there.
And camcontrol devlist
gives:
<Hitachi HDS723030BLE640 MX6OAAB0> at scbus0 target 0 lun 0 (pass0,ada0)
<ST3000VX000-9YW166 CV13> at scbus4 target 0 lun 0 (pass1,ada1)
<ST3000VX000-9YW166 CV13> at scbus6 target 0 lun 0 (pass3,ada3)
<Hitachi HDS723030BLE640 MX6OAAB0> at scbus7 target 0 lun 0 (pass4,ada4)
<ST3000DM001-9YN166 CC4C> at scbus8 target 0 lun 0 (pass5,ada5)
<WDC WD30EZRX-00MMMB0 80.00A80> at scbus8 target 1 lun 0 (pass6,ada6)
<WDC WD30EZRX-00MMMB0 80.00A80> at scbus9 target 0 lun 0 (pass7,ada7)
<ST3000DM001-9YN166 CC4C> at scbus9 target 1 lun 0 (pass8,ada8)
<Hitachi HDS723030BLE640 MX6OAAB0> at scbus10 target 0 lun 0 (pass9,ada9)
<Hitachi HDS5C3030ALA630 MEAOA580> at scbus11 target 0 lun 0 (pass10,ada10)
< USB Flash Memory 1.00> at scbus12 target 0 lun 0 (pass11,da0)
Does that mean that ada2
is the bad disk?
UPDATE:
OK, I'm pretty sure that ada2
is the bad disk. And I have my notes, so I know which disk that is.
But it appears that I left a spare in there - ada0 - last time I was in the box. Can I replace ada2 with ada0 remotely? Until someone gets to the office?
To get a disk serial requires that it is running and available:
camcontrol identify <device> |grep ^serial
(this might be (S)ATA specific)smartcl -i <device> |grep ^Serial
In your case, I think the 3rd solution is the only available. So, Assuming you just want first identify the disk:
Try first a
glabel status
(as your drive is not shown asDOWN
orREMOVED
):You can see your partition with
glabel status
Then you can easily identify the disk device name (ex: da0 for the
gptid/c7868819-ddc1-11e2-8c3e-00138f3fd9c7
partition).You can have a look at your system starting log from
/var/log/messages
(aka "dmesg
"):You cannot see your partition with
glabel status
From there, you can easily spot which one is missing (da1 in this case), then have a look at
dmesg
to identify that disk.So, no real solution here. I just hope that it help you see things a bit more clear.
To know more:
source
You could try something like this. It worked for me:
that should output the entire list of serial numbers.
I made a script that lists all of the GPTID and associated hard drive serial number and device name.
Yes,
zpool replace
Assuming you need uuid of the particular disk on Linux based system you can get with:
or by fs label:
or by hardware connectivity :