Retrieve Data Issue

Status
Not open for further replies.

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Durkathlon,

Sorry for the late reply I am just now having a chance to work with your suggestions.

When I run the following three commands I get the following error (No such file or directory). Note: I ran the other two you listed above first and I ran all the commands in the order you listed. Any ideas??

Fixit# kldload geom_mirror
Fixit# kldload opensolaris
Fixit# kldload zfs


Justin
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Hello Protosd, I hope your crazy week is going well.

When I try to search for ZFS under the "Synaptic Package Manager" only the following packages are listed

zeitgeist
zeitgeist-core
zeitgeist-datahub
zeitgeist-extension-fts
zenity
zip
zlib1g


If I try to go to "Add Downloaded Packages" from the file menu. I can select the downloaded zfs package and click open but it doesn't do anything. When I click on the "Reload" button at the top I get several error messages and the last one says something about it couldn't resolve the name. Does this machine have to be connected to the internet for it to add packages, or for me to get it installed??


Justin
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Durkathlon,

Sorry for the late reply I am just now having a chance to work with your suggestions.

When I run the following three commands I get the following error (No such file or directory). Note: I ran the other two you listed above first and I ran all the commands in the order you listed. Any ideas??

Fixit# kldload geom_mirror
Fixit# kldload opensolaris
Fixit# kldload zfs


Justin

Sounds like the kernel modules are in a different location on the disk1.iso compared to the dvd.iso. Perhaps you can download the DVD image and try that. It's anyways easier because there's not multiple images to juggle.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi Justin, I'm half way to my destination and things are going great, thanks!

Yes, you need to be connected to the internet to download packages, either with Synaptic or with apt-get (Synaptic is much easier). You have the right idea, you need to do a 'reload' to get the updated packages list.

After tonight I'll only have limited mobile broadband access for the next 4-5 weeks, so I'll check in when I can. Like I mentioned before, I've been wanting to try accessing my FreeNAS ZFS pool from Ubuntu also, so let me know how it goes.
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Durkathlon,

Ok, that would explain it. I hate to ask you this but do you mind sharing how you were able to get the .iso.xz onto a disc. The burning software that I have will only recognize .iso images, and when I try to burn it from Ubuntu it says that the image format is not recognized.


Justin
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Protosd,

Great to hear....and hope you have a safe while you are there!

Ok, well since that is the case I will have to take my machine to another location (Different Subnet) to be able to attach it to the internet. It may be this weekend or next before I am able to do that, but as soon as I can I will keep you updated on how it is going.


Justin
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Durkatlon,

Thank you for the link. I was able to download 7-zip and get the .iso burned after it was extracted. However, now when I boot off the DVD I still have the same issue when running the commands that you listed (See Below). Any ideas?? Do I need to be in a particular directory before issuing the commands??

When I run the following three commands I get the following error (No such file or directory). Note: I ran the other two you listed above first and I ran all the commands in the order you listed. Any ideas??

Fixit# kldload geom_mirror
Fixit# kldload opensolaris
Fixit# kldload zfs


Justin
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
I was able to download 7-zip and get the .iso burned after it was extracted. However, now when I boot off the DVD I still have the same issue when running the commands that you listed (See Below). Any ideas?? Do I need to be in a particular directory before issuing the commands??
Well, the system doesn't look for the files in /dist, hence the need for the softlinks. Can you verify that something is mounted at /dist?
Code:
Fixit# ls -l /dist
total 596
-r--r--r--   2 root  0     798 Feb 18  2011 .cshrc
-r--r--r--   1 root  0    1854 Feb 18 2011 .profile
dr-xr-xr-x  13 root  0    2048 Feb 18 2011 8.2-RELEASE/
-r--r--r--   1 root  0    6200 Feb 18 2011 COPYRIGHT

...etcetera

You need to map the /dist/boot/kernel directory to /boot/kernel and the /dist/lib to /lib. This is what the softlink commands are supposed to do:

Code:
Fixit# ls -l /boot/kernel
ls: /boot/kernel: No such file or directory
Fixit# ln -s /dist/boot/kernel /boot/kernel
Fixit# ln -s /dist/lib /lib
Fixit# ls -ld /boot/kernel /lib
lrwxr-xr-x   1 root  0   17 Aug 30 11:22 /boot/kernel@ -> /dist/boot/kernel
lrwxr-xr-x   1 root  0    9 Aug 30 11:25 /lib@ -> /dist/lib
Fixit# ls -l /boot/kernel/zfs.ko
-r-xr-xr-x   1 root  0   1308344 Feb 18  2011 /boot/kernel/zfs.ko*
Fixit#
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
When I run "Fixit# ls -l /dist" I get same results you posted above.

However, when I run a couple of the other commands you have posted I get the following results. Note: All commands were run in order and if I do not post the command it means I got the same result you posted above.

Fixit# ln -s /dist/boot/kernel /boot/kernel (ln: /boot/kernel: File exists)

Fixit# ln -s /dist/lib /lib (ln: /lib/lib: Read-Only file system)

After I ran these commands I went back to the other post and ran (zpool import) and it sent me back to the Fixit# prompt instead of the "pool:" prompt you show. Is this correct??



Justin
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
I'm confused, so initially the "ls -l /boot/kernel" gives you the same result as me (No such file or directory), but then when you try the softlink it says the opposite? (File exists) That is very weird.

I am not sure what to tell you at this point. What I posted were the results I got running from the DVD iso... I'm not sure why you're getting results that are inconsistent with mine.

With regards to the pool: prompt in my previous output. That is not a prompt actually. The "zpool import" command spits out all that output (pool: id: state: etc etc). The next thing in my output dump that is actually a prompt is the next occurence of "Fixit#".
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Ok...scratch everything I said above. I went back and looked at the commands from some other post we had discussed and the two commands I posted in question had already been issued and I think that is why it says the "File exists". I rebooted the machine and started from scratch with the commands listed below, and get the exact same thing as you. So this seems right.

