Solved

Upgrade disk in FreeNAS 2TB -> 4TB

Posted on 2013-11-26
9
3,670 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

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.
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

713 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