Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Backup Volume

Joined
Mar 15, 2017
Messages
13
Thanks
0
#1
Hi All,

I have not played around with ZFS a lot do sorry for this question. I saw lots of threads with similar question but I could not find the answers I was looking for. My problem is I have 3x3TB raidZ1 setup. As the disks have already reached 83% capacity I wanted to move to raidZ2 and move to 5x3TB setup. I was planning to get external hard disk of 10GB (Do I need such a large disk?) and somehow backup my data using snapshots.

Code:
root@freenas:~ # zpool list
NAME           SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
Media         8.12T  6.82T  1.31T        -         -    35%    83%  1.00x  ONLINE  /mnt
freenas-boot  14.4G  4.87G  9.51G        -         -      -    33%  1.00x  ONLINE  -
root@freenas:~ # zpool status -v
  pool: Media
 state: ONLINE
  scan: scrub repaired 0 in 0 days 08:48:24 with 0 errors on Sun May 26 08:48:26 2019
config:

    NAME                                            STATE     READ WRITE CKSUM
    Media                                           ONLINE       0     0     0
      raidz1-0                                      ONLINE       0     0     0
        gptid/a67999be-418e-11e5-817a-d05099228281  ONLINE       0     0     0
        gptid/a70a5c66-418e-11e5-817a-d05099228281  ONLINE       0     0     0
        gptid/a7954218-418e-11e5-817a-d05099228281  ONLINE       0     0     0

errors: No known data errors

  pool: freenas-boot
 state: ONLINE
  scan: scrub repaired 18K in 0 days 00:24:02 with 0 errors on Tue Jul  2 04:09:02 2019
config:

    NAME        STATE     READ WRITE CKSUM
    freenas-boot  ONLINE       0     0     0
      da0p2     ONLINE       0     0     0

errors: No known data errors


What I wanted to do is the following
1. Backup my whole pool Media to external hard disk connected via USB 3.0.
2. Somehow make FreeNAS look at the external backed up pool as original pool so that all jails would functions as it is.
3. Delete the original pool
4. Shutdown FreeNAS
5. Add the extra two 3TB disk
6. Start and Create a new pool with bigger size
7. Snapshot back the data from external disk back to new HDD pool.
8. Change the new pool name back to Media so that everything works as it is.

Is this possible? Can someone share commands for these? Any detailed instructions will be very useful.
 
Joined
Jun 3, 2016
Messages
12
Thanks
1
#3
As far as I know you can also replace disk for disk and resilver everything after each disk. But that would take some time. Adding more disks I not supported afaik. If I where you I would move everything to your external and also backup that again (cloud storage for 1 month). After that replace all HDDs and start from scratch... But maybe thats not the best option :)

EDIT: You are using 6.82 TB. A 8 tb external should be enough.
 
Last edited:
Joined
Mar 15, 2017
Messages
13
Thanks
0
#4
Thanks for reply. Idea of starting from scratch is something I dread. I have everything setup and working perfectly like jails, vms etc. Would love to not disturb it.

I was doing some research on this and I wanted to update it here to see if I missed something.
1) Although my disk size is 8.12T the pool size is 4.59TB
1562714947314.png

This means I only have 4.59TB data, so my snapshot size cannot be bigger than this so a 5TB external disk USB 3.0 should suffice. Am I right?

2) Based on this thread I have these commands.
#zfs snapshot -r Media@backup # create a snapshot
This would create snapshot of entire media, would this work given I have only 664.04 GB left??
3) Using UI I create new usb pool called USB_pool. I assume I have to use Stripe because it a single USB disk. Can you please confirm this?
4) #zfs send -R Media@backup | zfs receive -vF USB_pool # transfer it over
5) Delete the original Media pool from UI. I assume I don't need to rename USB_pool to Media because I will make sure none of the Jails or VMs start on reboot. Also i will switch off all the services like SAMBA etc, in case it looks for Media pool. Please correct me if I am wrong.
6) Shutdown the NAS box and two new 3TB disks to the existing 3x3TB to make it 5x3TB. Start the NAS box
7)Using UI create a new raidZ2 pool named Media.
8) Send USB_pool to new Media (I am sure I got this command wrong)
#zfs send -Rv USB_pool | zfs receive -Fdu Media
9) Delete USB_pool pool from UI. and reenable all the VMS and Jails and services and reboot

At this stage I expect everything to work great on my upgraded pool.
Any help reviewing these commands is appreciated.
 
Joined
Jun 3, 2016
Messages
12
Thanks
1
#5
Ah, I see. A 5 tb external should be sufficient for the Media pool without snapshots. The size of the snapshots depends on how many changes are saved and for how long they are saved. If you just copied raw data on your server and never changed anything the snapshots should be fairly small. But if you do have a lot of changes the snapshots could be huge. Your Media pool does use approx 7tb of space, I guess 3 are for the snapshots then. As far as I understand snapshots they only kick in when you change a file. So for all files that never changed there are no snapshots.

Unfortunately the commands are beyond my knowledge - I hope someone else can help with the commands. Besides I recommend saving the data not as a ZFS pool, too - just for the case something is going wrong. I am not sure if you can access the data once the pool is broken.

Good luck!
 
Last edited:
Top