Post Disk Replace - gptid instead of da1p2 in zpool status?

Status
Not open for further replies.

Stephen J

Dabbler
Joined
Feb 3, 2012
Messages
49
So, I had a disk failure yesterday. I replaced the disk and ran a resilver. Now that it is done, everything is happy but my zpool status is listing the new disk as gptid/4e2c0332-944f-11e3-86c6-00259066aad8 instead of da1p2 like the original. Here is the output of my zpool status:
NAME STATE READ WRITE CKSUM
morodata ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
da0p2 ONLINE 0 0 0
da8p2 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
gptid/4e2c0332-944f-11e3-86c6-00259066aad8 ONLINE 0 0 0
da9p2 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
da2p2 ONLINE 0 0 0
da10p2 ONLINE 0 0 0
mirror-3 ONLINE 0 0 0
da3p2 ONLINE 0 0 0
da11p2 ONLINE 0 0 0
mirror-4 ONLINE 0 0 0
da4p2 ONLINE 0 0 0
da12p2 ONLINE 0 0 0
cache
da5 ONLINE 0 0 0
da6 ONLINE 0 0 0
da13 ONLINE 0 0 0
da14 ONLINE 0 0 0

I am wondering why. the pool is a 512 byte sector and I had to enable the two sysctls to get it to do less than 4K on the new disk. I am running 9.1.1-RELEASE.
I would also like to change it if that is at all possible so it matches all the other disk names.

Thanks,
Stephen
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, what the daXp2 means versus gptid is that you didn't create the pool in FreeNAS, or you didn't create it per the manual. gptids are the preferred method for FreeNAS. In short, you did stuff wrong in the past, and now that you did it right it's not matching everything else. You should just ignore the problem or destroy the pool and create it properly.
 

Stephen J

Dabbler
Joined
Feb 3, 2012
Messages
49
Cyberjock,
Actually, I did create the pool in FreeNAS via the GUI. It was v. 8.0.3 at the time. Not sure if that makes a difference. Minus the condescension and apparent bad mood in your response, thank you for the input. I think it provides the information that I need.
Stephen
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
LOL. Whatever. Good luck to you!
 

MtK

Patron
Joined
Jun 22, 2013
Messages
471
Well, what the daXp2 means versus gptid is that you didn't create the pool in FreeNAS, or you didn't create it per the manual. gptids are the preferred method for FreeNAS. In short, you did stuff wrong in the past, and now that you did it right it's not matching everything else. You should just ignore the problem or destroy the pool and create it properly.

I'm about to replace a disk myself and was wondering what is the right way to do this.
GPTID is not mentioned anywhere in the documents, except a page that shows the pool status, and an explanation on how to add the new gptid after it has been previously created.

I think a new page that explains how to properly use gptid (for both a new pool and a disk replacement) is needed. even more so, since this is NOT possible through the GUI which makes the documentation/manual incomplete...
 

Stephen J

Dabbler
Joined
Feb 3, 2012
Messages
49
I would add to what MtK said that more info about using gptid is needed. For me, having the daX is what allows me to know which disk the the physical array is which. Since we don't get the fancy bells and whistles of $$$ SANs like Red lights for failed disks and such.
 

MtK

Patron
Joined
Jun 22, 2013
Messages
471

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm about to replace a disk myself and was wondering what is the right way to do this.
GPTID is not mentioned anywhere in the documents, except a page that shows the pool status, and an explanation on how to add the new gptid after it has been previously created.

the GPTIDs are internal to how FreeNAS works. You don't need to look at them normally. I don't think you see them in the GUI.. anywhere. You can't add GPTIDs after its been created. GPTIDs are created when the disk is setup by FreeNAS for a zpool. You shouldn't have to add(or remove) GPTIDs. Because if you followed the manual for pool creation, and replaced disks in accordance with the manual, etc you'd always have GPTIDs created and managed for you. The GPTIDs require no action whatsoever on your part to be properly handled or maintained.

So maybe this clears up why I said that the user created the pool from the CLI or some other product. We do get a lot of people that create pools from Solaris, NAS4Free, ZFS on linux, etc and they do an import and think nothing more of it. Then months or years later they realize they made a mistake somewhere. I have no clue what the OP did, but it's obvious from his output that *something* is not right. Somewhere that pool was not created by the FreeNAS GUI.

