On Wednesday June 28, [EMAIL PROTECTED] wrote:
> Hello,
> 
> I'm facing this problem:
> 
> when my Linux box detects a POWER FAIL event from the UPS, it 
> starts a normal shutdown. Just before the normal kernel poweroff, 
> it sends to the UPS a signal on the serial line which says 
> "cut-off the power to the server and switch-off the UPS".
> 
> This is required to reboot the server as soon as the power is 
> restored.
> 
> The problem is that the root partition is on top of a RAID-1 
> filesystem which is still mounted when the program that kills the 
> power is run, so the system goes down with a non clean RAID 
> volume.
> 
> What can be the proper action to do before killing the power to 
> ensure that RAID will remain clean? It seems that remounting 
> the partition read-only is not sufficient.

Are you running a 2.4 kernel or a 2.6 kernel?

With 2.4, you cannot do what you want to do.

With 2.6, 
   killall -9 md0_raid1

should do the trick (assuming root is on /dev/md0.  If it is elsewhere,
choose a different process name).
After you "kill -9" the raid thread, the array will be marked clean
immediately all writes complete, and marked dirty again before
allowing another write.

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

Reply via email to