mfiutil / foreign drives

Tim Gustafson tjg at
Fri Dec 19 17:53:53 UTC 2014

I have a server with a 16-disk RAID controller.  I have all the disks
configured as RAID0 devices and then they are used to form a ZFS pool.

One of my disks failed recently, and I swapped it out with a
replacement.  After that, mfiutil is showing the following:

root at server: mfiutil -u 1 show drives
mfi1 Physical Drives:
17 (   0.0) ONLINE                      <WDC WD1000FYPS-0 1B01
serial=WD-WCASJ0721765> SATA E1:S0
18 (   0.0) ONLINE                      <WDC WD1000FYPS-0 1B01
serial=WD-WCASJ1612496> SATA E1:S1
serial=WD-WCASJ0723513> SATA E1:S4
21 (   0.0) ONLINE                      <WDC WD1000FYPS-0 1B02
serial=WD-WCASJ2351494> SATA E1:S2
22 (   0.0) ONLINE                      <WDC WD1000FYPS-0 1B01
serial=WD-WCASJ1612777> SATA E1:S3
23 (   0.0) ONLINE                      <WDC WD1000FYPS-0 1B02
serial=WD-WCASJ2351459> SATA E1:S6
24 (   0.0) ONLINE                      <WDC WD1002FBYS-0 0C06
serial=WD-WMATV1490351> SATA E1:S7

When I try to do anything with the "foreign" drive, mfiutil reports:

root at server: mfiutil -u 1 create raid0 E1:S4
mfiutil: Drive 19 is foreign

I've tried to clear the foreign drive like this:

root at server: mfiutil -u 1 foreign clear
Are you sure you wish to clear ALL foreign configurations on mfi1? [y/N] y
mfiutil: Command failed: Invalid parameter
mfiutil: Failed to clear foreign configuration: Input/output error

I even zero'd out the disk, like this:

root at server: mfiutil -u 1 drive clear e1:s4 start

That ran for several hours, but did not fix the "foreign" state of the drive.

I even took the drive back out of the server, ran "dd if=/dev/zero
of=/dev/whatever bs=1M count=1024" to overwrite the disk's partition
table (and then some), and even that did not help.

I installed the MegaCli port and was equally unsuccessful in fixing
the problems.

I've replaced drives in this server a dozen times over the years, and
when it was a FreeBSD 9 box, it never once complained about foreign
disks, despite the fact that this server has received a lot of
hand-me-down disks over the years.  This is the first disk I've had to
replace since moving to FreeBSD 10, so I'm thinking that something
changes between 9 and 10 to create this problem.

Has anyone got any clues they can give me about how to get this disk
configured to be a RAID-0 volume so that I can put it into the zpool?


Tim Gustafson
tjg at
Baskin Engineering, Room 313A

More information about the freebsd-questions mailing list