Boot mirror failing to rebuild/unable to attach replacement disk

Status
Not open for further replies.

SpicySpice

Cadet
Joined
Feb 24, 2018
Messages
5
Hi all. First let me start by saying while I have over 19 years in the IT industry (namely dealing networking infrastructure), I'm still relatively new to FreeNAS and Linux, so please go easy on me and forgive me if I ask stupid questions or am missing the "obvious".

This is the situation: I have FreeNAS installed on two hard disks in a mirror. Both disks are quite old (160 GB drives) so it's safe to say they weren't in the best condition when they went in (this is a development server so there is nothing critical on it, but I would like to iron out any issues before I build a production FreeNAS box). Both drives have started reporting SMART errors (sector reallocation count) so they are on their way out.

I've physically replaced one of the boot drives with an identical spare (same size, firmware, model etc...) but it probably has pre-existing data and partitions on it. However when I attempt to "attach" it to the mirror, I get the following error:

Code:
[MiddlewareError: [EFAULT] 'gpart create -s gpt -f active /dev/ada1' failed:
gpart: geom 'ada1': Operation not permitted
]


I get similar "Operation not permitted" errors if I try to wipe the drive or basically do anything with it. I also can't detach the "removed" drive from the mirror.

How do I resync/repair the mirror so that it's no longer degraded?
 

SpicySpice

Cadet
Joined
Feb 24, 2018
Messages
5
Just a brief update.

I've managed to detach the removed disk and the boot status now shows a single drive in a "stripe". However nothing I do allows me to add the replacement drive.

I can't even wipe it from the GUI or shell. Even as sudo I get:

Code:
Sorry, user root is not allowed to execute '/bin/dd if=zero of=ada1 bs=1G' as root on [SERVER].
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
/bin/dd if=zero of=ada1 bs=1G
This command has several problems. zero is not a device, nor is ada1, they are just plain files. Devices are in /dev. Also, a block size of 1G is not going to help, and could cause swapping.

dd if=/dev/zero of=/dev/ada1 bs=1m

That, left to run for as long as it takes, will overwrite the disk. But it isn't really any different than the Wipe Disk function in the GUI. Problems here are sometimes caused by old metadata still on the disk. Most commonly, that is from disks that were used with motherboard "RAID" and not erased before re-use.
 
Status
Not open for further replies.
Top