Featured Post

HOW TO: Install VPN server on Ubuntu when server is behind firewall

The whole point in this post is to run your own VPN service, and allow you to connect remote devices to your home network. To start off yo...

Jun 9, 2013

Encrypted Disks and NAS4Free

The other day I bought a 4TB disk for my NAS, I needed to move all my data from an existing 2TB disk to the new 4TB disk.  I used TeraCopy (http://codesector.com/teracopy) for this, as not only does it appear to move the data quicker than Windows Explorer, but it can validate it after transfer.

The main problems I had related to the fact that I wasn't simply adding a disk, I was replacing a disk.

First of all I used a free box that I had to run live NAS4Free and setup the disk.  The sequence for encrpyting a disk in NAS4Free is as follows:
  1. Add Disk
  2. Create your encrypted volume using the previously added disk : This step will automatically ‘attach’ this volume
  3. Format this encrypted volume
  4. Add a Mount Point using this encrypted volume
It's very important to follow this order, I tried to do 3 before 2 and always ran into problems mounting.

Once the disk was added I was able to transfer the data, the next step was waiting 24hrs.

After all the data had transferred it was time to remove the old drive and replace it with the new one.

Before removing the drive physically I deleted the following:
  • CIFS/SMB shares
  • Mount Point
  • Disk
I did not remove encrypted reference, as I thought it would delete the contents of the drive, which I wanted as backup until I had confirmed the new drive was working.

Next step was to physically remove the drive and replace it with the new one.  Once the drive was in I had to do the following steps to get everything up and running:
  1. Add disk (note it is encrypted)
  2. Remove previous encypted disk information
  3. Add new disk to encryption list (NOTE: DO NOT INITIALIZE)
  4. Create Mount Point (NOTE: I had to fsck/check-disk first, as I was receiving errors when mounting)
  5. Add CIFS/SMB share
I did a couple of reboots to make sure everything was coming up as expected.  At this point I took a new backup of the NAS4Free configuration.

No comments: