Retrieve Data Issue

Status
Not open for further replies.

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Hello,

I am new to FreeNas, and have been messing around with ver.8 for about a week now, and have two questions.

First Question

I will be running hardware Raid 1 on two HDD's with the volume setup as UFS (I think because it is not a 64-bit system I can't use ZFS). However, my question is let's say I need to for whatever reason one day pull out one of the drives and stick it in an enclosure and retrieve all of the data from the drive, how could I do that??


Second Question.

When I set up the CIFS shares under a UFS volume everything I put in one share ends up in the other share automatically. If I delete a file from one share the same thing happens in the other share. Why is this?? Any help would be greatly appreciated.



Justin
 

praecorloth

Contributor
Joined
Jun 2, 2011
Messages
159
Hello,

I am new to FreeNas, and have been messing around with ver.8 for about a week now, and have two questions.

First Question

I will be running hardware Raid 1 on two HDD's with the volume setup as UFS (I think because it is not a 64-bit system I can't use ZFS).

You can use ZFS on a 32bit system. I am. 64bit is recommended, but you should be able to get by.

However, my question is let's say I need to for whatever reason one day pull out one of the drives and stick it in an enclosure and retrieve all of the data from the drive, how could I do that??

Because both of your drives are a mirror you should be able to throw either of them in an enclosure, plug it in to something that knows how to read UFS or ZFS (Probably not Windows) and see everything on the drive, just like it was any other external drive formatted in UFS or ZFS.

Second Question.

When I set up the CIFS shares under a UFS volume everything I put in one share ends up in the other share automatically. If I delete a file from one share the same thing happens in the other share. Why is this?? Any help would be greatly appreciated

I'm not sure I follow this. Can you tell us a little more about your drive and share setup?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
One thing to be aware of, if you're using hardware raid you may not be able to take the drive and stick it in another system and read it. Some drives setup using hardware raid are tied to that controller, that is the big advantage of using software raid. If you plan to keep using the hardware controller in raid mode, make sure you test this to be sure.
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Hello Paraecorloth & Protosd,

Thank you both for your replies.


Praecorloth you said (You can use ZFS on a 32bit….) thank you. That is what I needed to know.

Next you said (Because both of your drives are a mirror you should be able…..) That is what my question is. I can’t seem to find anything that will read the drive when it is in the enclosure. By anything I mean, Ubuntu (Bootable Disk), Window 7 (Not a surprise), or Knoppix (Bootable Disc). Does the Linux version like Ubuntu have to be installed on another machine for it to read the drive?? In other words is the ZFS capability just not available from the bootable disk??

