Pool1 has shares and jail, what happens if...?

Status
Not open for further replies.

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
Full description in sig.

Pool1 has shares and jail, what happens if I replicate Pool1 to Pool2, export Pool1, then rename "Pool2" to "Pool1"? Do I have to recreate my shares and jail? IOW, do the shares and jail "belong to" the physical pool, or do they "belong to" the name of the pool?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Full description in sig.

Pool1 has shares and jail, what happens if I replicate Pool1 to Pool2, export Pool1, then rename "Pool2" to "Pool1"? Do I have to recreate my shares and jail? IOW, do the shares and jail "belong to" the physical pool, or do they "belong to" the name of the pool?
Code:
<DrKK`> I'm trying to comprehend what z300M is saying here
<DrKK`> https://forums.freenas.org/index.php?threads/pool1-has-shares-and-jail-what-happens-if.36378/
<gadget> Im just glad we have the 10kw solar panels
<DrKK`> he's pretty smart,
<DrKK`> so I am sure his question is legit
* Ignat (~Ignat@wan.fw0.int.ccb.net.au) has joined
<DrKK`> but I appear to be insufficient smart to parse it
<DrKK`> insufficiently
* jeadr has quit (Remote host closed the connection)
* jeadr (~jeadr@li1421-113.members.linode.com) has joined
<gadget> Basically
<gadget> He's asking if the pools need to be exported to different names
<gadget> I think.
<DrKK`> there's some "jails" angle
<DrKK`> to the question
<DrKK`> that is giving me parse problems
<DrKK`> ok
<DrKK`> I think I am iteratively converging on understanding his question.
<gadget> I guess just consider everything else then consider the jails
<DrKK`> He has a pool A, with jails.
<DrKK`> he doesn't like pool A, presumably because of the configuration.
<DrKK`> so he is going to zfs send/replicate it to pool B
<DrKK`> including the jails
<DrKK`> then he wants to export out the primary pool, cold.
<DrKK`> then he wants to rename pool B to pool A,
<DrKK`> and his question is,
<DrKK`> is everything kosher like it used to be?
<DrKK`> And if that's his question,
<DrKK`> I think the answer is mostly "yes", subject to 2 caveats:
<gadget> I guess we can ask him to rephrase it XD
<DrKK`> 1) You can't rename pools, I don't think,
<DrKK`> or
<DrKK`> there is some reason why that's bad, or something...
<DrKK`> or something can't be renamed
<DrKK`> anyway, and
<DrKK`> 2) He'll have to go in jail->config and change the doc root
<DrKK`> or rather,
<DrKK`> the jail root
<DrKK`> to reflect the new pool.
<DrKK`> or something.
* mouseclone has quit (Ping timeout: 244 seconds)
<DrKK`> what do you think?
<DrKK`> does that sound like what he was asking?
<gadget> Probably it's a really simple question, but he didn't phrase it right.
<DrKK`> well I am going to cut and paste this conversation
<DrKK`> as my answer.
<DrKK`> presumably he will clarify.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
Code:
<DrKK`> I'm trying to comprehend what z300M is saying here
<DrKK`> https://forums.freenas.org/index.php?threads/pool1-has-shares-and-jail-what-happens-if.36378/
<gadget> Im just glad we have the 10kw solar panels
<DrKK`> he's pretty smart,
<DrKK`> so I am sure his question is legit
* Ignat (~Ignat@wan.fw0.int.ccb.net.au) has joined
<DrKK`> but I appear to be insufficient smart to parse it
<DrKK`> insufficiently
* jeadr has quit (Remote host closed the connection)
* jeadr (~jeadr@li1421-113.members.linode.com) has joined
<gadget> Basically
<gadget> He's asking if the pools need to be exported to different names
<gadget> I think.
<DrKK`> there's some "jails" angle
<DrKK`> to the question
<DrKK`> that is giving me parse problems
<DrKK`> ok
<DrKK`> I think I am iteratively converging on understanding his question.
<gadget> I guess just consider everything else then consider the jails
<DrKK`> He has a pool A, with jails.
<DrKK`> he doesn't like pool A, presumably because of the configuration.
<DrKK`> so he is going to zfs send/replicate it to pool B
<DrKK`> including the jails
<DrKK`> then he wants to export out the primary pool, cold.
<DrKK`> then he wants to rename pool B to pool A,
<DrKK`> and his question is,
<DrKK`> is everything kosher like it used to be?
<DrKK`> And if that's his question,
<DrKK`> I think the answer is mostly "yes", subject to 2 caveats:
<gadget> I guess we can ask him to rephrase it XD
<DrKK`> 1) You can't rename pools, I don't think,
<DrKK`> or
<DrKK`> there is some reason why that's bad, or something...
<DrKK`> or something can't be renamed
<DrKK`> anyway, and
<DrKK`> 2) He'll have to go in jail->config and change the doc root
<DrKK`> or rather,
<DrKK`> the jail root
<DrKK`> to reflect the new pool.
<DrKK`> or something.
* mouseclone has quit (Ping timeout: 244 seconds)
<DrKK`> what do you think?
<DrKK`> does that sound like what he was asking?
<gadget> Probably it's a really simple question, but he didn't phrase it right.
<DrKK`> well I am going to cut and paste this conversation
<DrKK`> as my answer.
<DrKK`> presumably he will clarify.
I assume you're posting a conversation from IRC.

Let me try again: Pool1 consists of two RaidZ2 vdevs, striped. I have created Pool2 -- a single RaidZ3 pool -- and have replicated Pool1 to it.

I have already tested renaming a pool by performing the operation on yet another pool -- one without any associated shares or jails -- and found that it works.

I want to destroy the existing Pool1 and reconfigure it as a single RaidZ3 pool. It seems to me that I have two choices: (a) call the new pool Pool1 and replicate everything back from Pool2 to the new Pool1; or (b) call the new pool Pool2A (or something entirely different), then rename the current "Pool2" to "Pool1."

What are the pros and cons of these two courses of action? -- especially as they affect shares and jails? Or is there another, better, course of action I haven't thought of?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Do I have to recreate my shares and jail?
No. When you export Pool1, the system will ask if you want to delete the shares; you'll obviously want to say no at that point.

And yes, it's absolutely possible to rename pools, just not in the GUI. Here's how:
  • From the GUI, export both pools
  • Physically remove the disks that comprise Pool1 from the server
  • From the CLI, 'zpool import Pool2 Pool1'
  • From the CLI, 'zpool export Pool1'
  • From the GUI, import volume, and select Pool1.
I did the same thing with my server--my pool consisted of two 3-disk RAIDZ1 vdevs. I built a new 6-disk RAIDZ2 pool, replicated old to new, renamed new to old, then added the disks from old back to the pool as a second RAIDZ2 vdev. Shares and jails worked without a hitch.
 
Status
Not open for further replies.
Top