ZFS: Difference between revisions
imported>Sjau |
imported>Sjau No edit summary |
||
Line 286: | Line 286: | ||
It's also recommended to have two usb sticks available. One custom iso with the old zfs format and one with the new one. So you can easily switch between them. | It's also recommended to have two usb sticks available. One custom iso with the old zfs format and one with the new one. So you can easily switch between them. | ||
If you don't have enough free space to move a dataset completely, you can just use both usb sticks to boot either version and transfer files partially by rsync like this: | |||
# Boot usb with stability patches applied | |||
# Import the pool and load the key | |||
# Create a new encrypted dataset, e.g.<br/><code>zfs create -o encryption=aes-256-gcm -o keyformat=passphrase -o mountpoint=legacy zroot/mediaNEW</code> | |||
# Mount the format one and the new format one, e.g. <br/><code>mkdir -p /mtn/media{OLD,NEW}</code><br/><code>mount -o ro -t zfs zroot/media /mnt/mediaOLD</code><br/><code>mount -t zfs zroot/mediaNEW /mnt/mediaNEW</code> | |||
# Once mounted, you can use rsync to transfer (part) of the data:<br/><code>rsync -avp /mnt/mediaOLD/Music /mnt/mediaNew/</code><br/>Notice: In the source folder there's no trailing "/" so that in the destination location provided that whole folder will be created. Of course you can also just start with a sub folder if one is too big. | |||
# Rsync (or copy) over as much data as you can. Since the old format dataset can only be mounted as read-only, you'll have to boot into the other usb stick with the old format, mount the old media folder and delete files in there. You may also need to delete snapshots first. | |||
# Afterwards boot again into the new format usb stick and repeat. | |||
Of course if there's no sensitive data that needs encryption, you can just boot up into the old format, create a new, non-encrypted dataset and start moving files over. | |||
== Need more info? == | == Need more info? == |