I seem to have screwed up my pool

Status
Not open for further replies.
S

sef

Guest
I moved my system over to a new case with a more expansion. In the process, I added a 3tb drive to the 1tb drive I already had setup. Before I did this, I did an "zfs send -R NAS@manual-snap1 > /tmp/mnt/snap1.zfs"; later, before shutting down, I did "zfs send -R -i @manual-snap1 NAS@manual-snap2 > /tmp/mnt/snap2.zfs".

What I wanted to do was to then make the 3tb drive a mirror of the first. Later, I would want to swap the 1tb with another 3tB, when I needed the space. However, I couldn't figure out how to do this. In the process, I seem to have added the new 3tb drive as a stripe, which I was unable to remove.

So now I'm testing "zfs receive" and seeing how well that works. Any ideas what I should have done to get what i wanted?
 

Stephens

Patron
Joined
Jun 19, 2012
Messages
496
What should you have done? Backed up your data outside the NAS, blew away the existing ZPOOL, recreated the ZPOOL with the 2 drives (knowing the 3TB drive would only be used as a 1TB drive until you upgraded the 1TB drive), and restored your data. There may be other options, but they're shortcuts with inherent risk inversely correlated to your knowledge of what you're doing.

Also, please read noobsauce80's ZFS primer.
 
S

sef

Guest
What should you have done? Backed up your data outside the NAS, blew away the existing ZPOOL, recreated the ZPOOL with the 2 drives (knowing the 3TB drive would only be used as a 1TB drive until you upgraded the 1TB drive), and restored your data. There may be other options, but they're shortcuts with inherent risk inversely correlated to your knowledge of what you're doing.

Also, please read noobsauce80's ZFS primer.

That seems rather excessive, given that all I needed to do -- from ZFS' perspective -- is attach the new device to the existing device as a mirror. I simply could not figure out how to do that from the web interface; my attempt to attach it to the pool caused it to be treated as a stripe.

