Renaming Disks

HRS

Dabbler
Joined
Aug 4, 2014
Messages
39
I am about to replace a disk in my pool.
Last year I replaced two disks and I noticed that those (two) disks have different labels ("adax" instead of "gptid/..."):

NAME
volume1
raidz2-0
gptid/c890406f-13f8-11e4-a66e-d05099192b2f
gptid/82bfc1d7-1c29-11e4-bce1-d05099192b2f
gptid/ca2fd8e8-13f8-11e4-a66e-d05099192b2f
ada2
ada4
gptid/ccadec6b-13f8-11e4-a66e-d05099192b2f

1. How do I make sure that the current disk I am replacing will have a "normal" (=gptid) label?
2. Can I rename the two disks (ada2, ada4) to a gptid style label?

thanks
 

CraigD

Patron
Joined
Mar 8, 2016
Messages
343
Always use the serial number of the drive

You may find a bad drive (via serial number) that is physically in you server but is not showing in your GUI

Have Fun
 

HRS

Dabbler
Joined
Aug 4, 2014
Messages
39
Thanks
But I do not understand:
1. how the gptid/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee relates to the 12 character s/n
2. How do I regenerate gptid labels for the disks
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
how the gptid/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee relates to the 12 character s/n
It doesn't.
How do I regenerate gptid labels for the disks
Really, at this point, you don't. You've replaced a couple of disks at the command line without partitioning them properly first. You can see if there's a corresponding gptid for those two disks by running glabel status, but I'm not aware of a good way to tell the pool to use that designation instead of ada2. Disk replacements done through the GUI, though, will be partitioned properly and attached by the gptid.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
How do I make sure that the current disk I am replacing will have a "normal" (=gptid) label?
You must have done these at the command line. Why would you do that?
 

HRS

Dabbler
Joined
Aug 4, 2014
Messages
39
Thanks all.
Indeed I replaced the two disks using the command line (following advice I found in the forum).
This time I used the GUI, following the simple (if somewhat lengthy) video : link

After successfully replacing the new drive, I followed the same procedure with the two older drives (without actually replacing them), and now all labels are normal (the pool worked perfectly before, but I wanted to be on the safe side)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
Indeed I replaced the two disks using the command line (following advice I found in the forum).
Could you share the link to where you found that advice? Because it isn't something we'd generally recommend.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421

HRS

Dabbler
Joined
Aug 4, 2014
Messages
39
Not on this forum
True.
I believe it was in the FreeBSD forum (I have a copy of the instructions, but did not save the link to the post).

Anyway, its good to see that the GUI is functional and easy, and the forum is so responsive.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
In general, you shouldn't do anything at the CLI that can be done at the GUI. You can fudge this to a degree if you really know what you're doing, but it's easy to leave the backend system confused about what's going on.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I believe it was in the FreeBSD forum (I have a copy of the instructions, but did not save the link to the post).
FreeNAS uses FreeBSD as the base operating system, but FreeNAS is an appliance that should be used from the GUI. The GUI passes instructions through the middleware that automatically does things for you that you don't know about. One of those things is that it creates a swap partition on each of your data drives and a second partition for the data. So partition 1 is the 2 GB swap partition and partition 2 is the ZFS data partition. Without using the GUI, you can do this manually, but it takes a lot of extra steps that the FreeBSD forum is not aware of. If you have a question about your FreeNAS system, the FreeNAS forum is the place to find the answer. The two drives that you replaced at the command line, it might be a good idea to replace them again, even though they are working, just to get them partitioned correctly.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
You must have done these at the command line. Why would you do that?
I just replaced a drive (brand new except for extensive SMART testing) using the CLI because I had exported a degraded pool (which might have been a mistake) and could not reimport it and replace the failing drive through the GUI.

It was da0 when I replaced it but is now da7, and that is how it shows in zpool status. The Serial Number shows in the GUI, but glabel status does not show it. Does it matter that it now doesn't have a gptid label?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
It's not ideal, but I doubt it'll cause immediate problems. It would have been better if you'd partitioned the disk and identified it by gptid; that process is discussed in https://www.ixsystems.com/community/resources/creating-a-degraded-pool.100/
Would there be any advantage in detaching it and erasing it, then reattaching it via the GUI so it gets a regular gptid label? (It's a member of a RaidZ2 vdev, so I hope that the vdev will survive without catastrophe for the few hours that resilvering will take.)
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Would there be any advantage in detaching it and erasing it, then reattaching it via the GUI so it gets a regular gptid label?
I already answered this question. It is not just a partition label that is missing. The disk did not get partitioned at all and is missing the swap partition because of it. Yes, there is an advantage in having the disk partitioned in the standard way, but it is your choice if you want to do it. If you only change one disk at a time, the RAIDz2 pool still has redundancy, so your data should not be at risk.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
You had answered the OP, and I hadn't read carefully enough all the preceding messages. I jumped in to respond to the "Why would you do that?" referring to replacing a drive using the CLI.

I have decided to replace the drive and partition it correctly, but I cannot replace it using either the legacy GUI or the new one: in the legacy GUI there is a drop-down box for "Member disk" that requires a value, but nothing displays there. In the new GUI I have sometimes managed to get the "Member disk" line to display "da7", but when I click "Replace" it says that that is invalid.

Can I offline the disk from the GUI (that does work), then detach the volume using the GUI, repartition the drive from the command line, then add it again from the GUI?
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
Can I offline the disk from the GUI (that does work), then detach the volume using the GUI, repartition the drive from the command line, then add it again from the GUI?
That didn't work, of course, because I was unable to import the degraded pool, but at the CLI I have replaced /dev/da7 by gptid/<alphanumerical soup>, and it is resilvering
 
Last edited:

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
A somewhat related issue.
I had an SSD with the system on it and two hard drives for data. These were named:
ada0 (SSD)
ada1 (HD1)
ada2 (HD2)
Shortly after install and set up, drive HD2 was found to be faulty. I had it replaced, and inserted the new disk via the GUI. After re-silvering the new disk, the naming convention did something very undesirable, namely:
ada0 (HD1)
ada1 (SSD)
ada2 (HD2)
Although it hasn't presented any operational issues so far, I loath the new 'convention' that the SSD should be anything other than ada0, which is how I had my head around it thus far. Is there anything not too destructive I can do to swop these names back to their original layout?
 
Last edited:
Top