Glorious1
Guru
- Joined
- Nov 23, 2014
- Messages
- 1,211
Objective: Transitioning from deprecated AFP to SMB file sharing. This is not well documented, but I understand there are legacy issues if you just change the shares and a few dataset properties. I've seen it recommended to make a new clean dataset with SMB share type, and move your data into it. That's what I want to do. The trouble I'm having is moving the data completely, ideally with snapshots so the transition is seamless.
What I've tried: I had some misfires with
ZFS Replication (full): The problem here, it seems, is that I can't do a full replication to an existing dataset. And of course the Catch 22 is that simply replicating the dataset will give me my old dataset and defeat the purpose. Here's what happens.
ZFS Replication (incremental): Here the problem seems to be that a snapshot of some sort is required on the destination. I could make one, but I would be flying blind and doubt it would work. Here's the attempt, trying to increment between the oldest and newest snapshots on the source:
rsync:
What I've tried: I had some misfires with
cp
. The other recommendations bandied about more frequently are rsync
and zfs
send/receive. But there are details that don't get bandied about as much. I would appreciate insight and suggestions for the ZFS propeller-heads.ZFS Replication (full): The problem here, it seems, is that I can't do a full replication to an existing dataset. And of course the Catch 22 is that simply replicating the dataset will give me my old dataset and defeat the purpose. Here's what happens.
Code:
Tabernacle:~$ sudo zfs send -R Ark/Jim@auto_2023-01-13_0000-2w | sudo zfs recv Ark/Jim2 cannot receive new filesystem stream: destination 'Ark/Jim2' exists must specify -F to overwrite it warning: cannot send 'Ark/Jim@auto_2022-08-01_0000-6m': signal received warning: cannot send 'Ark/Jim@auto_2022-09-01_0000-6m': Broken pipe warning: cannot send 'Ark/Jim@auto_2022-10-01_0000-6m': Broken pipe [ . . . ] Tabernacle:~$
ZFS Replication (incremental): Here the problem seems to be that a snapshot of some sort is required on the destination. I could make one, but I would be flying blind and doubt it would work. Here's the attempt, trying to increment between the oldest and newest snapshots on the source:
Code:
Tabernacle:~$ sudo zfs send -R -i @auto_2022-08-01_0000-6m Ark/Jim@auto_2023-01-13_0000-2w | sudo zfs recv Ark/Jim2 cannot receive incremental stream: most recent snapshot of Ark/Jim2 does not match incremental source warning: cannot send 'Ark/Jim@auto_2023-01-13_0000-2w': signal received Tabernacle:~$
rsync:
rsync
seems to work mostly, but the new and old datasets are very different size. I assume, but am by no means sure, that is because the snapshots fail to send (this is after a previous rsync sent most of the dataset):Code:
Tabernacle:~$ rsync -aUv --delete /mnt/Ark/Jim/ /mnt/Ark/Jim2/ sending incremental file list rsync: [sender] readdir("/mnt/Ark/Jim/.zfs"): Invalid argument (22) rsync: [generator] failed to set times on "/mnt/Ark/Jim2/.zfs": Operation not supported (45) rsync: [generator] failed to modify permissions on "/mnt/Ark/Jim2/.zfs": Operation not supported (45) rsync: [generator] failed to set times on "/mnt/Ark/Jim2/.zfs/snapshot": Operation not supported (45) rsync: [generator] failed to modify permissions on "/mnt/Ark/Jim2/.zfs/snapshot": Operation not supported (45) rsync: [generator] recv_generator: mkdir "/mnt/Ark/Jim2/.zfs/snapshot/auto_2022-08-01_0000-6m" failed: Operation not supported (45) *** Skipping any contents from this failed directory *** IO error encountered -- skipping file deletion .zfs/ .zfs/snapshot/ .zfs/snapshot/auto_2022-08-01_0000-6m/ rsync: [generator] recv_generator: mkdir "/mnt/Ark/Jim2/.zfs/snapshot/auto_2022-09-01_0000-6m" failed: Operation not supported (45) *** Skipping any contents from this failed directory *** .zfs/snapshot/auto_2022-09-01_0000-6m/ rsync: [generator] recv_generator: mkdir "/mnt/Ark/Jim2/.zfs/snapshot/auto_2022-10-01_0000-6m" failed: Operation not supported (45) *** Skipping any contents from this failed directory *** .zfs/snapshot/auto_2022-10-01_0000-6m/ [ . . . same with all snapshots]