Mirroring a zfs stripe to a single disk

Status
Not open for further replies.

krantz

Dabbler
Joined
Jun 2, 2013
Messages
41
Hello

couple of months ago, I installed Freenas on a dell computer I had long forgotten.

It has 1 internal 80 GB hard disk

I added:
a) 2 disks (usb) of 300gb each
b) 2 disks (usb) of 1 tb each

I configured all the disks to be part of a stripe.

Recently, 2 of the disks are reporting "4 uncorrectable offline errors" and I am kinda concerned since my whole life is in that array of disks.

So I bought today a 3 TB disk, and I´d like to add it to the pool as a "mirror", so once I have all my data in the 3 TB disk, I can proceed to remove all the previous disks, run tests, fix, and add them to the pool again.

Is this possible? If my idea is not possible, what is your recommendation?
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
You realize a stripe of 4 disks is crazy?

Also, usb drives of any kind are generally not recommended.

As to your question, you cannot take a 4 disk stripe, and mirror it with a single disk. The only way to 'convert to a mirror' is starting from a single disk. Even with 4 disks of the same size, I don't think you can convert the pool into redundancy.

I would create a new zpool on the 3tb disk, and copy everything onto it from the old zpool. That still leaves you with no redundancy. I'd then go and buy another 3tb disk and convert your new single disk vdev into a mirror so that you have redundancy. Once you're done with the old disks, you could mirror the 2 1tb drives, and add them into the pool. I wouldn't worry about the 300gb drives. They're not really worth it.

If at all possible, move the drives to run internal. External drives can cause lots of problems that are hard to troubleshoot, let alone the risk of data loss.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
I would create a new zpool on the 3tb disk, and copy everything onto it from the old zpool. That still leaves you with no redundancy.
Actually, the data is redundant at this point.

I'd then go and buy another 3tb disk and convert your new single disk vdev into a mirror so that you have redundancy. Once you're done with the old disks, you could mirror the 2 1tb drives, and add them into the pool.
Big +1 to this. Optionally a separate pool with the 1 TB drives.
 

krantz

Dabbler
Joined
Jun 2, 2013
Messages
41
Thanks, guys

Then I´ll go get another 3tb disk, add both as mirror, then copy everything, destroy old pool, add the good disks to the new pool.

Peace,
-Kz
 

krantz

Dabbler
Joined
Jun 2, 2013
Messages
41
Titan, I got my other 3 tb disk and created a new mirrored pool. is there any special command to copy / replicate everything? Or i have to do a "cp" ?

Thanks!
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
Like anything, "there's more than one way to do it".

You could use cp if you wanted.

I'd probably use rsync, something like "rsync -avh /mnt/oldpool /mnt/newpool".

You could also pipe two tar's together. Or cpio in pass-through mode.
 

krantz

Dabbler
Joined
Jun 2, 2013
Messages
41
Like anything, "there's more than one way to do it".

You could use cp if you wanted.

I'd probably use rsync, something like "rsync -avh /mnt/oldpool /mnt/newpool".

You could also pipe two tar's together. Or cpio in pass-through mode.

:cool:

Please excuse the stoopid question, I´m just new to freeNAS -- and also new to FreeBSD, some commands are completely unknown to me (say camctrl? sounds like a controller for my camera, but in fact it´s a key tool in this OS)

Anyways, thank you for your time!
 
Status
Not open for further replies.
Top