Solved ZFS: Data in datasets not showing

Hi!
I recently wiped the system drives and did a fresh install of FreeBSD 10.1. I imported all 3 zpools without any problems. However, in one of the pools, there is no data in the datasets (tested with root user and ls –a). I also checked a snapshot from a few days earlier, but nothing showed there either. The only change that was made to the pool was a name change during import (tank4 to tank2). By using zpool list, the pool does contain data and “get compressratio” shows the data are compressed (see links at bottom).

I also tried ran the Live DVD version of ZFSguru (a FreeBSD 10.1 dist) and it showed some problem with the pool (see 3rd link).

Can anyone help me with this? Any more information you need?

https://dl.dropboxusercontent.com/u/17106738/zfs/zfs temp3.JPG
https://dl.dropboxusercontent.com/u/17106738/zfs/zfs tempo2.JPG
https://dl.dropboxusercontent.com/u/17106738/zfs/ZFS.JPG
 
The ZFSGuru distribution you tried must not be based on FreeBSD 10.1. It's complaining that it doesn't have support for the "embedded_data" feature, which is enabled on your pool. This feature is supported by 10.1, so I'm guessing your pool was created on a 10.1 host (or some STABLE/CURRENT system with embedded_data support) and ZFSGuru 0.2.0-beta9 is based on 10.0 or earlier.

Your screenshot in the last post shows that there is 1.41 T of data, all inside the tank2 dataset. Can you show mount output and tell me what folder your data should be in - i.e. the folder you are looking in that is empty but shouldn't be?
 
junovitch; You might be on to something. My original tank2 pool failed and I had to make a new one (new disks). I had some issues when I first tried to name the new pool tank2, so I named it tank4. After wiping the system drives (FreeBSD 10.0 was installed then) and installed 10.1, I imported the tank4 pool as tank2 to the system. That was when all the data in the datasets was missing. Here is the first lines of zpool history tank2: https://dl.dropboxusercontent.com/u/17106738/zfs/tank2his1.JPG

usdmatt; The ZFSGuru distribution should have been 10.1, but I might be wrong. The pool was created using 10.0 (if I remember correctly). At least the pool was created pre-10.1. Here's the mount output (containing tank2 in the text and using mount): https://dl.dropboxusercontent.com/u/17106738/zfs/mounttemp.JPG
 
I either used cp from the old tank2 to tank4 (the now tank2), or I used samba (when one of the drives failed in tank2 I made a backup to my Windows machine).
 
You are looking in /tank2/Camcorder, however your zfs list output shows that this dataset and the 2 underneath it are basically empty apart from a few KB (probably just directory entries and metadata). There is no data in these datasets, it's all directly inside tank2.

Can you unmount all of the empty datasets, leaving just the one that has 1.41 TB of data, then look again. It may be an actual ZFS error, but I suspect you may have managed to get the data into a subdirectory on the tank2 dataset, and the empty tank2/Camcorder dataset is covering it up.

Code:
# umount tank2/Camcorder/Projects
# umount tank2/Camcorder/Render
# umount tank2/Camcorder
... now see what you have in /tank2 folder ...
 
That worked! Thank you very much!
Do you know what could have caused this? There was no folder called /tank2 before I imported the pool.
 
Mounting ZFS datasets using the automatic mounting as in zpool import creates the directory automatically for the top level mountpoint, in your case /tank2.
 
I don't think renaming the pool would of caused this problem. From what I can see, you would of had the same problem if you'd left it called tank4.

The primary issue, is that when you originally copied the data to the pool (before you renamed it tank2), you didn't copy the data to the tank4/Camcorder filesystem (or the 2 filesystems under that). You copied it to a directory called Camcorder on the tank4 filesystem.

This example demonstrates the same basic problem:

I create a directory called /storage/data, and put a file in there, which you can see with ls:
Code:
root@core1:/home/matt # mkdir /storage/data
root@core1:/home/matt # echo "Hello" > /storage/data/test.txt
root@core1:/home/matt # ls -l /storage/test
total 2
-rw-r--r--  1 root  wheel  6 Jul 10 15:58 test.txt
I now create a new ZFS filesystem, which happens to be mounted in exactly the same place:
Code:
root@core1:/home/matt # zfs create storage/data
root@core1:/home/matt # mount |grep storage/data
storage/data on /storage/data (zfs, local, noatime, nfsv4acls)
If I look in that folder now, I'm seeing the contents of the new dataset, which is completely empty. It has mounted over the top of my data directory:
Code:
root@core1:/home/matt # ls /storage/data
root@core1:/home/matt #
That data is still there, but it's on the parent /storage filesystem and is being hidden by the new empty filesystem. If I unmount the new filesystem, I can see it again:
Code:
root@core1:/home/matt # umount storage/data
root@core1:/home/matt # ls /storage/data
test.txt

It's not easy to tell how your pool ended up like it did without knowing exactly what was going on when you first created tank4 and copied your data to it. It could be the way you copied the data (this situation is very common with NFS), or it could be that some of the ZFS datasets were unmounted when you copied the data.
 
Back
Top