The device's "real" name is /dev/sdi.

If I add another device to the system, it'll be /dev/sdj. My question is 
if I do a "zpool replace media /dev/sdi /dev/sdj" and then remove 
/dev/sdi.... then /dev/sdj is not /dev/sdi... and I don't know how zpool 
will handle it. I /think/ it'll be fine, but...

And again, I wish I remembered how I got zfs to go from "sdi" to 
"ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T2556461". zfs recommended I do it, but I 
forget how/why/etc...


But basically, the steps should be:

(My pool name is media, bad device is /dev/sdi, new device is /dev/sdj)

1. Add new drive (/dev/sdj)
2. zpool offline media
3. zpool replace media sdi sdj
4. Wait a couple of days till that's done. 
5. Physically remove /dev/sdi from system. 
6. Reboot
7. (possibly?) zpool online media


Is that about right? Or do I need /dev/sdi and /dev/sdj in the zpool 
replace?


On Fri, 8 May 2015, Linda Kateley wrote:

> Hi,
>
> So you do need to use the device id for replace. You might be able to get the 
> names from zpool history.
>
> I tried to look through my zol class and I can't remember how you map the 
> drives in linux. I am sure someone on the list knows how to map drives.
>
> You might want to #zpool offline poolname diskname and then physically 
> replace and then #zpool online poolname diskname
>
> linda
>
> On 5/8/15 9:51 AM, Clug wrote:
>> Ok, so one of the drives in my ZFS pool is faulty.
>> 
>> Now I know I've replaced a drive before, but for some reason I'm kind of 
>> blanking and all the examples are for /dev/sd???, and I've had my zpool use 
>> the werid names since then, and since I have Linda on the list I figured 
>> it'd be crazy NOT to ask (;
>> 
>> So right now my devices all look like this:
>>
>>   ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T2556461
>> 
>> Which is convenient since I can pull it out and look at the serial number. 
>> And I'm sure I can go:
>>
>>   # zpool replace media ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T2556461
>> 
>> and it'll start moving stuff off there.
>> 
>> But... I don't remember how I then get that drive out, and then how I add 
>> the new one, and how I find that insane long device name for the new 
>> device.
>> 
>> 
>> SECONDARY QUESTION: Would it be a better idea to add the new drive (I have 
>> a free SATA port, it wouldn't be in my array but the server would see it as 
>> /dev/sdj), let it do the replacement live, and THEN remove the old one and 
>> put the new disc in the array?
>> 
>> If so, again, how do I get the "new" device name? Or should I just go
>>
>>   # zpool replace media ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T2556461 /dev/sdj
>> 
>> I think that should actually detach the old drive for me, too, and then all 
>> I'd have to do is tell ZFS to 'translate' the device name? If that's the 
>> better solution, can someone remind me how to make it translate the name? 
>> (:
>> 
>> 
>> Thanks!
>> 
>> -- 
>> _______________________________________________
>> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
>> tclug-list at mn-linux.org
>> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>