Pool offline after replacing disk

Paengaroa

Dabbler
Joined
May 3, 2021
Messages
47
Disks
 

Attachments

  • Capture.PNG
    Capture.PNG
    10.1 KB · Views: 161

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, very good.

So we're going to start by partitioning the disk ready for use as a pool member:
gpart create -s gpt /dev/ada0 (working under the assumption it's currently not partitioned at all... you may need to do gpart destroy -F /dev/ada0 first if it's not blank)

Then we create the swap and data partitions:
gpart add -s 2G -t freebsd-swap /dev/ada0

gpart add -t freebsd-zfs /dev/ada0
 

Paengaroa

Dabbler
Joined
May 3, 2021
Messages
47
OK, very good.

So we're going to start by partitioning the disk ready for use as a pool member:
gpart create -s gpt /dev/ada0 (working under the assumption it's currently not partitioned at all... you may need to do gpart destroy -F /dev/ada0 first if it's not blank)

Then we create the swap and data partitions:
gpart add -s 2G -t freebsd-swap /dev/ada0

gpart add -t freebsd-zfs /dev/ada0
Ok, done,
 

Attachments

  • Capture.PNG
    Capture.PNG
    13.3 KB · Views: 166

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, so now we'll get the gptid of that partition with glabel status | grep ada0
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, note down (copy paste to notepad or something) the gptid for ada0p2, we'll use that a little later.

Now we should import the pool.

Let's try first with a normal import (zpool import VOL-1)

I'm expecting this to result in an indication that we'll need to use -f to go ahead, but want to check that first.
 

Paengaroa

Dabbler
Joined
May 3, 2021
Messages
47
Ok, it's still thinking.
Issue is I can't copy for some reason,.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Issue is I can't copy for some reason
You'll need to type it out manually then... not fun.

You could enable the SSH service and then use Putty (assuming you use Windows) which will get you in a terminal window that can copy/paste.
 

Paengaroa

Dabbler
Joined
May 3, 2021
Messages
47
You'll need to type it out manually then... not fun.

You could enable the SSH service and then use Putty (assuming you use Windows) which will get you in a terminal window that can copy/paste.
Ok, I'll go manual for now just to be safe.
Is this expected to take a while? It's not broken?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Is this expected to take a while? It's not broken?
the zpool import should take no more than a minute... with a missing member disk in the pool, perhaps it's doing some extra checks, but that shouldn't mean waiting for a long time.

We can give it a few more minutes, then I think a reboot is the next step if it remains stuck.
 

Paengaroa

Dabbler
Joined
May 3, 2021
Messages
47
the zpool import should take no more than a minute... with a missing member disk in the pool, perhaps it's doing some extra checks, but that shouldn't mean waiting for a long time.

We can give it a few more minutes, then I think a reboot is the next step if it remains stuck.
Ok ,it says it cannon import VOL-1, one or more devices are unavailable
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, so the next step is to do it again but with the force switch:
zpool import -f VOL-1
 

Paengaroa

Dabbler
Joined
May 3, 2021
Messages
47

Attachments

  • Capture.PNG
    Capture.PNG
    18 KB · Views: 162

Paengaroa

Dabbler
Joined
May 3, 2021
Messages
47
Code:
root@freenas:~ # zpool import -f VOL-1
cannot import 'VOL-1': one or more devices is currently unavailable
root@freenas:~ #
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, so we'll try the last resort...

zpool import -F VOL-1
 

Paengaroa

Dabbler
Joined
May 3, 2021
Messages
47
OK, so we'll try the last resort...

zpool import -F VOL-1
Ok the Pool VOL-1 is online but degraded. Mirror 1 which is supposed to have drives ADA2 and ADA0 is showing only ADA2.
Progress!
 

Paengaroa

Dabbler
Joined
May 3, 2021
Messages
47
Should I just replace the unidentified disk with ADA0?
 

Attachments

  • Capture3PNG.PNG
    Capture3PNG.PNG
    39.7 KB · Views: 145
  • Capture2.PNG
    Capture2.PNG
    32.1 KB · Views: 158

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Top