Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Simulating a failed disk

Featured Replies

I would like to see how Unraid would react to a failed disk, in practice, not just in theory. BUT I want to make sure I do it in non-disruptive way. UnRaid is a VM in an ESXi 5.0 host, with an IBM BR10i passthru.

 

The easiest way I can think of is, shut down the VM, shutdown the physical host, remove one of the drives, and power everything back up and see what happens. Is that too risky?

 

I have backups, offsite - which I have already tested ... but I need to know what the UnRaid behavior would be like, so that I am properly prepared for a failed disk.

 

Any thoughts?

You can do it without disconnecting anything if you like.    The "md" driver has a way to fake/force a disk to have a "write" error the next time it is accessed.

 

The command is

/root/mdcmd  wrerror  N

where N= 0 (for parity), 1 for disk1, 2 for disk2, etc.

 

The next write to that disk should then fail and should force the disk as disabled (same as if a real "write" to it failed for some reason),

and then you can go about dealing with it for practice.

 

Another way, stop the array, un-assign a drive, and then re-start the array... again it will be simulated as "missing"

Then you can stop the array once more, re-assign it, and see it re-constructed from parity and the other disks.

 

A third way... just unplug a data or power cable (if your disk controller hardware is hot-plug compatible)

 

Joe L.

You can do it without disconnecting anything if you like.    The "md" driver has a way to fake/force a disk to have a "write" error the next time it is accessed.

 

The command is

/root/mdcmd  wrerror  N

where N= 0 (for parity), 1 for disk1, 2 for disk2, etc.

 

The next write to that disk should then fail and should force the disk as disabled (same as if a real "write" to it failed for some reason),

 

I've always just unplugged the disk, but it's nice to know you can do it this way.

 

Question for Joe:  If you use this command, is that going to force a rebuild?  Or will it just update the disk with the missed write?    If you unplug a disk, you can then access the array with no problem (no need to write to the disk), and when you plug it back in all is well (with no rebuild).    Just curious if this works the same way.    And do you need to issue any additional Linux command to make everything "well", or is the "wrerror" automatically reset after the first "fake" error?

 

  • Author

You can do it without disconnecting anything if you like.    The "md" driver has a way to fake/force a disk to have a "write" error the next time it is accessed.

 

The command is

/root/mdcmd  wrerror  N

where N= 0 (for parity), 1 for disk1, 2 for disk2, etc.

 

The next write to that disk should then fail and should force the disk as disabled (same as if a real "write" to it failed for some reason),

and then you can go about dealing with it for practice.

 

Another way, stop the array, un-assign a drive, and then re-start the array... again it will be simulated as "missing"

Then you can stop the array once more, re-assign it, and see it re-constructed from parity and the other disks.

 

A third way... just unplug a data or power cable (if your disk controller hardware is hot-plug compatible)

 

Joe L.

 

thanks - i like that second option..i think my disk controller and my drive cage (Norco ss-400) are both hot-plug compatible; however, i'd read something about drives getting fried during a hotplug, so my simulation could go very real very quickly.

 

moving around VMs at some point crashplan went bonkers, and is pretty much resyncing my data ... once that is 100% complete, I am going to try this.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.