replacing hdd with a bigger one

Status
Not open for further replies.

ChaosUK

Dabbler
Joined
Sep 3, 2016
Messages
32
Hello everybody
so a while ago i decided to try freenas. I had an old Dell Optiplex 780 so i decided to give it a try.
It had just one 80gb HDD but it was enough for me to test it. I've installed everything without a problem and I've been using it for a while now.
I like quite a lot. Especially built in PLEX and torrent client. But now my HDD is nearly full so I would like to upgrade my HDD to 1TB. I bought a 1TB WD red and put it in.

so here is the question
can I somehow mirror everything to 1TB hdd and then remove the 80gb one so I can put another 1TB there in the near future?

sorry for my english. its not my first language
Best regards Pete
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
...and in addition to the excellent resources @Mirfster provided, the manual explains exactly how to do what you're looking for.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
@ChaosUK I walked the same road with different equipment (in my case a Dell 2950) until I got where I want to be.
The folks above have always excellent points, so read the documentation.
Of course one's budget is not always at a point where you can get to your final destiny quick enough, but google'ing your box came with specs that are quite modest, especially the max RAM. Also using a "pool" of one drive will not keep you from loosing data when that drive fails - and it will eventually.
Good luck!
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
so here is the question
can I somehow mirror everything to 1TB hdd and then remove the 80gb one so I can put another 1TB there in the near future?
Best regards Pete

You have some good advice above, please take the time to learn more about hardware recommendations and do as much as you can. Those recommendations are there to help keep you from experiencing a catastrophic loss of data.

As to your question, you are absolutely on the right track. You can add a larger disk to a mirror and FreeNAS will replicate all the data from the original disk to the new disk. Once all the data is copied over, you have to check the status from the command line, then you can detach (at the command line) the disk you want to remove. Then you shutdown, physically remove the smaller disk and boot back up. It is a fairly simple and painless process, if you do it right. Do it wrong and all of your data disappears.

It might be a good idea to have a backup, always.
 

ChaosUK

Dabbler
Joined
Sep 3, 2016
Messages
32
thx for all the advice... i did took time to read about freenas and i do realize that my Core 2 Duo 8600 with 8gb of ram is not a perfect machine to run a nas.
What I forgot to mention that it is not running 24/7 and its used mostly to learn.
I finaly got new hard drive - 2TB WD RED
before i tested with a 320gb drive but instead of replacing that 80gb one i just added it ;]
so now i just expanded space :/
1.jpg

can i some how get rid of the 80gb drive so all the data is copied to that 320gb one and than replace that 320 with 2tb?
2.jpg

what happens if i press offline ?; ;]
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
can i some how get rid of the 80gb drive so all the data is copied to that 320gb one and than replace that 320 with 2tb?
Not possible. If you'd replaced the 80 GB drive with the 2 TB drive (I gave you the exact link to the manual, where it explains how to do this), it would have done this for you. But if, as you say, you've added the 2 TB drive to the pool already, your only option is to back up your data, destroy the pool, and rebuild it with just the 320 GB and the 2 TB drives.
 

ChaosUK

Dabbler
Joined
Sep 3, 2016
Messages
32
2tb drive is not connected to the nas yet. there is only 80gb and 320gb inside

i want to know if there's a way move all the data to 320gb and remove the 80gb completely from the nas
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Ah, my bad, obviously I mis-read your message. In that case, as long as you have a spare SATA port for the 2 TB drive, it's easy.
  • Shut down the server
  • Install the 2 TB drive (even temporarily--as long as it has power and data connections)
  • Start up FreeNAS
  • Go to Storage -> click your volume -> Volume Status (looks like a sheet of notebook paper) -> click the 80 GB disk -> Replace
  • Select the 2 TB disk from the drop-down, and click Replace Disk
  • If you're running a version older than yesterday's update, you'll probably get an error message about the disk having a partition table or ZFS label; you can just check the box to force the replacement anyway.
  • When FreeNAS finishes syncing the data onto the new disk, it will offline the old one.
  • At that point, shut down the system and remove the 80 GB disk.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
