Unable to import ZFS pool

Status
Not open for further replies.

rrosenwald

Dabbler
Joined
Mar 17, 2013
Messages
21
I am, for all practical purposes, an absolute newbie. I have been trying to learn about FreeNAS. I had 8.3 setup booting from a USB stick and working including a media server and an FTP server. I had a ZFS pool named Backup which had a fair amount of data including a number of movies and about 100GB of music. I stupidly decided to upgrade my system to 9..1 and add several disks with the intention of eventually setting up Raid-Z. Needless to say Backup seems to no longer be available to me.

Based on researching I have tried a number of things including creating a new separate USB stick with FreeNAS 9.1 on it. After booting with either my old, upgraded installation or the new install

I have tried AutoImport from the Web interface
I have tried 'zspool import -fFX Backup' from the Shell and get "cannot import 'Backup': one or more devices is currently unavailable"

In the Web interface Active Volumes/ZFS Volume Manager shows No entries.

I am totally lost. Any help that anyone might give would be greatly appreciated. I'd really like to get my data back if possible.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Post the output of zpool status and zpool import in CODE.
 

rrosenwald

Dabbler
Joined
Mar 17, 2013
Messages
21
Post the output of zpool status and zpool import in CODE.



[root@freenas ~]# zpool status
no pools available
[root@freenas ~]# zpool import
pool: Backup
id: 8596649775624582343
state: FAULTED
status: The pool metadata is corrupted.
action: The pool cannot be imported due to damaged devices or data.
The pool may be active on another system, but can be imported using
the '-f' flag.
see: http://illumos.org/msg/ZFS-8000-72
config:

Backup FAULTED corrupted data
gptid/2553aa81-f597-11e2-8fa0-001ec92b281f ONLINE
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Please repost the commands inside CODE. The formatting of the text is important. Since you didn't post it in CODE the formatting was removed.
 

rrosenwald

Dabbler
Joined
Mar 17, 2013
Messages
21
Sorry - I didn't understand what you were requesting. I hope this is right:

Code:
[root@freenas ~]# zpool status                                                 
no pools available                                                             
[root@freenas ~]# zpool import                                                 
  pool: Backup                                                               
    id: 8596649775624582343                                                   
  state: FAULTED                                                               
status: The pool metadata is corrupted.                                       
action: The pool cannot be imported due to damaged devices or data.           
        The pool may be active on another system, but can be imported using   
        the '-f' flag.                                                         
  see: http://illumos.org/msg/ZFS-8000-72                                     
config:                                                                       
                                                                               
        Backup                                        FAULTED  corrupted data 
          gptid/2553aa81-f597-11e2-8fa0-001ec92b281f  ONLINE                   
[root@freenas ~]# 
 

rrosenwald

Dabbler
Joined
Mar 17, 2013
Messages
21
I'm unsure how to indicate that an issue is closed. Although I never was able to open the Backup, happily I have been able to get to the original data and am going to be a lot more careful in the future. Thanks for trying and teaching me a little more about FreeNAS.

Sorry - I didn't understand what you were requesting. I hope this is right:

Code:
[root@freenas ~]# zpool status                                               
no pools available                                                           
[root@freenas ~]# zpool import                                               
  pool: Backup                                                             
    id: 8596649775624582343                                                 
  state: FAULTED                                                             
status: The pool metadata is corrupted.                                     
action: The pool cannot be imported due to damaged devices or data.         
        The pool may be active on another system, but can be imported using 
        the '-f' flag.                                                       
  see: http://illumos.org/msg/ZFS-8000-72                                   
config:                                                                     
                                                                             
        Backup                                        FAULTED  corrupted data
          gptid/2553aa81-f597-11e2-8fa0-001ec92b281f  ONLINE                 
[root@freenas ~]# 
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Can you post what you did? I'm sorry I didn't respond back to your thread. For some reason I don't think I saw the new post.
 

rrosenwald

