Solved

Upgrade disk in FreeNAS 2TB -> 4TB

Posted on 2013-11-26
9
3,567 Views
Last Modified: 2013-12-23
I have a small server running FreeNAS which is being used to store backups.

The FreeNAS server has a ZFS volume which is stored on a single 2TB disk.

I just bought a new 4TB disk that I want to upgrade to. How do I do that?

Can I power off the server, remove the 2TB disk and image it over to the 4TB using something like dd? Will FreeNAS recognize it when I plug it back in?

Or is there some supported way directly in FreeNAS to do this?
0
Comment
Question by:Frosty555
9 Comments
 
LVL 19

Accepted Solution

by:
xterm earned 500 total points
ID: 39679865
I would do the following:

- Yes, take the drive out, put both in an unused system, get any Linux/BSD boot disk, and then use dd to image the 2TB disk over to the 4TB disk.
- Now you will have a 4TB disk, but it will only look like 2TB because it's an exact image of previous disk.  My suggestion is to use gpart to expand the ZFS volume (see http://freebsd.so14k.com/grow_zfs_partiton_on_hardware_raid.shtml)
- Then according to the FreeNAS documentation, you should simply be able to import this as a new volume when you put the 4TB disk back in (see http://doc.freenas.org/index.php/Volumes)
0
 
LVL 55

Expert Comment

by:andyalder
ID: 39681185
Are you booting freenas from this disk or from USB stick?
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39684217
Single disk configuration?

DD'ing a 2TB might take very long time. The best way is to import the external disk, copy the data then migrate the mount points. Then remove the old disk. This is assuming you have an extra slot, if it doesn't then you would have to follow xterm's method.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 31

Author Comment

by:Frosty555
ID: 39713038
I'm imaging it over now. Hopefully I should have some results for you by the end of the night whether it worked or not, and if not, we can figure out what to do next
0
 
LVL 19

Expert Comment

by:xterm
ID: 39713048
Good luck!  Let us know....
0
 
LVL 31

Author Comment

by:Frosty555
ID: 39729442
(FYI - it was actually a 3TB disk I am upgradingto a 4TB disk, my mistake)

Also I followed some instructions here:
https://bugs.freenas.org/issues/342

Well, I followed the instructions here and the instructions posted by xterm, and I did successfully image the disk over from the 3TB disk over to the new 4TB disk. I had to do a "gpart recover ada0" to recover the "corrupted" partition after DDing it over to the 4TB disk, and then I had to do a "zpool export" and "zpool grow" to make the zpool consume the free space.

Everything seems to have gone well, but I still don't see 4TB when I actually look at it in FreeNAS.

Here's the results if I examine the disks on the system now:

[root@esmerelda] ~# gpart show ada0
=>        34  7814037101  ada0  GPT  (3.7T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  7809842696     2  freebsd-zfs  (3.7T)
  7814037128           7        - free -  (3.5k)

[root@esmerelda] ~# zpool list
NAME              SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
MAINPOOL_BACKUP  1.81T   941G   915G    50%  1.00x  ONLINE  /mnt
OTHER_BACKUPS    2.72T  2.26T   470G    83%  1.00x  ONLINE  /mnt

Open in new window


The "OTHER_BACKUPS" zpool is the one that is associated with my 4TB drive.

In FreeNAS this is what I see:
The "OTHER_BACKUPS" zpool which is assigned to the 4TB disk
Now, these are nested zfs datasets, so that might be part of the reason why I'm not seeing the full 4TB... but I'm stumped now, I don't know what to do to "grow" the zfs dataset, or to add a new one to claim the unused space.

Any ideas what to do next?
0
 
LVL 19

Expert Comment

by:xterm
ID: 39729479
I guess first things first, if you add a new dataset, does it show the correct amount of free space available?  This way we can at least guarantee that the new space is accessible to FreeNAS.
0
 
LVL 31

Author Comment

by:Frosty555
ID: 39735091
Huh... nevermind it actually is working now. All of my datasets grew by about 500GB.

I turned off all of the quotas and reservation settings for all of the datasets, and now it looks like this:

datasets
So I think this is fully representing all 4TB now. TBH I don't know what changed between now and the picture I posted earlier, except maybe rebooting the server.
0
 
LVL 19

Expert Comment

by:xterm
ID: 39735579
awesome!  Glad to hear it :)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question