Fixit# ls -l /dist
total 596
-r--r--r-- 2 root 0 798 Feb 18 2011 .cshrc
-r--r--r-- 1 root 0 1854 Feb 18 2011 .profile
dr-xr-xr-x 13 root 0 2048 Feb 18 2011 8.2-RELEASE/
-r--r--r-- 1 root 0 6200 Feb 18 2011 COPYRIGHT

...etcetera


Fixit# ls -l /boot/kernel
ls: /boot/kernel: No such file or directory
Fixit# ln -s /dist/boot/kernel /boot/kernel
Fixit# ln -s /dist/lib /lib
Fixit# ls -ld /boot/kernel /lib
lrwxr-xr-x 1 root 0 17 Aug 30 11:22 /boot/kernel@ -> /dist/boot/kernel
lrwxr-xr-x 1 root 0 9 Aug 30 11:25 /lib@ -> /dist/lib
Fixit# ls -l /boot/kernel/zfs.ko
-r-xr-xr-x 1 root 0 1308344 Feb 18 2011 /boot/kernel/zfs.ko*
Fixit#


Now you said (The "zpool import" command) when I enter the command "zpool import" it sends me back to the "Fixit#" prompt with no output. Could this be because I have the drive I am wanting to pull the data off of in an enclosure and it is not yet mounted?? If this is the case how would I go about doing that??


Sorry for the confusion earlier.


Justin
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Ah great! Progress!! :D

The "zpool import" should show you what pools are "out there" that are suitable for import. The fact that it sends you back to the command prompt immediately means 2 things.

Firstly it means that the kernel module loading was successful!! You'd've received all kinds of nasty messages about ZFS libraries if the kernel module and library path was not set up correctly.

Secondly it means that it is not seeing the drive with the degraded ZFS mirror on it. You should definitely not have to mount it, but it should have been detected by the OS when it booted at least.

Have you looked at the output of "dmesg" to see if all the drives you expect to see, including the ZFS donor drive we're trying to import are detected during the boot process?
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Wow...I messed that one up. The reason it was sending me back to the prompt might have something to do with the fact that ZFS wasn't even on the drive! Ooooops!
Long story short back in my messing around with and learning FreeNAS I was switching between UFS and ZFS a lot as I talked about at the very beginning of this thread. Apparently, I thought I had switched back to ZFS and never did. Now that we got that out of the way.

FYI...I have tested it both ways with the HDD in an Enclosure and in the Computer and get the same results of being able to access the data.



Finally, after much of your patience and lots and lots of your hard work I am finally able to see the data!! :smile:


Just one thing, How (What are the commands) to copy all the data at once to the other blank external HDD, or if I wanted to do it one folder at a time??




Justin
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Nice one. Great news!

There are all kinds of ways to copy a directory from one disk to another (cp, dd, rsync), but let's just use trusty cp (assumed the recovered pool is at /mnt/tank and the empty drive is at /mnt/empty):
Code:
# cp -rpv /mnt/tank/* /mnt/empty/

or for a single directory:
Code:
# cp -rpv /mnt/tank/mydir /mnt/empty/

Explanation of arguments: -r is for recursive and -p is for retaining permissions. I added the -v argument (verbose mode) so you get lots of output scrolling across the screen to indicate something is happening.
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Quick question. How would I check to see if my drive is really at /mnt/empty and not lets say /mnt/folder/empty?



Justin
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Quick question. How would I check to see if my drive is really at /mnt/empty and not lets say /mnt/folder/empty?
Simply issuing the "mount" command should show you where each drive is mounted. If the empty drive is not listed it's not mounted and you'll have to do it by hand. The exact command that requires will differ depending on the type of filesystem that is present on the empty disk.
Code:
buckyball# mount
/dev/ufs/FreeNASs1a on / (ufs, local, read-only, soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/md0 on /etc (ufs, local)
/dev/md1 on /mnt (ufs, local)
/dev/md2 on /var (ufs, local)
/dev/ufs/FreeNASs4 on /data (ufs, local, soft-updates)
buckyball_pool on /mnt/buckyball_pool (zfs, local)
buckyball_pool/backup on /mnt/buckyball_pool/backup (zfs, local)
buckyball_pool/home on /mnt/buckyball_pool/home (zfs, local)
buckyball#
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
When I issued the mount command I got the following output.

/dev/md0 on / (ufs, local)
devfs on /dev (devfs, local, read-only)

Other data .....


So would I use /dev/md0 in place of /mnt/empty??
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
No. This is in the Fixit# shell I assume? The first line indicates that the device /dev/md0 is mounted as the root filesystem. Devices with a name that starts with "md" in FreeBSD indicate memory-mapped disks (i.e. not real physical devices).

If you don't recognize the empty device in the list of mounts, you'll have to mount it there yourself. You can use "gpart show" to get a list of partitions that the OS recognized during boot. If your empty disk is properly plugged in and recognized it should be listed there. What filesystem does your empty drive have?
 

bigman

Dabbler
Joined
Aug 18, 2011
Messages
29
Oh ok...

When I run "gpart show" I get the following results. (This is the drive I want to copy the data to)

=> 63 31281745 ad4 MBR (149G)
63 1985 -free - (933k)
2048 308404224 1 !131 [active] (147G)
30840672 2046 -free - (1.0M)
308408318 4171778 2 !5 (2.0 GB)
312580096 1712 -free - (856K)

Other Data....



The filesystem on the "Empty Drive" (It has Ubuntu installed on it actually) is Ext4


Justin
 
Status
Not open for further replies.
Top