Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

I want to 'replace' a 1TB disk with a 500GB disk (only 17% in use)

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

diskdiddler

Dedicated Sage
Joined
Jul 9, 2014
Messages
2,169
Subject covers it.
I tried to simply 'replace' it in a hope to basically drive clone / swap, but I can't as the member disk is too small. (that's fair, my fault)


I realise most people don't use single disks (I don't for my important stuff) but for this, I just want to use a single disk.
I want to replace a disk, with the same pool / volume names, so how can I do this best?
 
Last edited:

diskdiddler

Dedicated Sage
Joined
Jul 9, 2014
Messages
2,169
This is the disk.
 

c77dk

Member
Joined
Nov 27, 2019
Messages
102
I think your best bet is to setup the new disk in a fresh pool and send/receive the data from current SSD pool to the new. If you'll be able to rename the new pool later I don't know for sure - but I would guess it's possible.
 

sretalla

Dedicated Sage
Joined
Jan 1, 2016
Messages
2,898
The steps here work and apply to a smaller disk even though it mentions a larger one as the target.

 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,844
Renaming is possible after you copied your data to the new pool. Stop all sharing services, jails and/or VMs first.

1. export pool <oldname> from UI
2. zpool import <oldname> <newname>
3. zpool export <newname>
4. import pool <newname> from UI
 
Last edited:

sretalla

Dedicated Sage
Joined
Jan 1, 2016
Messages
2,898
Although I would put step 0a as stop sharing services and jails/VMs first, 0b as zfs send | zfs recv, then step 5 as restart sharing and jails/VMs.
 

diskdiddler

Dedicated Sage
Joined
Jul 9, 2014
Messages
2,169
Update, so this has worked out to be a terrible thing which has me filing a UI suggestions bug report on "Why the system should be more clear, about where the system dataset is, when deleting a pool"


So I just setup a new drive, migrated iocage to it (dead easy) then used zfs send / recv for the download folder (then adjusted my SMB share for download to point elsewhere - stop / start smb service)

IT ALL WENT SWIMMINGLY

So swimmingly, I said screw it and upon detaching the device, I ticked boxes to delete stuff off the old drive (again, see the pic above for the contents of it)
The SSD, contained my system dataset - this is my own fault, but the warnings stating "OH HEY this one is SYSTEM!" were non existent.


So I digress...... what now? I am terrified to reboot the thing, already backed up the config. SMB died - got a shout from the wife in the lounge but it does seem back up now.
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,844
Calm down. The system dataset is not the boot device. It is just the system's scratch area for logfiles and $stuff ...

Go to System --> System Dataset, make sure it is on the new pool, reboot.
 

diskdiddler

Dedicated Sage
Joined
Jul 9, 2014
Messages
2,169
So would I have lost anything at all?
I've migrated it over to an SSD but .... it was a owrrying thing to see

My question is ultimately, if you detach a disk in FreeNAS, containing System - and it kills services on that disk, is it smart enough to cleanly terminate, relocate, re-enable the services?
 

diskdiddler

Dedicated Sage
Joined
Jul 9, 2014
Messages
2,169
I should have listened to my gut instincts.

It's been a few days, I've rebooted - web interface is 'gone' and no VMs are booting, no SMB shares visible.......
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,844
Can you ping the system? What's on the console?
 

diskdiddler

Dedicated Sage
Joined
Jul 9, 2014
Messages
2,169
I don't think I can face the embarassment of admitting just how terribly simple this was, suffice to say, having a motherboard with a total of 5 ethernet jacks when you only need 2, is difficult at times...
 

JaimieV

Neophyte Sage
Joined
Oct 12, 2012
Messages
699
Doesn't always help. I've got seven on mine, and I know exactly which are plugged in. Bemusingly one of the builtin 1gig ports can get DHCP but not pass packets, so I'm getting similar results to yours at the moment. I think my machine is haunted (see my 'replication failing' thread next door).

/Edit: As noted in that thread, I had moved a cable from one port on 10.0.0.0/24 to another with DHCP to the same network; routing does NOT switch automatically. ifconfig oldport down then up allows the new port to take up routing.
 
Last edited:
Top