Stripped when I meant to mirror

Status
Not open for further replies.

Rusky

Dabbler
Joined
Mar 26, 2013
Messages
42
I have my jail running off of a ssd

I just installed a second ssd with the intention of running them in a mirror in case one failed. I clicked through the volume manager too quickly and selected strip instead of mirror.

Anyway to undo this? Ultimately I just want to mirror the jail between both SSDs

If it helps I have a snapshot of the jail

UPDATE:
I got it fixed thanks to this thread
https://forums.freenas.org/index.ph...to-move-my-plugin-jail-to-another-pool.32906/

I attached a 3rd SSD and created a new volume then did the below steps

Assumptions:

The pool you are transferring the jails from is main_pool
The destination pool is ssd_pool
The jail root (Jails->Configuration) is /mnt/main_pool/jails
The new jail root will be /mnt/ssd_pool/jails

Steps:

Turn off all plugins (Plugins->Installed)
Stop all jails (Jails->View Jails)
Run these commands via CLI:[PANEL]zfs snapshot -r main_pool/jails@relocate
zfs send -R main_pool/jails@relocate | zfs receive -v ssd_pool/jails
zfs get -rH -o name -s received mountpoint ssd_pool/jails | xargs -I {} sh -c "zfs set mountpoint=/{} {}; zfs mount {};"[/PANEL]
Change the Jail Root to /mnt/ssd_pool/jails (Jails->Configuration)
Start jails/plugins
Check that everything works and destroy the original jails dataset (main_pool/jails)

Once I confirmed the jail was up and running on the new SSD, I destroyed the old volume and rebuilt it in a mirror.
Then I reversed the steps to move it from the new SSD back onto the mirrored volume
 
Last edited:

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
I'm pretty sure there are some posts that say you're rebuilding your pool if you misconfigure a vdev. I haven't seen anything talking about the ability to reconfigure then.

I can't really say how you'd transfer the files between pools, but I have copied a dataset between pools with zfs send/receive I think, been a while.
You could probably copy the dataset for the jails to another pools, recreate your SSD pool, then transfer back.

Someone else might need to back this up though
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
You would need a third disk. Or you could use send and receive to backup to another pc then destroy the pool and rebuild/restore.

@sfcredfox better said than me. But yeah if you have another pool and the space you can just "move" the dataset over and back.
 

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
I can't say if those instructions work or not, but I'd make a backup just in case, and then trying it is your call. I'd be interested to know if you can replicate their success though
 

Rusky

Dabbler
Joined
Mar 26, 2013
Messages
42
I can't say if those instructions work or not, but I'd make a backup just in case, and then trying it is your call. I'd be interested to know if you can replicate their success though

I'll make a backup of the jail and try converting it into a mirror

But if I'm understanding what you said correctly

- Stop my plugins
- Copy the contents of my jail that's on the striped SSDs onto a 3rd SSD
- Wipe the volume the jail is one
- Properly setup the original 2 SSDs in mirror
- Copy the files off the 3rd SSD into the new mirror
- Start plugins
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338

Remember that in ZFS terminology a single disk is called a stripe, too. The issue report and the guidance you posted are about converting a single disk vdev to a mirror vdev. AFAICT, converting a two-disk stripe into a two-way mirror indeed involves backing up and creating a new pool from scratch.
 
Last edited:

Rusky

Dabbler
Joined
Mar 26, 2013
Messages
42
Alright guys I did it, had to move it off and back

For anyone who stumbles across this thread in the distant future I'll update my original post with the steps
 
Status
Not open for further replies.
Top