This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Will re-creating ZPOOL destroy existing data?

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
langler
NewUser
NewUser
Posts: 8
Joined: 24 Nov 2014 19:35
Status: Offline

Will re-creating ZPOOL destroy existing data?

Post by langler »

To help out with answering my question, I'll explain my situation.

My status, I'll be humble and say, I'm at noob-intermediate level with ZFS and NAS4Free. Probably part of my problem.

I'm currently working with 192 TB of RAW storage (1st pool and the one of concern is 142TB as ZFS RAIDZ2 and 2nd pool, which is in good health, is 50TB and also ZFS RAIDZ2), served up as iSCSI targets to Windows servers (One of which is a Windows 7 vm; please, don't ask. It was found to be a mistake. :roll: ) The original zpool was created with the original 142TB of RAW storage and mostly 20TB volumes to be used for iSCSI extents/targets. Well, the first volume was served up to the Windows 7 Pro 64-bit vm, which ended up losing it's format. And that's where the headache begins. Since this is used for video storage, I ended up needing more immediate space anyhow and wanted to just ditch (delete) this volume and recreate it for another video management server's data volume (The Windows 7 vm had issues; The "Engineer" we were working with was telling me that Windows 7 would work fine as the camera management/archive server. But, in reality, it did not. So, we ended up spinning up a Windows 2008 R2 vm instead. The Windows 7 vm still serves as a way to access the previous video footage from when it was active as the archive server.)
When I deleted the volume, I ended up having to restart the NAS4Free server and now I cannot recall why. But, when it attempted to startup, it would state that the disks were created, then say that it ran out of swap space and restart.
This is where, looking back, I should have this and that, but what I did do is...
1) unplugged the storage controller and boot up. --That worked to at least bring up the OS.
2) loaded the latest NAS4Free (9.2.0.1.972) on a 240GB SSD (I was running NAS4Free 9.1.0.1.847 on a 32GB USB Thumb/Flash drive), both with and without previous and relavent config data. The hope was that maybe the newer system could have had bugs worked out, but also to give a larger swap space the system could use. --This showed an additional error/message after the drives were created at boot time and would restart after saying it ran out of swap space (beforehand, it complained I gave it more than recommended swap space). Which was saying, "cannot open objset <Volume Name of which I had deleted in the GUI before restarting>" But, if I started the system with a clean/default config file, it would then start up and I could get into the GUI and shell. Obviously, since the pools were not added in that default config.
3) Added the disks to the new system, within the GUI.
4) I attempted to import the pool (same pool that had the deleted volume (where the deleted volume resides or resided). --I was having to work remotely and as far as I could tell, the system froze/locked up.
5) Impatience may have got the best of me. But, it I could not do anything on the system. So, I did a hard restart of the server. --This is where I worry. Now, ZFS says the pool does not exist.

