Moving data from one old ZFS pool to a new one

seldo

Dabbler
Joined
Jan 4, 2021
Messages
47
Hello,

It’s now time to move my data to my new system.
I’ve used my backup pool created in Nas4Free 11.0.something and I’ve been adding and reorganising my data on macOS with the latest ZFS available. Both macOS and TrueNAS say that the pool should be upgraded since Nas4Free version was fairly old.

I haven’t done it as:
  • I can still write to the pool
  • I anyway plan to destroy the pool once I moved the data to the new system, and then recreate a fresh backup from a fresh pool.
I know have two questions:
  1. How do I move data from he current (old) pool to the fresh one? zfs send | receive or doing a plain cp?
    The receiving pool will be fresh and using the latest zfs.
  2. Because I’ve made modifications on macOS, the ownership is somewhat messed up.
    Original files where created through SMB, and I believe were created / owned by root (will check tomorrow).
    The latest files I’ve added are most likely under my current macOS user name.
    Should I chown / chgrp my pool to make sure it’s matching what the new system will expect (root/wheel?)
    I already know there is a difference since old files don’t go to the trash and are deleted immediately.
Thanks!
 

seldo

Dabbler
Joined
Jan 4, 2021
Messages
47
Here's what I have.

Code:
# written through SMB by Nas4Free:
$ ls -l /mnt/MAIN_POOL_migration/photos/LRDB/Caraibes/2017-Cuba
total 582
drwxrwxrwx   2199  1000  wheel  2199 Dec 24  2015 Cuba

# written directly mounted in macOS:
ls -l /mnt/MAIN_POOL_migration/photos/LRDB/Europe/DE/BY/2021
total 85
drwxr-xr-x@  223   seldo staff 223  Apr 3 00:55 MUC_150321

1000:wheel is from Nas4Free (where 1000 admin (default user) on Nas4Free and wheel because admin is a sudoer)
seldo:staff is from macOS (first default user is 501 in macOS, so seldo=501, and staff being the default group)

I can't quite remember my user settings.
I had one user other than admin, but I don't remember how I was connecting to the NAS.
I didn't create groups by then, so I was assigned to my own group (like TN is doing).

Does SMB/NFS write files under the permissions of the user transferring data, or is handed over to the system (admin/root)?
I'd say I was connecting as seldo, but the files are written as 1000:wheel, making me think it is the later.
 
Last edited:

seldo

Dabbler
Joined
Jan 4, 2021
Messages
47
I spent the last two hours trying to get NFS shares to appear in macOS, to no avail.
I can see the share in showmount but I keep being rejected, despite having created a user with same name, same UID on the TN side.
I found this: https://wiki.archlinux.org/index.php/NFS/Troubleshooting and will dig into it another time.

I'll stick to SMB for now. I will check the ACL for the filesystem so that it is aligned to what I was getting before.
 
Last edited:
Top