Third you said (I'm not sure I follow this….) I will do my best to explain. If it is still confusing I apologize and will try to get some screen shots for yawl on Monday. I think the issue resides in where you select the mnt point when you are setting up the share. When I set up a CIFS share under the UFS volume when I click the drop down for the “Path” I am only given one option to pick, and if I create another CIFS share after that one I am given the same option under “Path” as before. I think that is what is causing the issue I posted about in my Third Question above. Now if I create a CIFS share under a ZFS volume I don’t have this issue because I am able to create different “Data Sets”. This allows me when I set up the CIFS share to pick the Data Set I created under “Path” and when I set up another share I can pick a different “Data Set” that I created. Thus, I don’t have the problem I spoke of in my last post.


Note: I am not against using the ZFS volume instead of the UFS, if I can get the issue figured out of accessing the data on the drive. If I get this figured out, then it doesn’t matter to me either way.



Protosd,
That is very true and a very good point. Thank you for that tip!



Justin
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
When I set up a CIFS share under the UFS volume when I click the drop down for the “Path” I am only given one option to pick, and if I create another CIFS share after that one I am given the same option under “Path” as before.

Justin, this is a bug with version 8 that has been fixed in the 8.01 betas. You discovered the workaround using datasets, but if you try beta4 you won't need to do that, although there no problem with using datasets either.

I think ZFS in Ubuntu is an optional package not available on the boot CD. I've been meaning to give it a try myself, but despite some peoples issues with FreeNAS, I like it a lot and think the next release is really going to be a big improvement.
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Protosd, if I understand you correctly the issue should be fixed since I am running ver. (Free BSD 8.2-Release-p1) correct?? However, I still have the issue I described above unless I create datasets. If creating datasets is just as good then I have no issue with doing that.

I have a spare HDD laying around somewhere I think and will try to get Ubuntu installed on it tomorrow to test that and see if that will answer my question about getting the data off the drive. I will post back after I finish with this on what I find.


You said (....think the next release is really going to be a big improvement). Is it pretty straight forward upgrading to a new release when they come out??




Justin
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi Justin,

Free BSD 8.2-Release-p1
This isn't the FreeNAS version, this is the OS version. I wish the developers would switch the order because everytime you ask someone for the version this is what they tell you. The FreeNAS version is a few lines below that.

Is it pretty straight forward upgrading to a new release when they come out??
ehhhhh, yeah, it's not that bad. If everything goes correctly you can do it from the GUI after you back up your settings. At the worst, your settings won't import correctly and you'll have to re-enter them by hand, but it's not that bad. There's also an option to boot from the CD of the new version and upgrade from there. Still the same risk with the settings.

I'm interested to hear your results with Ubuntu. I don't have time to test it right now, I'm getting ready to go out of town next week.
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Thank you for both of your replies above!


I went ahead and downloaded the newest ver. of Ubuntu (11.04 I believe) and installed that. Now when I try to mount the HDD from my FreeNas box I get the following error.

Error mounting:mount: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error in some cases useful info is found in syslog- try dmesg| tail or so??

Any thoughts??



Justin
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi Justin -

Did you install the zfs.fuse package? I don't have a lot of time to look it up right now, but Google for 'ubuntu mount zfs' and that should get you on track.
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Hello Protosd,

I did not install the zfs.fuse package.

I have since downloaded it, but can't seem to figure out for the life of me how to get it installed. I read some documentation that said I needed to have Scons as well so I downloaded it and can't get it installed and now I am all confused. I am really rusty at my Linux commands...in fact I don't remember most of them unfortunately. Do you know of a step by step guide that would help me out??


I know you are trying to get ready to go out of town and if you need to wait until you get back just let me know. :smile:



Justin
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Justin -

I don't have time to look for detailed instructions, but you should just be able to do 'apt-get install package name' or if you want to do it from the GUI, there's the 'synaptic' package manager which will handle dependencies and install it for you. You shouldn't even need to download the packages if you use that. After that I would expect you just use standard zfs/zpool commands to mount your drive. I'm sorry I don't have more time to help. I'll be here off and on until monday when I leave, so I can try and point you in the right direction if you need it.
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
No Problem...I just appreciate your patience and helping my try to work through this!!


When I run 'apt-get install zfs-fuse.0.7.0.tar.bz2' I get the following two error messages.

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administrator directory (/var/lib/dpkg/), are you root??

I am logged in as the administrator/root, and have made sure that the "zfs-fuse.0.7.0.tar.bz2" is set to read-write permissions. Any ideas??


Justin
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Yes, you can't do apt-get install with 'bz2' files. My quickest and easiest suggestion is to use the 'synaptic package manager' from the GUI. On your Taskbar, it's under System -> Administration -> Synaptic Package Manager

After that loads, just type 'zfs' in the quick filter, and it will show up in the list. Select it and then click Apply at the top.

Hope that helps!
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
I can’t seem to find anything that will read the drive when it is in the enclosure. By anything I mean, Ubuntu (Bootable Disk), Window 7 (Not a surprise), or Knoppix (Bootable Disc). Does the Linux version like Ubuntu have to be installed on another machine for it to read the drive?? In other words is the ZFS capability just not available from the bootable disk??
Have you considered using the FreeBSD Live CD?
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Hello Protosd,

I thought I had tried that but I must have missed a step, because what I did doesn't quite match up with the steps you gave above. However, it will probably be tomorrow before I can get to try that. I will post back. Thanks again.


Hello Durkatlon,

No, I have not tried that yet. When I go to download the .iso I am presented with the following options. Which one do I need??


02/19/2011 12:00AM 49,262,592 FreeBSD-8.2-RELEASE-i386-bootonly.iso
02/19/2011 12:00AM 684,982,272 FreeBSD-8.2-RELEASE-i386-disc1.iso
02/19/2011 12:00AM 2,066,424,512 FreeBSD-8.2-RELEASE-i386-dvd1.iso.xz
02/19/2011 12:00AM 264,413,184 FreeBSD-8.2-RELEASE-i386-livefs.iso
02/19/2011 12:00AM 958,617,600 FreeBSD-8.2-RELEASE-i386-memstick.img



Justin
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
No, I have not tried that yet. When I go to download the .iso I am presented with the following options. Which one do I need??
I haven't tried all the options, but from what I understand from this thread on the FreeBSD forums, *if you don't already have the DVD image*, you can use the livefs image and then use either the disc1 image or FTP to get the rest.

I just tried booting the DVD image. If you do that, after it starts booting from the DVD, allow it to boot into the default option, then cancel out of the language selection. On the next screen you select the "FixIt" option and then select the use of DVD/CD for FixIt.

This places you in a root shell in a system booted entirely from the DVD and then you can do all the other mounting etc from there. I didn't try ZFS so I'm not sure if there's additional steps you need to do once in FixIt before that works. The advantage of using ZFS from a FreeBSD 8.2 Live CD is that it will support the same zpool rev that FreeNAS does.
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Durkathlon,

Thank you for the info. I have downloaded the livefs image and have booted into FixIt now what. I mean as I said before I am really rusty with linux and need a refresher on mounting an External HDD. Could you list some steps out perhaps?? Also, once I have mounted the drive what steps would I need to take to copy all the data from that drive onto another "External HDD"??


Thanks,

Justin
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Justin, I'm trying to understand what it is that you're trying to do. Are you trying to proof to yourself that if the FreeNAS system itself were to fail, that you can use the physical disk in a different machine and recover the files from the ZFS filesystem?
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Durkathlon,

I am sorry about the confusion. Yes, essentially that is what I am after. I have never used FreeNas before and to make a long story short I need know that if something were to happen to the server I could take the drive out of that machine and put it in an enclosure and retrieve all of my data. My whole issue is I can't find anything that will read the ZFS filesystem, and that is what Protosd was helping me with and now you are to. I hope this helps clear things up?? If not let me know.


Justin
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Ah OK, well I was curious myself so I messed around with things a bit. The Fixit option is quite complicated it seems since the machine starts up this way with really nothing working yet (no network, no kernel modules, etc). So to get from the initial Fixit boot to a fully functional system where you can use the network to copy files off the ZFS drive is quite complicated. I was reading through the instructions and while I'm not shy about using the commandline in any OS, it had my eyes glazing over after a while.

That said, if you were to start from Fixit, you need to issue a few command to get ZFS working (note that the DVD will be automatically mounted at /dist):
Code:
Fixit# ln -s /dist/boot/kernel /boot/kernel
Fixit# ln -s /dist/lib /lib
Fixit# kldload geom_mirror
Fixit# kldload opensolaris
Fixit# kldload zfs
Fixit# 

Now you will be able to issue ZFS commands as per normal.

You could in principle now mount the drive from the ZFS mirror (see below) and a second empty drive, and copy the data across. If you want to use the network to copy to a Windows share, or an FTP, starting from Fixit is much much more complicated.

Instead what would be easier is to just build a temporary FreeBSD system by doing a minimal install of FreeBSD to a fresh harddrive. You could use any old drive for this, the minimal install is very small (could even use old 10 gig drive you might have lying around).

What follows is something I tried this morning. I have a FreeNAS8 system called TANGENT which has a pool called tangent_pool that contains two datasets called 'bulk' and "dcim'.

My "rescue" system is a FreeBSD 8.2 system called TRIDENT. I took one of the drives from TANGENT and put it in TRIDENT (well I did all this in VMWare, so I actually copied one of the vmdk files from TANGENT to TRIDENT.

To get the drive from TANGENT to show up and become readable in TRIDENT I did the following:
Code:
trident# zpool import
  pool: tangent_pool
    id: 11365092829410101623
 state: DEGRADED
status: The pool was last accessed by another system.
action: The pool can be imported despite missing or damaged devices.  The
        fault tolerance of the pool may be compromised if imported.
   see: http://www.sun.com/msg/ZFS-8000-EY
config:

        tangent_pool  DEGRADED
          mirror    DEGRADED
            ada1p2  UNAVAIL  cannot open
            ad2p2   ONLINE
trident# zpool import -f tangent_pool
  pool: tangent_pool
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'
   see: http://www.sun.com/msg/ZFS-8000-2Q
 scrub: none requested
config:

        NAME                     STATE     READ WRITE CKSUM
        tangent_pool             DEGRADED     0     0     0
          mirror                 DEGRADED     0     0     0
            5266465553725886239  UNAVAIL      0     0     0  was /dev/ada1p2
            ad2p2                ONLINE       0     0     0

errors: No known data errors
trident# zfs list
NAME                USED  AVAIL  REFER  MOUNTPOINT
tangent_pool        155K  5.88G    24K  /tangent_pool
tangent_pool/bulk  24.5K  5.88G  24.5K  /tangent_pool/bulk
tangent_pool/dcim    21K  5.88G    21K  /tangent_pool/dcim
trident# ls -l /tangent_pool
-rw-r--r--  1 root  wheel  0 Aug 19 16:38 .windows
drwxrwxrwx+ 3 root  wheel  3 Aug 19 16:50 bulk
drwxrwxrwx+ 2 root  wheel  2 Aug 19 16:00 dcim
trident# 

I hope this helps!

-- Durk
 
Status
Not open for further replies.
Top