Cannot see data after using rsync between two NAS's, and not sure of the culprit

Hello all. I am new to TrueNAS 25.10.0.1, as about 5 days ago. I also posted this in the r/TrueNAS subredit, but I wasn’t sure about visibility of people who might be able to help, so I came here.

I recently purchased a UGREEN DXP8800 Plus for my home NAS to migrate out an old 12 year QNAP TS-853a. I’ve switched out the OS SSD so I could install TrueNAS without wiping the UGOS SSD if I wanted to go back. That went all fine and dandy until I started to copy my data using the rsyncd app from the TrueNAS app store. It’s setup with RW capabilities and I was able to transfer quite a bit of data with no issues.

The data sets I created where:

  • media → books,

  • media → music,

  • media → movies,

  • media → tv

The copying of my tv shows from the old NAS to the new NAS has completed, but the folder is showing empty in file explorer or when I ssh into the NAS. 5tb of the data that’s showing in the media dataset, should be in the tv dataset.

I am showing data in all the folders but tv. All the permissions are the same, however the dataset media, where the SMB is shared, is showing the total size, as if the tv folder was populated. If you were to add up each dataset that was created, it does not equal the total of the whole media smb share, when it should.

When you look at the old NAS where you configured what is to be copied, you can actually see the folders that were created when the sync completed successfully. However, when you look at the SMB folder, it’s empty.

I have included some screenshots to to go along with all I’ve mentioned above. The first permissions screenshot is of the tv dataset, the second is of the other 3 datasets under media.

Oh, and I am using the truenas_admin account that was created upon setup to complete the rsync between devices. The media_users and media_ro_users are groups that I created for access to the folders by people I will eventually setup.

Please help as I don’t want to copy the 5tb of data over again to have the same result.

I guess because I am new, it will not let me embed medai/screenshots in a post.

An error occurred: Sorry, you can’t embed media items in a post.

You might have somehow copied the files into a folder that is mounted over by a dataset.

zfs list -t fs -r -o space <poolname>

Here’s the output. Looks like the 5.91T is showing under volume2/media as USEDDS? Sorry it’s all greek to me. I’ve always been just a Windows guy and now trying to expand my horizons. lol

NAME                  AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
volume2               43.4T  9.31T        0B    140K             0B      9.31T
volume2/applications  43.4T  1.06T        0B   1.06T             0B         0B
volume2/home          43.4T   106G        0B    106G             0B         0B
volume2/media         43.4T  8.15T        0B   5.91T             0B      2.24T
volume2/media/books   43.4T  92.1G        0B   92.1G             0B         0B
volume2/media/movies  43.4T  1.97T        0B   1.97T             0B         0B
volume2/media/music   43.4T   181G        0B    181G             0B         0B
volume2/media/tv      43.4T   140K        0B    140K             0B         0B

Correct. You copied the files into a folder that exists in the filesystem of the dataset volume2/media.

The filesystem of the dataset volume2/media/tv is empty.

I’m guessing the folder name is “tv”?

Did you create the dataset volume2/media/tv after having already created a folder of the same name?

What are the results of this?

ls -l /mnt/volume2/media
zfs mount | grep -i tv
du -hs /mnt/volume2/media/tv

Truthfully, I don’t remember. I thought I had created all the datasets at the same time, but could have been wrong. Is there an easy way to get the data from the folder to the dataset without having to do a recopy?

total 270
drwxrwx--- 11 1000 users  12 Oct 23 20:34 books
drwxrwx---  2 1000 users 781 Dec  9 17:24 movies
drwxrwx---  8 1000 users   9 Aug 20 09:13 music
drwxrwx---  2 root root    2 Dec  8 15:52 tv
volume2/media/tv                /mnt/volume2/media/tv
512	/mnt/volume2/media/tv

Did you create any snapshots yet? If you did, then any snapshot for volume2/media will be useless and only consume double space for no reason if you want to proceed.

I have not created any snapshots yet. I just wanted to get the data over there first, then start the snapshot process of the data I cared to have snapshots for.

Check if you have block-cloning enabled.

zpool get feature@block_cloning volume2

cat /sys/module/zfs/parameters/zfs_bclone_enabled

Are you using encrypted datasets?


For these steps, use sudo when neccessary.

:warning: First, create a pool checkpoint.

zpool checkpoint volume2

Next, destroy the tv dataset. Do this in the GUI.

Next, confirm the contents within the tv folder.

ls -l /mnt/volume2/media/tv/

du -hs /mnt/volume2/media/tv

Next, rename the tv folder to tv_old.

mv -v /mnt/volume2/media/tv /mnt/volume2/media/tv_old

Next, create your tv dataset (again) as a child under volume2/media. Do this in the GUI. Apply dataset properties and ownership and permissions how you want them.

Next, use cp to copy everything over from old to new. This should hopefully use block-cloning, which is much faster. (The . will tell it to include everything, even hidden files and folders.)

cp -av /mnt/volume2/media/tv_old/. /mnt/volume2/media/tv/

Next, confirm with the following commands:

zfs list -t fs -r -o space

ls -l /mnt/volume2/media

ls -l /mnt/volume2/media/tv

zfs mount | grep -i tv

du -hs /mnt/volume2/media/tv

Next, delete the old folder.

rm -rf /mnt/volume2/media/tv_old

Finally, if you’re certain that no mistakes were made and you’re happy, you can safely discard the checkpoint.

zpool checkpoint -d volume2

:warning: If you made a mistake or something went horribly wrong, then you can rewind the pool to the checkpoint instead of discarding it. This is not supported in the GUI or middleware, but it’s possible to do it with the command-line.

Thank you for your assistance. It looks like it’s copying all the data over to the re-created dataset. It’ll be a while before it’s complete (probably all night), considering the size and it’s already only copied 300gb of 5TB, we’ll be a while. I am not sure it’s using the block-cloning even though it is enabled, but it seems it’ll be faster than having to recopy on a 1gb connection, as the old NAS doesn’t have a 10gb NIC.

NAME     PROPERTY               VALUE                  SOURCEvolume2  feature@block_cloning  enabled                local1

A question though, why did you have me use the cp command instead of the mv command to put the data back to the recreated dataset, wouldn’t it be faster? I am sure there’s something I’m missing but not sure what. Trying to be sponge. lol

The one thing that I noticed that every file is giving this error, but it’s copying the data, so maybe it’s harmless?

cp: preserving permissions for ‘/mnt/volume2/media/tv/./filename_here..m4v’: Operation not permitted

Thanks again.

It’s enabled for the pool. What about the other command?

Even if it is fully enabled, it will not be used if the datasets have different recordsize properties or either of them is encrypted.

I almost forgot in my steps to tell you to do this in a tmux session. If the session gets interrupted, it will abort the copy operation. Did you do this in the GUI Shell or in an SSH session?


It wouldn’t be any faster. You’re copying files across filesystems (datasets), which means mv is basically cp + rm.


Ownership and permissions are likely different for volume2/media and volume2/media/tv. I assumed you used the same ownership and permissions for your datasets.

Did you run the cp command with sudo?

This was the output of the command you had me run prior to the checkpoint command. I missed the encryption part, which the answer to that is no encryption.

NAME PROPERTY VALUE SOURCE
volume2 feature@block_cloning active local
1

I used SSH as I know nothing about tmux.

Ownership should be the same as I have it specified from the volume2/media (media is top most dataset and where the smb share is) and populated form the parent to all child objects.

Yes, the cp command was run with sudo. As the cp command is still running, I haven’t gotten to the “other” commands yet.