i want to know if there's a way move all the data to 320gb and remove the 80gb completely from the nas
No. There is, however, a way to replace the 80 GB disk with the 2 TB disk, which I described above.

Edit: Wow, my reading comprehension sucks today. Let me try again.

If I understand correctly now, you currently have a pool consisting of two striped disks, one of 80 GB and the other of 320 GB. Your goal is to end up with a pool consisting of a single 2 TB disk, with all the data you have now. Do I finally have it right? If so...

You cannot remove a disk from your current pool. You'd need to make a new pool on the 2 TB disk, move the data from your current pool to the new pool, then remove the old pool. You could then optionally rename the new pool to have the same name as the old pool, so you wouldn't need to mess with your configuration. The best way to move the data, IMO, is using ZFS replication, and in this case I'd probably do it at the CLI rather than via the web GUI. There are some pretty good notes on that here: http://blog.fosketts.net/2016/08/18/migrating-data-zfs-send-receive/.
 
Last edited:

ChaosUK

Dabbler
Joined
Sep 3, 2016
Messages
32
hehe ..
I dont want to replace the 80gb ... i want to get rid of it... so there is only 320gb in the machine... and than i want to replace the 320gb with the 2tbone



or maybe i can replace both drives with the new one?
 
Last edited:

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
There is a command that you can enter from the console, 'zpool detach poolname diskname'.
This will (as the name implies) detach the specified disk from the specified pool. It only works with mirrors.
Here is a link to the reference on it. http://docs.oracle.com/cd/E19253-01/819-5461/6n7ht6qvl/index.html
I have done this before with my boot pool and it does work.
I used this to mirror my boot device from USB to a small spinning disk, then added a third mirror (another spinning disk) then detached the USB drive. I have plenty of SATA ports and you can do better diagnostic checking on the health of disk drives than you can with USB drives. I did this after a USB drive failed without warning. I didn't want that happening again.
What you want to do is actually quite simple and I am sure you can do it without loosing your data as long as you carefully follow the instructions.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

ChaosUK

Dabbler
Joined
Sep 3, 2016
Messages
32
thx for your help guys... i think it might be actually easier if i just make a copy of my files and start everything from the scratch.

I see its to complicated for me. I just thought that i can connect the 2tb drive and mirror all existing data to that drive. then remove the 80 and 320 and stay with one drive without the mirror (and than add another 2tb drive in the future)

I'm good with pc's but I don't have any knowledge about linux etc. my main goal is to completely get rid of my 3.5" drive from my main rig because it takes to much space and just leave 2x240 ssd in it.
IMG_1221.jpg
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Could just create a new pool with the single 2TB disk and copy the data over. This would leave you with no data protection but that is basically what you had before. After you copy the data you can remove the old pool.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
thx for your help guys... i think it might be actually easier if i just make a copy of my files and start everything from the scratch.

I see its to complicated for me. I just thought that i can connect the 2tb drive and mirror all existing data to that drive. then remove the 80 and 320 and stay with one drive without the mirror (and than add another 2tb drive in the future)

I'm good with pc's but I don't have any knowledge about linux etc. my main goal is to completely get rid of my 3.5" drive from my main rig because it takes to much space and just leave 2x240 ssd in it.
View attachment 13885

You can. But not directly.

You install the 2TB drive. Make a pool on it. Then copy the data from the old pool. Then remove the old pool.

There is a nifty way to copy the data called "replication". With one command line you can copy the data very fast.

Edit: Okay. Two. You need to take a snapshot first.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
And finally, leave the 320GB disk in and use it to backup your more important documents.

HDs fail.
 

ChaosUK

Dabbler
Joined
Sep 3, 2016
Messages
32
I'm planning on adding a second drive soon. I also do not keep any important data there which is not backed up somewhere else..
 
Status
Not open for further replies.
Top