Problem with user guide - splitting pool for cloning

Status
Not open for further replies.

barcoded

Cadet
Joined
Dec 10, 2015
Messages
3
The guide for freenas 9.3 (section 8.1.13) offers a way to clone a mirrored pool to a new system by splitting the mirror. The steps in the example however are not possible to follow.
The example assumes one can use the disk names as listed in "view disks" (for expamle ada1), split one disk out and rename, import to the new pool using the split-disk's name and thus create the duplicate pool. But when you use "zpool status poolname" (as per example), what you get are gptids with no associated disk names.
Anyone used the procedure mentioned? If so how?
Thanks!
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
I made a script to map the device to the GPTID (and S/N), look at the link "Useful Scripts" in my signature ;)
 

barcoded

Cadet
Joined
Dec 10, 2015
Messages
3
I made a script to map the device to the GPTID (and S/N), look at the link "Useful Scripts" in my signature ;)

Thanks!
So I assume I now the gptid replaces the devicenumber as below.
If the command was "zpool split oldpoolname newpoolname devicenumber" it would now be "zpool split oldpoolname newpoolname gptid" ?

I am using a virtual freenas system to do my experiments and my disks use ad0 ad1 etc. Do I replace the dax in your script to adx to get it to work in my test environment?

Thanks again!
 
Last edited:

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
In theory yes but I'll not confirm because I'm not 100 % sure, wait for another answer for the command syntax ;)
 

barcoded

Cadet
Joined
Dec 10, 2015
Messages
3
The most usefull information came from https://forums.freenas.org/index.php?threads/create-zfs-mirror-by-adding-a-drive.14880 (Dusan & James' rad guide).
In shorthand; From shell find the gptid of a disk to split, follow the guide but replace the disk name with the gptid (ie /dev/gptid/gptid_of_the_disk), import the split disk via GUI in the new system, add a disk and use the shell again to attach it. Once resilvering is done the split disk can then be returned to the original system once again by detaching it via shell and attaching once again to the original pool.
 
Status
Not open for further replies.
Top