Solved

Upgrade disk in FreeNAS 2TB -> 4TB

Posted on 2013-11-26
9
3,457 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
Comment Utility
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
Comment Utility
Are you booting freenas from this disk or from USB stick?
0
 
LVL 21

Expert Comment

by:Mazdajai
Comment Utility
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
 
LVL 31

Author Comment

by:Frosty555
Comment Utility
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
Google Storage: Standard vs. Nearline vs. Coldline

Google Cloud Storage has a number of classes to choose from. Although there are a lot in common, they vary in price and usage terms. This post explains Google Cloud Storage classes and helps to understand which  one to choose.

 
LVL 19

Expert Comment

by:xterm
Comment Utility
Good luck!  Let us know....
0
 
LVL 31

Author Comment

by:Frosty555
Comment Utility
(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
Comment Utility
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
Comment Utility
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
Comment Utility
awesome!  Glad to hear it :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now