I did in fact end up blowing it away, but I should not have to do that. After I recreated it with the one drive, I then used the CLI to add the new drive as a mirror, exactly as I wanted to do in the first place. (I would have done that in the first place, but I'm not clear how to set up a drive to be used for ZFS in FreeNAS. I'd hoped I'd be able to just add it as a mirror using the web interface.)

"Lose all your data and then recreate it from a backup" is a really bad thing to advise, especially when it ignores the strengths and flexibility ZFS presents.
 

Stephens

Patron
Joined
Jun 19, 2012
Messages
496
I stand by my advice when people decide to piecemeal building a NAS so they can pinch pennies. Build the NAS you want up front and quit trying to incrementally build it as that ISN'T one of FreeeNAS's (or ZFS's) strengths. As I said, there may be other options, and hopefully someone else will tell you about them, but MY advice is still my advice, and I stand by it. If you don't know what you're doing, the safest way to do things is as I described. It isn't bad advice at all. After all, I'm not the one who posted about screwing up a pool.

The forum is littered with posts from people who refuse to follow FreeNAS/FreeBSD/ZFS best practices, but who want others to invest their time into getting their FrankenNAS working. Why not? Other people's time is free.
 
S

sef

Guest
I stand by my advice when people decide to piecemeal building a NAS so they can pinch pennies. Build the NAS you want up front and quit trying to incrementally build it as that ISN'T one of FreeeNAS's (or ZFS's) strengths. As I said, there may be other options, and hopefully someone else will tell you about them, but MY advice is still my advice, and I stand by it. If you don't know what you're doing, the safest way to do things is as I described. It isn't bad advice at all. After all, I'm not the one who posted about screwing up a pool.

The forum is littered with posts from people who refuse to follow FreeNAS/FreeBSD/ZFS best practices, but who want others to invest their time into getting their FrankenNAS working. Why not? Other people's time is free.

What is best practices for FreeNAS is not necessarily best practices for ZFS.

What I want to do with ZFS is perfectly fine and supported. The fact that the web interface for FreeNAS doesn't seem to have a way to add a mirror to a disk does not make it worthy of insult.

Thanks for such a warm welcome. I am moved to tears by your consideration, empathy, support, and talent.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
That seems rather excessive, given that all I needed to do -- from ZFS' perspective -- is attach the new device to the existing device as a mirror. I simply could not figure out how to do that from the web interface; my attempt to attach it to the pool caused it to be treated as a stripe.
You can't attach a new device to an existing device to create a mirror from the GUI. The documentation seems straightforward on how to create a stripe. If the fact you can't mirror is unclear then suggest some changes so it is.

I did in fact end up blowing it away, but I should not have to do that.
You should have, and needed to, as you screwed up and created a stripe. Sun did not feel that ZFS needed to be able to reconfigure zpools in such a way.

After I recreated it with the one drive, I then used the CLI to add the new drive as a mirror, exactly as I wanted to do in the first place.
You could have done it from the GUI at this point as well. I take it this was an exercise to see if you could? Did you create the mirror with the appropriate ashift?

If you are unsure, ask next time. ZFS is not flexible once you add a top level vdev to the pool. The GUI doesn't warn you about this like the cli does, not that it would have helped in your case.


Thanks for such a warm welcome. I am moved to tears by your consideration, empathy, support, and talent.
I BLEED for you. Last I checked you didn't lose any data and learned more about FreeNAS in the process even if it wasn't what you wanted to learn.
 
S

sef

Guest
You should have, and needed to, as you screwed up and created a stripe. Sun did not feel that ZFS needed to be able to reconfigure zpools in such a way.

Wow. Sarcastic and ignorant.

All you need to do is "zpool attach POOL old_device new_device". How is that Sun not feeling that ZFS needs to be able to reconfigured in that way, when it is in fact not only supported, but readily documented?

If you are unsure, ask next time. ZFS is not flexible once you add a top level vdev to the pool. The GUI doesn't warn you about this like the cli does, not that it would have helped in your case.

ZFS is not the same as the web UI for FreeNAS. You might want to consider that.

I BLEED for you. Last I checked you didn't lose any data and learned more about FreeNAS in the process even if it wasn't what you wanted to learn.

Really, I'm curious, what is it about FreeNAS that encourages rudeness so much?

ETA To make it clear, since this does seem to be a point of confusion among at least two people, ZFS allows you to make n-way mirrors, at any point, including after pool creation. This is a rather important thing, given that you may in fact have multiple bad blocks, and down-time is bad for a server; this allows them to have increased availability, due to both data protection and by allowing for space upgrades. I was asking how to do this in FreeNAS; a simple "the web UI doesn't allow this" would have sufficed, and required no insults or rudeness.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
All you need to do is "zpool attach POOL old_device new_device". How is that Sun not feeling that ZFS needs to be able to reconfigured in that way, when it is in fact not only supported, but readily documented?
After you created a stripe with your 2[sup]nd[/sup] disk, you can no longer remove it from the zpool. You would know that if you are actually familiar with the documentation. As for my Sun comment, since you didn't understand the first time, I was referring to the fact that you can't remove a top level vdev from the pool after the fact.

ZFS is not the same as the web UI for FreeNAS. You might want to consider that.
No shit? You learn something new everyday.

ETA To make it clear, since this does seem to be a point of confusion among at least two people, ZFS allows you to make n-way mirrors, at any point, including after pool creation.
The confusion seems to be yours. You can't currently do this from the GUI. You might be surprised at how many people know how to do this & to do it from the cli. It's quite simple and straightforward.

I was asking how to do this in FreeNAS; a simple "the web UI doesn't allow this" would have sufficed, and required no insults or rudeness.
You can't attach a new device to an existing device to create a mirror from the GUI.

I shall leave the last "Sarcastic and ignorant" word to you. I'm done with this thread.
 
Status
Not open for further replies.
Top