And at the end of the day, I already provided the information the OP wanted, despite him being a jerk back to me. I told him to ignore the problem or recreate the pool from backup. And if he had not written a response and did more searching we've discussed this before. And his whole complaint revolves around wanting things to "look nice". Well, we're not here for things to "look nice". We're here for functionality and reliability. And there's nothing overly wrong with the GPTID. That disk is in better condition in the event of a problem to be importable than all of the other disks.

I think a new page that explains how to properly use gptid (for both a new pool and a disk replacement) is needed. even more so, since this is NOT possible through the GUI which makes the documentation/manual incomplete...

Define "properly". Big picture, it's an internal structure for FreeNAS. 99.99% of the time you do not need to know GPTIDs to manage your server. So naturally, they are not included in the manual.

And that "even more so" should say "even less so" in my opinion. You're right it's not possible through the GUI. Because the GUI does all the dirty work for you regarding GPTIDs. It gives you daXX or adaXX. When you get SMART errors, you get daXX. When you schedule SMART diagnostics, you will see daXX. When a disk is dropped from the pool it shows up as offline in the GUI as daXX. When you do disk replacements it shows up as daXX. When you go to add a vdev to a pool, you'll choose disks in the daXX designation. The only time you'll ever have to deal with GPTIDs is if you start doing zpool status and don't understand what you are looking at. And if you check out the manual, there's little documentation on CLI stuff because as a regular course of business you should not be using the CLI. Anything you do from the CLI is behind the back of FreeNAS. FreeNAS at the deepest levels IS the GUI. And you are literally going behind its back when you choose to do things from the CLI. Plenty of people have suffered significant data loss because they used the CLI. So we(the more senior posters here) almost never recommend it except for troubleshooting where its nice to have some validation for some users, and those of us that are more experience will never tell you to do things that we know will really make FreeNAS angry.

If you want to read up on GPTIDs, there's lots of FreeBSD documentation on the topic. In my opinion, the FreeNAS manual should only provide information for properly managing FreeNAS(the GUI). If you want to start doing things outside of that, there is already very well written documentation on that topic. The FreeBSD handbook for one. I have that thing bookmarked, and I refer to it several times a week. The FreeNAS manual is very short on all of the CLI commands for FreeNAS, nor is it very well documented what commands are available in the jail. And I think we'll all agree that the FreeNAS manual should not include an in-depth explanation for everything you can run in the jail. And now that both FreeBSD and linux runs in the jail, should the manual be expanded to include all of the linux commands? I think we'll all agree again that stuff like that shouldn't be in the manual either. VMWare doesn't include manuals for every guest OS you can run in their VM environment. They'll include some basic setup, but that's about the extent of it.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
looking back at these topics:
http://forums.freenas.org/index.php...ent-sized-disks-freenas-9-1.15989/#post-85222
http://forums.freenas.org/index.php?threads/about-to-expand-my-zpool.16067/page-2[and maybe more]

is it now "safe" (v9.2.1, while the pool was originally created from the CLI) to use the GUI without having to manually partition (swap+gptid) the disk?
is it still "safe" for disk with different sizes?

this needs to be added to the docs as well.

Hehe. If you read that first link, you'll see me comment and make the same warnings I just explained.

1. Doing things from the CLI is dangerous and should not be done as a regular course of business. And the reason why your pool had to be created from the CLI is because the "new" volume manager wouldn't let you do what you wanted to do. The "old" volume manager would let you do whatever you wanted, even if it was completely idiotic. And if you check out bug ticket 3274 you'll see that I advocated for the old volume manager and iXsystems finally added it back. That was for people like you MtK that did non-standard things. Some of those things are dangerous, some aren't. They took it away because there was way too many people doing dangerous things and they thought it was better to just forbid all but the most ideal situations.
2. I told you that you should be doing GPTIDs and not partitions. And here I am again telling people that. Consistency for the win!

If you read the second link, you'll see me comment there about...

1. Oh my. doing things from the CLI is dangerous? That's #1 above too!
2. Oh my.. GPTIDs not used. Hey.. this must be a trick question.. that's #2 above too.

