Data missing in pool, but space used

holmes.j

Dabbler
Joined
Oct 4, 2017
Messages
12
I recently converted a striped array to a 6x8TB in a Z2 array. I successfully moved my iocage and jails datasets over to the new pool. But I'm running into problems with my media dataset (13TB).

There were bad sectors on the old array in that dataset. When I used zfs send/receive it would fail consistently at something like 6.34TB in. So I said screw it and just used rsync to copy the data over. That seemed to have worked, until I rebooted. Now my dataset is empty, but the pool is claiming to have used the 13TB.

So my question is, where is the data? How do I get it back to the dataset and make it visible? Looking at the screenshot, goofy is the new pool, main is the old. goofy claims to have used 13.4TB but none of the datasets show it.
 

Attachments

  • Screen Shot 2021-11-28 at 7.21.45 AM.png
    Screen Shot 2021-11-28 at 7.21.45 AM.png
    601.5 KB · Views: 171

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Rsync will make directories rather than datasets, so chances are you have a masking directory problem.

The dataset(s) can't mount because you have directories that may not be empty in the locations that should be used for the mount of the dataset(s).

You can try to remove all the directories and run zfs mount -a to see if you can get to the dataset contents.
 

holmes.j

Dabbler
Joined
Oct 4, 2017
Messages
12
Rsync will make directories rather than datasets, so chances are you have a masking directory problem.

The dataset(s) can't mount because you have directories that may not be empty in the locations that should be used for the mount of the dataset(s).

You can try to remove all the directories and run zfs mount -a to see if you can get to the dataset contents.
I made a dataset prior to running rsync. My rysnc's were copying directories like movies/tv from the old to the new dataset.

zfs mount -a didn't change anything. However, zfs unmount /mnt/goofy/media does expose the data.

zfs list -o space shows it used by the root of the pool instead of the media dataset.

Code:
NAME                                                             AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
goofy                                                            14.7T  13.4T        0B   13.3T             0B       142G
...
goofy/media                                                      14.7T   192K        0B    192K             0B         0B
main                                                              822G  13.2T        0B    144K             0B      13.2T
...
main/media                                                        822G  13.2T      250G   13.0T             0B         0B


Seems like I'm doing something very wrong. Any idea what it is?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Somehow the rsync was run before the dataset structure was there, so it was able to create the directories (which aren't datasets) where it put the files.

You can either accept that the data now lives in that parent dataset (and just delete the children) or rename each of the child directories (add a 1 at the end of each directory name) then zfs mount -a to get the datasets mounted back and move the data across.
 
Top