I realized after the fact that I should have run a resilver and/or scrub before even deleting the volume. Also, that I may have been able to run a zpool clear.
I also kick myself, now, for not backing up the config file before making the change. Before deleting the volume (Hence letting you know I'm a noob to this. I only have about 2 yrs working with FreeBSD/NAS4Free and ZFS.)

So, back to my question, "Is attempting to run a zpool create zpool with all of the original disks this zpool had going to help reconstruct the original zpool? Or, would that be a bad move and in that case, is there some other advise for me?"

Thank you for any assistance

User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Re: Will re-creating ZPOOL destroy existing data?

Post by crowi »

2) loaded the latest NAS4Free (9.2.0.1.972) on a 240GB SSD (I was running NAS4Free 9.1.0.1.847 on a 32GB USB Thumb/Flash drive),
which installation do you use? embedded or full?
3) Added the disks to the new system, within the GUI.
which steps (exactly) did you perform to add the drives?
4) I attempted to import the pool (same pool that had the deleted volume (where the deleted volume resides or resided).
How did you import the Pool? Manually (via CLI) or with a reboot?
"Is attempting to run a zpool create zpool with all of the original disks this zpool had going to help reconstruct the original zpool? Or, would that be a bad move and in that case,
Yes that's a bad move, as you'll create a new pool (empty) with this

Can you post the output/screenshot of
Disks| Management
Diagnostics|Information|Disks
and
Status|Processes
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

langler
NewUser
NewUser
Posts: 8
Joined: 24 Nov 2014 19:35
Status: Offline

Re: Will re-creating ZPOOL destroy existing data?

Post by langler »

Crowi; Thank you very much for your response.

Installation: Embedded (Previously and current)

Steps to add the drives: I had found somewhere in the NAS4Free site that instructed to go into the GUI > Disks > Management and use the "Import disks" button, which was said to have some scripting behind it to automate tasks for importing disks from a previous ZFS pool. That is exactly what I did.
Sorry, I misspoke in my post, where I said that I added the disks at #3, instead of importing them. Which I'm realizing mean two different things. Now that I look at the Disks Management page, I am remembering that I specificly read about and followed instruction on importing them.

Importing the pool: I manually (via CLI) attempted to import the pool. This is where I'm wondering if my greenness got in the way. Might the pools have been simply imported with a reboot after having the disks imported?

zpool create: Good thing I'm not so impatient that I would try this before asking for advise and confirmation. Yikes. I was concerned because I was thinking/remembering that creating a zpool is like formatting the drives. Just wasn't sure if there was any code behind that would notice the disks were previously used in a zpool and work some programming magic. I have read someone else's forum post where they tried this, saying they were avoiding the import command for some reason and the zpool create command told them that the disks were already part of a pool. But, I was already feeling as though I had dug a deep enough hole for myself and needed more confirmation on my next steps.

Thank you again! Hopefully there's something that might save this pool.

langler
NewUser
NewUser
Posts: 8
Joined: 24 Nov 2014 19:35
Status: Offline

Re: Will re-creating ZPOOL destroy existing data?

Post by langler »

Not sure if this would do any good. But, I feel I should also mention that I do still have the USB drive with the previous O.S. on it.

langler
NewUser
NewUser
Posts: 8
Joined: 24 Nov 2014 19:35
Status: Offline

Re: Will re-creating ZPOOL destroy existing data?

Post by langler »

If I try to force an import of the pool, the "objset"complaint of the deleted volume is diplayed and the system locks up (ie. all activity lights are off and there is no input accepted from the system. Also, GUI becomes inaccessible.

substr
experienced User
experienced User
Posts: 113
Joined: 04 Aug 2013 20:21
Status: Offline

Re: Will re-creating ZPOOL destroy existing data?

Post by substr »

Are trying to import the pool from the CLI and getting that error, or is it from the GUI?

How full is this pool, and when was the last time you checked?

langler
NewUser
NewUser
Posts: 8
Joined: 24 Nov 2014 19:35
Status: Offline

Re: Will re-creating ZPOOL destroy existing data?

Post by langler »

I'm trying to import the pool from the CLi.
This (first of two) pool is almost full, with about 2.5 TB free. The other pool, which has been in good standing, is full.

langler
NewUser
NewUser
Posts: 8
Joined: 24 Nov 2014 19:35
Status: Offline

Re: Will re-creating ZPOOL destroy existing data?

Post by langler »

FYI: After seeing suggestions in other ZFS related forums related to pools that are not found, I've downloaded the USB mfsbsd distribution (version 9.1) and I've run zpool import -f zpool which so far appears to be doing well to import the pool of concern. Where, if I tried from the NAS4Free CLi, the system locks up. I also attempted to get the settings in place for the working pool and when the system booted, it seemed to also try to import the first pool at boot time. It then did the same thing it's been doing, complains about that deleted volume, then complains that it has run out of swap space, then reboots after also saying that it is switching to single user mode.
I'm thinking that after this import completes, I will then export the pool and try to import again in NAS4Free.

I was looking at Oracle's ZFS Admin guide, the other option seems to be to destroy the pool and run zpool import -D , etc... (troubleshooting section of admin guide), but hopefully I won't have to go there.

langler
NewUser
NewUser
Posts: 8
Joined: 24 Nov 2014 19:35
Status: Offline

Re: Will re-creating ZPOOL destroy existing data?

Post by langler »

I got it! Well, using mfsbsd got it done.
The import of the pool in that Dist., plus exporting of the pool did the trick. I didn't even have to manually import when I brought up NAS4Free. Both pools came up fine.
Now, to scrub and get snapshots and backups in place, sooner than later.
I did already have a plan to purchase a large capacity backup server, but it just hasn't been purchased fast enough.
Thanks again for your responses. Maybe this info will be of use to someone else.

Oh, and Crowi, I realized I didn't include the attachments you had asked for. When I realized that, I tried uploading them and found they were too large. Then, that's when I looked at the server console and saw that the import of the pool successfully finished. And I let out a, "Yay!"
I've verified that the data is accessible via iSCSI in the Windows servers as well.

User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Re: Will re-creating ZPOOL destroy existing data?

Post by crowi »

This (first of two) pool is almost full, with about 2.5 TB free. The other pool, which has been in good standing, is full.
I think this is what caused your problem, you should always keep 15-20% free space on a ZFS pool
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

Post Reply

Return to “ZFS (only!)”