ada numbers not matching - when adding a new HDD.

Status
Not open for further replies.

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
I'm having problems identifying which drive is which - I have just physically installed a new 2TB drive. The problem is, after clicking on "Create New Volume" the pop-up box "Member discs" shows all drives, not just the unmounted ones (like FreeNAS 0.7), and the ada numbers don't match :-(

Physically there are 7 drives;
2 x 500G (one mounted)
3 x 1TB (all Mounted)
2 x 2TB (one mounted one new)

Under "Storage" I can click the "View Disks" button by each HDD shown. This brings up the data for an individual drive (note, the s/n field is blank for all drives) and here is what is shown;

Volume Size Name/Identifier
1TB1 1TB ada0p1
1TB3 1TB ada3p1
2TB2 2TB ada4p1
1TB2 1TB ada1p1
500G1 500G ada7p1

But under "Create Volume", the "Member disks" show exactly as;
ada0 (1.0 TB)
ada1 (1.0 TB)
ada2 (2.0 TB)
ada3 (2.0 TB)
ada4 (1.0 TB)
ada5 (500.1 GB)
ada6 (500.1 GB)


So from this you can see the ada numbers are different, and if I was to pick ada 4 for example, the sizes are different in each list.

How do I tell which is which. I don't want to erase all my data if I pick the wrong disk as I have more to mount.

I hope I have provided enough information - took a while - if not please ask and I'll do my best.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Which version of FreeNAS are you using, this sounds like a bug.

Try doing this from the command line and you should be able to see which disks are in use. If you have trouble, post the results.


"gpart show"


EDIT: I would guess "ada2", but see what "gpart show" displays
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
Thanks,

gpart show gave too much to type in, but in essence;

ada0 GPT (932G)
ada1 GPT (932G)
ada3 GPT (1.8T) [Corrupt]
ada4 GPT (932G)
ada5 GPT (466G)
ada6 MBR (466G)

So that's only 6 drives (missing the good 2TB I imagine) although it kind of matches the results from the "Create Volume" pop-up.

Also I see the last one is MBR not GPT which does make sense.

It still seems pretty high risk adding a drive and maybe deleting data by getting the wrong drive.

Can someone please confirm if the ada numbers in the "View Disks" table is correct or muddled like mine.

Is the only safe way to only have one drive plugged in at a time? Seems tedious.
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
Silly question - How can I copy a screen dump from my freeNAS machine? Or is there some way of doing all this through the web GUI?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Well it definitely looks like a bug, but "gpart show" is going to be the best way to figure out which disk is which without unplugging them one at a time. Gpart show shouldn't be leaving out any of your disks, are you sure you didn't miss one in the output?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Can someone please confirm if the ada numbers in the "View Disks" table is correct or muddled like mine.

Everybody's view is going to be different, so no one is going to be able to confirm anything except that it appears you've found a bug.
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
Hmm, I thought it could be off the top of the screen. I've scrolled up and there is more stuff info, but definitely no second 2TB drive. I went into "Sharing" then "Add Windows Share" then "Browse" and I can browse the 2TB drive. If I can find some way to do a screen print I can hopefully provide some useful information.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
You can also try these two:

camcontrol devlist

sysctl kern.disks


They'll list your disks, but won't show you any paritition info. It just occurred to me that "gpart show" may not have displayed your new disk if it didn't have any partition info. See what you get from those other commands.
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
I think I'll shut down before adding drives. As long as I only plug in different sizes drives each time I'll be able to identify them. Also maybe a good time to add a sticky label to the drive itself.

With this method, is there any danger i could end up with two dives with the same ada number and it gets messed up? I guess we'll see.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Also maybe a good time to add a sticky label to the drive itself.

With this method, is there any danger i could end up with two dives with the same ada number and it gets messed up? I guess we'll see.

I originally thought labeling the disks with a sticker would be helpful, but the device names can change. You should NEVER end up with two devices with the same device name.
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
I think you may be right. The 2TB drive that does show under gpart show was UFS. The new drive would be nothing.

Is there a command to get back to the console command line? After I scrolled up I could not get back to the prompt.
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
Thanks again, Camcontrol devlist gave me all 7 drives and matches the gpart list as afar as ada numbers as you can tell the drive size form the s/n - very useful command for disk ID and replacement.

Sysctl kern also gacve me all the discs, but is now doing something odd. Not concerned about that for now.

I am really happy about Camcontrol devlist though. Thanks so much.
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
Ahh short-lived joy, camcontrol devlist give the drive model number not serial number. But still useful.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Is there a command to get back to the console command line? After I scrolled up I could not get back to the prompt.

"exit" will take you back to the console menu, not sure why you can't scroll back down.

Glad to hear "camcontrol devlist" was the magic bullet. There should probably be a ticket opened, you definitely found a bug. You can create a ticket by creating a free account at support.freenas.org. You get a medal for finding your first FreeNAS bug! ;)
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
Hey look a big thanks for your time helping me out on your weekend. I'm waiting for my confirmation email to do a ticket, might help someone else in the future.
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
Quite a lot in there, thanks for the link. Seeing I am about to set up new drives, and you are clearly a UFS guru, in your opinion which is more stable, UFS or ZFS? I am thinking after a crash or cold shut down. It seems that UFS hates a hard shutdown, maybe ZFS is the same.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
That's a tough question. In terms of recovering your data if something goes wrong, there are probably more tools availabe for UFS to salvage data. ZFS is in most cases pretty damn stable and usually can handle a crash or cold shutdown, but I've seen a few situations here where that didn't happen and people lost their data. There aren't any recovery tools that I'm aware of for ZFS for people to try and scrape their data off if something goes wrong and there's no back up. Once FreeNAS get's bumped up to FreeBSD 8.3 with ZFS v28, that version of ZFS may have fewer problems with those situations. It's always a good idea to keep a backup. Speaking of which, yesterday (the 31st) was "National Backup Day".....
 

konkon

Dabbler
Joined
Mar 20, 2012
Messages
27
Great thanks again, I've done a ticket. I have backups for most things, but you can only store so much stuff.

National Backup day - LOL. I'm in NZ, in my house it's National, get the damn thing to work day.
 
Status
Not open for further replies.
Top