Solved

Upgrade disk in FreeNAS 2TB -> 4TB

Posted on 2013-11-26
9
3,621 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
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…

808 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