Dabbler
Joined
Mar 17, 2013
Messages
21
I never did get Backup to mount and had pretty much given up hope. All of this started because I had a drive that appeared to be failing - I kept getting messages about 630 Unrecoverable Sectors. So I added a new drive and Backed up to that (to Backup). I then built a new system, planning on using RaidZ, with 5 3TB drives including the one with Backup. I was planning on low-level formatting the old drive that was failing, but had problems when I installed it into external case. So I rebuilt my old system - less the drive with Backup - and booted into FreeNAS 9.1. Since the drive appeared in Disks, I decided to try Auto Importing it, and SUCCESS! (Yes, I am incredibly lucky that I couldn't low-level format it). Using Shell I can see all the files I was afraid I'd lost. I'm now trying to get an external USB drive to mount so I can backup all my files to it.

I will start a new thread about the problems I'm having getting an NTFS external USB drive to mount if I continue to be unable to succeed, but I'll work on that for a while longer by myself.

And thank you for your outstanding Noob guide. I have since added a sixth 3TB drive to my new system and am in the process of setting that up with RaidZ2. I did get sendmail working and hope to get the SMART Monitoring working soon though the Shell from the GUI keeps crashing every time I try to paste the script in, but I can eventually figure out a work-around for that.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
NTFS shouldn't be used as a regular course of business. NTFS support in FreeBSD is flaky(at best) and is meant only as a measure to copy your data to the server for initially filling the server with your old data. You really need to use UFS or ZFS for any drives attached to your FreeNAS server.

USB is very flaky also. If the drive has any kind of error, it will detach itself from the USB port on your computer and reconnect(hopefully). So poof, now you have done nasty things to your file system and FreeNAS doesn't appreciate it when a drive just disappears and reappears later. For this reason it's not something that is recommended and plenty of people have been very disappointed with the outcome. I know.. backups don't have to be 100%.. etc etc etc. But why would you make backups to a design that is already proven unreliable. What you are also then accepting is that if you need to use your backups someday you might have to accept the fact that you can't expect all of the data to be available to you.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I can't edit my posts(dumb forum bug), but if you really want to use NTFS then you should consider putting the drive on a Windows system and just doing a network copy from there.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Don't try to paste the script into the GUI. Create a text file with the commands, for example foo.sh

Place it on your storage volume (I have a directory for scripts). Chmod it so it's executable and either run it interactively or create a cron job.


Sent from my phone
 

rrosenwald

Dabbler
Joined
Mar 17, 2013
Messages
21
NTFS shouldn't be used as a regular course of business. NTFS support in FreeBSD is flaky(at best) and is meant only as a measure to copy your data to the server for initially filling the server with your old data. You really need to use UFS or ZFS for any drives attached to your FreeNAS server.

USB is very flaky also. If the drive has any kind of error, it will detach itself from the USB port on your computer and reconnect(hopefully). So poof, now you have done nasty things to your file system and FreeNAS doesn't appreciate it when a drive just disappears and reappears later. For this reason it's not something that is recommended and plenty of people have been very disappointed with the outcome. I know.. backups don't have to be 100%.. etc etc etc. But why would you make backups to a design that is already proven unreliable. What you are also then accepting is that if you need to use your backups someday you might have to accept the fact that you can't expect all of the data to be available to you.

I wasn't planning on using NTFS or a USB drive on a regular basis. I was just wanting to get a copy onto another drive that I knew I could access (through Windows). I used to do a lot from a command line when I was into OS/2, but haven't since them and have never really learned commands for Linux and variants, so I'm really slow on the uptake. I'll get there, but there are quite a few new concepts (to me) and a whole vocabulary that I need to pick up. But thanks again - I'll try not to be too much of a pest :)
 

rrosenwald

Dabbler
Joined
Mar 17, 2013
Messages
21
Don't try to paste the script into the GUI. Create a text file with the commands, for example foo.sh

Place it on your storage volume (I have a directory for scripts). Chmod it so it's executable and either run it interactively or create a cron job.


Sent from my phone


That's the direction I was heading, but right now the only way I know how to copy and paste is in Windows. I don't know how to access a forum posting from within FreeNAS, much less how to copy and paste from the command line. So, is the best way to do this to create a shared folder on the FreeNAS box, and from Windows paste into a text file which I save on the FreeNAS box? The directions in the Forum for setting up S.M.A.R.T. email reporting talk about setting up the script in /conf/base/etc so would it be better to share /conf/base/etc or share a different folder and then move the script from shell?
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
It's up to you, where you put it. For now, it's probably easiest to follow joeschmuck's advice to put it in /conf/base/etc. His rationale for putting it there, was to prevent the hard disks from having to "spin up each time". Do keep a backup copy - if you need to reinstall FreeNAS, you'll lose it and need to replace it. With my scripts on storage (/mnt/vol1/home/gpsguy/FreeNAS/scripts), they survive OS reinstalls, etc.

One thing you could do, is create the file in your "share" and rather than use the local editor, just copy it from your share. For example: cp /mnt/vol1/home/gpsguy/FreeNAS/scripts/esmart.sh . (assuming you were in the /conf/base/etc directory).

If you haven't configured SSH yet, you'll want to do that. And, download a copy of PuTTY for Windows. This facilitate your ability to copy/paste stuff back and forth from FreeNAS. Or, even capture screen output to a file on your Windows desktop. I find it invaluable for documentation.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
I can't edit my posts(dumb forum bug), but if you really want to use NTFS then you should consider putting the drive on a Windows system and just doing a network copy from there.
I encountered this problem and I figured you would like to know.
When you click edit, it brings up an empty box (none of your post), but there's a button that says "more options". If you click that, it will bring you to a new page where you can now edit your post.
 
Status
Not open for further replies.
Top