And what did both of those situations have in common? Creating pools from the CLI. Nowhere in the manual does it tell you to create pools from the CLI. It tells you to use the GUI. That's it. If you want to go off doing your own thing, you accept any and all risks and responsibilities with those decisions. For better or for worse. It's like marrying a slut. You married her. If you don't like that, you shouldn't have done that.

As for "safe", you don't have to manually partition the disks anymore. The legacy volume manager has been restored(thank god?). So now I can tell people to use the legacy volume manager to do what you want without having to "hack" it from the CLI.
It is still "safe" for different size disks. Just as it has always been. The only reason the "new" volume manager wouldn't let you was because the software was coded to prevent you from doing just about anything except the most ideal situation. And mixing disk sizes is not ideal. You end up limiting all of the disks in that vdev to the same size. The real problem was that people were buying 3TB Seagate disks and 3Tb Western Digital disks, and one would be 50MB smaller than the other. The "new" volume manager would say that the disks weren't the same size and it would stop you from using them in a vdev! How silly! And this happens regularly!

So now, when someone tells me they just created a pool from the CLI I'm going to publicly flog them.. ok, not really. But they will have absolutely no reason to argue for why they "needed" to do it from the CLI and couldn't use the GUI(and therefore follow the manual). I'll probably just ignore them and let them have their stuff be wrong. I don't really want to keep telling people to RTFM for the rest of my life. I do have better things to do. Lost data has a way with really highlighting your past mistakes.

I mean, what do you expect if you don't follow the manual? What is amazing to me is that so many people can willingly ignore the manual, then get upset when the turds hit the fan and they end up with poop all over their face. Surprise!
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
I would add to what MtK said that more info about using gptid is needed. For me, having the daX is what allows me to know which disk the the physical array is which. Since we don't get the fancy bells and whistles of $$$ SANs like Red lights for failed disks and such.

A gptid can be thought of as a label for a partition. (Though technically labels are different.) FreeNAS uses gptid because drives can enumerate in a different order for various reasons and mappings get screwed up. A gptid is an absolute reference to a partition. Running "gpart list" at a shell prompt will show you all your partitions and their gptids => Just look at the "rawuuid" field, that's the gptid for the partition. That value will correspond to a device in /dev/gptid.

Lets say you had a disk called /dev/da6. Then lets say you did "gpart list" and you got back:

Geom name: da6
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: da6p1
Mediasize: 2000398848000 (1.8T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
rawuuid: db466bd2-7ee4-11e3-b083-0015172951de
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: (null)
length: 2000398848000
offset: 65536
type: freebsd-zfs
index: 1
end: 3907029127
start: 128
Consumers:
1. Name: da6
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Stripesize: 4096

Then you will find a device called /dev/gptid/db466bd2-7ee4-11e3-b083-0015172951de.

When doing pool operations one should always be using the /dev/gptid/xxxxx devices.
 

MtK

Patron
Joined
Jun 22, 2013
Messages
471
well, thank, though my question wasn't really "what is GPTID?" or "how do I use it?", but more of an orientation for all of those users who have used it (cause the "new" volume manager didn't allow them otherwise).

so from what I understand, if I manually created the pool (with SWAP & GPTID) and I put OFFLINE one disk (and took it out) and now the pool looks like this:
Code:
        NAME                                            STATE     READ WRITE CKSUM
        Storage                                         DEGRADED     0     0     0
          raidz2-0                                      DEGRADED     0     0     0
            gptid/64d80576-5a7d-11e3-bce5-002590d91105  ONLINE       0     0     0
            gptid/651b51ee-5a7d-11e3-bce5-002590d91105  ONLINE       0     0     0
            gptid/655ff841-5a7d-11e3-bce5-002590d91105  ONLINE       0     0     0
            gptid/65a2fa41-5a7d-11e3-bce5-002590d91105  ONLINE       0     0     0
            gptid/65dfc343-5a7d-11e3-bce5-002590d91105  ONLINE       0     0     0
            15682148048738618412                        OFFLINE      0     0     0  was /dev/gptid/662e1044-5a7d-11e3-bce5-002590d91105

all I have to do is put a new disk and set it ONLINE through the GUI (that's all that the manual says)?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yep.
 
Status
Not open for further replies.
Top