Added a new SATA drive to server...

Status
Not open for further replies.

jrodder

Dabbler
Joined
Nov 10, 2011
Messages
28
and instead of what I expected, I got something else. I have 4 drives in a RAIDZ1. ada0-3. I added a 5th drive to the machine, planning to add it in as an extra drive not in the pool to use as an internal backup. Maybe some rsyncs to it or something. Upon booting up, now when I look at the GUI I am showing that FreeNAS has added the drive in, and assigned it as ada1, member of the RAIDZ. What used to be ada1 is now ada4, and not in the pool.

I am nervous about wiping and playing with the new disk now, since this is a production NAS. Is this normal behavior?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Take a step back. I hope that when you physically attached the drive and rebooted the system, you are looking at that data and you have not added the drive via the GUI.

In the GUI--> Storage --> View Disks
Are all your drives in the pool?

You could also type at a shell prompt "zpool status" (without the quotes) to see how many drives are in the pool.

What I'm hoping you find out is your drives have just been rearranged because you added a drive into the system. Fingers crossed.

Last thing, you could type "zpool history" to see what might have happened.

Let us know but don't go and make any sudden changes. If you find out you did add this drive to the pool, backup all your data immediately because if this drive fails a premature death, your pool goes away, all of it.
 

jrodder

Dabbler
Joined
Nov 10, 2011
Messages
28
Thanks for your reply.

Yes, all I have done is connected the drive to my system, and took a peek at the config in GUI after it booted. Only 4 drives in the array in GUI, as well as zpool status. I am guessing the drives got rearranged. But the reason I question it is because I would have expected to see some significant drive activity as the data was migrated to the new drive, and I didn't see that.

Code:
[root@HERMES] ~# zpool status
  pool: TANK
state: ONLINE
  scan: scrub repaired 0 in 2h49m with 0 errors on Sun Jun 16 02:49:42 2013
config:
 
        NAME                                            STATE    READ WRITE CKSUM
        TANK                                            ONLINE      0    0    0
          raidz1-0                                      ONLINE      0    0    0
            gptid/cadeccbf-eeb1-11e0-bcde-6c626d45a362  ONLINE      0    0    0
            gptid/adae9383-20e2-11e1-a996-0001028e8eeb  ONLINE      0    0    0
            gptid/cbe405e1-eeb1-11e0-bcde-6c626d45a362  ONLINE      0    0    0
            gptid/cc63cf11-eeb1-11e0-bcde-6c626d45a362  ONLINE      0    0    0
 
errors: No known data errors


Nothing really in the history:

2013-06-16.00:00:09 zpool scrub TANK
2013-06-17.14:46:31 zpool import -o cachefile=none -R /mnt -f 13747135527731237631
2013-06-17.14:46:31 zpool set cachefile=/data/zfs/zpool.cache TANK
Let us know but don't go and make any sudden changes. If you find out you did add this drive to the pool, backup all your data immediately because if this drive fails a premature death, your pool goes away, all of it.
Why is that, then? If the drive was added to the pool, wouldn't that be a RAIDZ1 with 5 drives?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Let's say you have six SATA connectors. You pick 4 and connect drives to them. You choose connector 0, 2, 4, and 5. So it shows up as ada0-3 in FreeNAS but in the BIOS hardware it's really not 0, 1 ,2 , 3. Now you add a new drive to say SATA connector 1. FreeNAS boots and sees another drive, it's now ada1 and you now see ada0, ada2, ada3, ada4 as your pool. The ada listing is not how the pool is defined, it's the gptid I believe (drive ID) during the format in FreeNAS. I could be wrong about that last part but fear not, you haven't done anything wrong.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Also, if this truly bugs you, make a backup, shut down your FreeNAS and rearrange the SATA cables. This is one of the beauties of ZFS, it doesn't care where the drives are so long as it can find them. Makes moving from one computer to another easy.
 

jrodder

Dabbler
Joined
Nov 10, 2011
Messages
28
Ok, so still slightly confused. I understand how the choices of SATA connectors and BIOS as it related to FreeNAS can create the scenario. I am confused as to how it could have happened so quickly, I would image all that data would have to be copied over to the new drive, after 5 minutes or so when I looked at the machine there wasn't a steady hard drive light as I would have expected, and by now even an IOstat wouldn't help me much. I am trying to figure out why I am looking at a drive in the GUI that used to be in the array, and now is not, the drive I just added is.

zCzPmQc.png


In the scenario you are describing, I would have expected to see ada1 as the new drive because of the SATA connector, but not as a member of the RAIDZ.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
No data was moved, none at all. The drive letters (original ada1 became new ada4) changed was all. Think about Windows, you can change the drive letter of a hard drive easily and you didn't move any data.
 

jrodder

Dabbler
Joined
Nov 10, 2011
Messages
28
Sorry, I didn't upload the pic properly. So the drive letter changed, yes. But why then is it showing my new drive as a member of the RAID? Or is that description not correct anymore?

*edit*

Ok yeah I feel silly now. That was literally just a description field, that likely was populated when the RAID was created, and doesn't change because FreeNAS isn't magically smart (yet) to tell what had happened, and rename the description. To find this out for sure, I would have what, just mapped the gptid to the ada and ensured that was the case?
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
The descriptions probably just got messed up.

To see what the drives are now, go to "view volumes" and click on the button "volume status". They're probably ada[0,2,3,4]

You cannot simply add a 5th drive to a 4 drive z1 and expect a 5 drive z1. Watch cyberjocks slideshow for how zfs works. You add drives in groups. Redundancy must exist in each group added. So if you add a group of one drive, you have no more redundancy.
 

jrodder

Dabbler
Joined
Nov 10, 2011
Messages
28
Thank you so much for your time gentlemen. I am pretty clear now. Thanks for your help in the other thread too btw, titan. I took a loss on that data, but luckily only lost a small percentage of what I needed before the drive gave up the ghost. Went back to a simple 4 drive ZFS on that one too, I'm okay with that level of redundancy on that machine.

Now its just a matter of how best to make use of this spare drive in the production machine. It looks like however in the GUI, rsync and ZFS replication tasks assume a destination of another machine, not an internal drive. I'll have to play around and see how to do it. I'll look for the cyberjocks slideshow. I thought I had a pretty good handle on ZFS when I set some machines up a couple/few years ago, but maybe that wasn't exactly true.
 
Status
Not open for further replies.
Top