# Controller FAILURE with ZFS, what if?



## nu (Nov 5, 2010)

Hi,
I've some doubts about controller failure and ZFS on /

My configuration is:

FreeBSD 8.1-RELEASE amd64 / ZFS / raidz2 on 6 hdd's


```
mfi0 Adapter:
    Product Name: RAID 5/6 SAS based on LSI MegaRAID
   Serial Number:
        Firmware: 11.0.1-0015
     RAID Levels: JBOD, RAID0, RAID1, RAID5, RAID6, RAID10, RAID50
  Battery Backup: not present
           NVRAM: 32K
  Onboard Memory: 512M
  Minimum Stripe: 8K
  Maximum Stripe: 1M

mfi0 Volumes:
  Id     Size    Level   Stripe  State   Cache   Name
 mfid0 (  232G) RAID-0      64K OPTIMAL Disabled
 mfid1 (  232G) RAID-0      64K OPTIMAL Disabled
 mfid2 (  232G) RAID-0      64K OPTIMAL Disabled
 mfid3 (  232G) RAID-0      64K OPTIMAL Disabled
 mfid4 (  232G) RAID-0      64K OPTIMAL Disabled
 mfid5 (  232G) RAID-0      64K OPTIMAL Disabled
```
Scenario:

Controller is dead.
Shutdown.
Switching cables to spare controller.
Power on.

What will happen next?
Will I have to configure new controller and set hdd's to single disk arrays or controller will get info from (?) and there is no need for configuration.

Thanks in advance!


----------



## phoenix (Nov 5, 2010)

If you replace the controller with the same model controller, everything will "Just Work".

If you have configured the controller as JBOD, you can replace it with any other JBOD controller, and everything will "Just Work".

If you have configured the controller using single-disk RAID0 arrays, or "Single Disk" arrays, then you will need to replace the controller with the same (or a compatible) model controller.  These are technically RAID arrays, and the controller has put its own metadata onto the drives, so you need a similar model RAID controller to read the metadata and setup the arrays before ZFS can access it.

You may need to boot to single-user mode, run `# /etc/rc.d/hostid` and then try to export the pool.  And then import the pool.  That will force ZFS to re-read its metadata on each of the drives and re-assemble the vdevs and the pool.

You might, if the export/import process doesn't work, need to force the import:
`# zpool import -f <poolname>`


----------

