SOLVED Move data from Debian Install on same machine

Status
Not open for further replies.

LeoSum

Dabbler
Joined
Dec 13, 2015
Messages
36
Hi there,
I am currently setting up FreeNAS on a machine that has previously been running OpenMediaVault (Debian Linux).
For the system installation I used a new SSD, the old Debian system is still intact on the other SSD that is currently disconnected.

Currently the main data is inside a LUKS encrypted container on a madm configured RAID1, consisting of 2x3TB drives:

Code:
/dev/sda1 \
            --> /dev/md1 --> /dev/mapper/md1_crypt
/dev/sdb1 /


Additionally I have a backup, also inside a LUKS container on a third disk.

As I understand, the LUKS containers cannot be mounted in FreeNAS. Now the big Question is, how to best move the data over to FreeNAS?

I see mainly two options and would like to know what you think would be best.

Option 1:
- Lock away the backup disk in a safe place
- Boot up Debian
- Degrade the RAID by removing one disk from the md
- create a new (unencrypted) ext2 volume on the removed disk
- copy the data to the ext2 volume
- Boot up FreeNAS
- mount the ext2 volume
- create new ZFS volume on the other disk
- copy data to ZFS volume
- erase the ext2 disk and add it as a mirror to the ZFS volume
-> mission accomplished
The downsidse are that the data was on the drive unecrypted and might be retrievable this way and I am actually copying the 3TB around twice.

Option 2:
- Lock away the backup disk in a safe place
- Boot up FreeNAS
- Create a new ZFS volume on one of the two disks
- Connect the other disk to my ubuntu desktop
- mount the degraded Raid and open the LUKS container on ubuntu desktop
- copy the files via LAN
- add the second disk as a mirror to the ZFS volume
-> mission accomplished

Even though just doing one copy process on option two, I fear this might still be a lot slower. In the past, when copying files over my gigabit network to the Debian NAS, I only got around 30 MB/s, so copying my 3TB of data would take around a day (but maybe the transfer speed increases with FreeNAS?). Additionally I don't know how long the ZFS mirroring will take when I add the second disk.
I would love to get this done within one weekend.

What do you think is the best way to do it?
 
D

dlavigne

Guest
Slight change to option 1: instead of copying the data, import the ext2 disk using the instructions in http://doc.freenas.org/9.3/freenas_storage.html#import-disk. Note that import requires you to first have a ZFS pool on the other disk, as well as a dataset to copy into. If that works, it should be faster than a network copy. Either way, backup anything you couldn't live without to an external media before degrading the existing RAID.
 

LeoSum

Dabbler
Joined
Dec 13, 2015
Messages
36
Thanks for the hint. That's actually a good function!

However I decided to go with option 2. That way the data stays encrypted all the time.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
Thanks for the hint. That's actually a good function!

However I decided to go with option 2. That way the data stays encrypted all the time.
Option 3 (it requires some ZFS knowledge though):
  • start FreeNAS with the destination data disk
  • on the data disk create a ZFS pool (there are very specific commands to execute to be 100% compatible with FreeNAS); also the pool has to be of version 28 or you should follow instructions from http://blog.vx.sk/archives/44-OpenZFS-Feature-Flags-Compatibility-Matrix.html on setting only those feature flags that work on both Debian and FreeNAS (you can - probably should - test portability using anything, even ZFS on a USB memory device beforehand).
  • export the pool on FreeNAS
  • shutdown FreeNAS, boot Debian
  • import your pool on Debian
  • copy data to ZFS pool
  • shutdown Debian, boot FreeNAS
  • look at the data in the ZFS pool, if they are OK, add the second disk from LUKS to create a mirror
  • please read about encryption in the FreeNAS manual https://doc.freenas.org/ and also https://forums.freenas.org/index.php?threads/10-x-encryption.38979/
 
Status
Not open for further replies.
Top