Put harddrives in standby mode to prevent raid rebuilds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After getting a raid-1 setup going (hda, hdc), I was dismayed that the raid
kept rebuilding each member after a reboot or shutdown.  It's as though the
Shuttle system would power off prematurely before md had a chance to flush
it's data.

So, looking at the Fedora shutdown script /etc/rc.d/init.d/halt, I noticed I
could put halt parameters in there.  Looking at the man page for halt:

# man halt
....
      -h     Put all harddrives on the system in  standby  mode  just
before halt or poweroff.
....

So, I added a -h to the halt arguments and the system now flushes the md
data just before poweroff or reboot.  No more raid rebuilds so I'm happy.

The side effect is that the drives quickly spin down, spin up, flush data,
go into standby, then power off.  Reminds of Han Solo's Millenium Falcon
trying to fire up.  Anyway, this workaround may help some people.

-Eric Wood

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux