Add SATA HDD to FreeNAS to backup ZFS dataset

Status
Not open for further replies.

Dylan H

Cadet
Joined
Jul 22, 2015
Messages
5
Good afternoon all,

I have searched the forums for this topic and have found a few different avenues to go, but was hoping to get some further (current) guidance from a directed question. I apoligize I don't have my specs in front of me, but I am running a supermicro motherboard, Intel G2030 processor, 2 x 4GB ECC RAM, and FreeNAS 9.2.1.7. I can post specifics if required.

I have a 4 x 2TB mirrored dataset I need to take a backup of. I want to add a 4TB SATA drive internally to my NAS, then cycle between at least 2 drives to take backups offsite. I am planning on doing some maintence on my FreeNAS (possibly upgrade to 9.3, create additional mirrored pools) and want to take a backup before I do anything.

A few questions I have:

1. Is it too risky to connect the new drive with the system running? My system has been running sound for 1 year, and I have concerns about a rebooting before taking a backup.
2. If I am OK to connect the drive hot, will FreeNAS pick up the new drive without a restart?
3. I've read there are numerous ways to take backups (rsync, snapshot replication, and to a lesser extent cp), but what would be my best bet?

There have been some posts in the past from user Dusan about replicating snapshots, but I haven't seen anything recently.

Any guidance anyone can provide would be greatly appreciated.

standing at crossroads,
Dylan
 

Neil Whitworth

Dabbler
Joined
Nov 14, 2013
Messages
30
1. Is it too risky to connect the new drive with the system running? My system has been running sound for 1 year, and I have concerns about a rebooting before taking a backup.

That depends on how much risk you are willing to take.. The general advice you will get from the forums is to shutdown before adding/removing drives, as this is the SAFEST option.

2. If I am OK to connect the drive hot, will FreeNAS pick up the new drive without a restart?

That depends on what hardware you have, and how well it i ssupported by FreeBSD. With the right hardware it CAN work, but see the answer to 1. above.

3. I've read there are numerous ways to take backups (rsync, snapshot replication, and to a lesser extent cp), but what would be my best bet?

Again it depends on what you need. Since you are adding a drive it will need to be a sperate ZFS pool (do NOT add you drive to the existing pool if you want to remove it later). Since it will only be readable on a FreeNAS system (and a few other systems which support ZFS - IF that have all the feature flags used on your pool) replication is probably your best bet as it will give you an exact copy of your pool, including datasets, permisions etc..
 

Dylan H

Cadet
Joined
Jul 22, 2015
Messages
5
Thank you for your reply Neil.

I will play is safe and shut down the system.

I will dive into the manual and read up on snapshots/replication. After searching a little further on the topic, I found some helpful threads talking about how to setup the ssh keys properly.

As far as the initial snapshot on the source 3TB dataset goes, what can I expect to see for space used?

I plan to get it set up this weekend if all goes well.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I will play is safe and shut down the system.
I view the safety aspect differently when dealing with a separate pool. I definitely wouldn't try to hot swap a drive in my main pool, but I have had no issues with doing the following more than once:
  1. Placing a pair of drives into a drive dock connected by eSATA.
  2. Powering on those external drives (console messages indicate FreeBSD recognizing them).
  3. Creating a mirrored vdev pool on those drives and replicating a snapshot to it.
  4. Detaching the external pool (using the GUI - this step is important).
  5. Powering off the external drives (console messages indicate FreeBSD seeing them go away).
 

Dylan H

Cadet
Joined
Jul 22, 2015
Messages
5
I view the safety aspect differently when dealing with a separate pool. I definitely wouldn't try to hot swap a drive in my main pool, but I have had no issues with doing the following more than once:
  1. Placing a pair of drives into a drive dock connected by eSATA.
  2. Powering on those external drives (console messages indicate FreeBSD recognizing them).
  3. Creating a mirrored vdev pool on those drives and replicating a snapshot to it.
  4. Detaching the external pool (using the GUI - this step is important).
  5. Powering off the external drives (console messages indicate FreeBSD seeing them go away).

Thanks for the info Robert. I will definitely be looking into this in the near future.

Currently I don't have any eSATA ports or a dock, so there is more room for human error plugging in power and data cables directly into the drive (mounted in a drive bay obv.).

I will do some searches on supported/successfully used eSATA cards/docks in the near future, as that would certainly streamline things.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I will do some searches on supported/successfully used eSATA cards/docks in the near future
My eSATA cards are Rosewill (Newegg) RC-219, which use the SiI3132 chipset, which is on the FreeBSD HCL. They only go up to SATAII but that isn't a bottleneck for current generation hard drives. Unfortunately it seems this specific card is no longer available.

Another option is to use a bracket that turns an internal SATA port into an eSATA port. I have some of those too and they're probably the best option if you have spare SATA ports in your box.

For docks I use StarTech SATADOCK22UE, which has two straight-through eSATA ports, rather than a single eSATA port with a port multiplier. Nobody around here has anything good to say about port multipliers, although I have used a Thermaltake BlacX Duet successfully with my FreeNAS in the past.

Finally, when running drives in a dock for more than a few minutes, you need to keep them cool. I use a USB desk fan.

I only use this setup occasionally when I want to reconfigure my pool, which I don't expect to do again for quite a while. There are eSATA enclosures available if you want something a bit tidier for ongoing backups, but keep in mind the issue of port multipliers.
 
Status
Not open for further replies.
Top