Re: How to automatically add a nbd to a raid1?
Peter Breuer <[email protected]> Fri, 19 Dec 2008 01:14:56 +0100 (CET)
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
"Also sprach ptb:" > So I don't see there's anything wrong with your approach. Nevertheless, > I feel bad about something .. it seems to me that there ought to be one > lockout file for pwprog per enbd device, not one lockout file full stop. > But I don't know why I feel that. Perhaps it'll come to me .. tomorrow > I have to be on a train. It seems to me that you are basically looking for a mechanism to stop pwprog acting in opposition to an orderly shutdown procedure. It's not a bad idea to have a control file .. but it feels clumsy. On the plus side it is a control mechanism that can be used in all circumstances. On the minus side, the intended use is very init-sequence specific, so why go the file route? One could simply shut md down before shutting enbd down. Then there would be no interference from mdadm/pwprog when enbd shutdown goes on its killing spree... not so? I would have alternatively suggested for consideration (not terribly seriously) that pwprog suicide when runlevel is going to 0 or 6! It can ask /sbin/runlevel. Or it can examine the init links directly to figure out if enbd is going up or down in this runlevel transition, in general. Another thing .. one can specify dependencies in init scripts. Dunno how exactly. But stating that md needs to go down before enbd would do it. Something like .. # Provides: enbd # Required-Start: $network # X-Start-Before: mdadm # X-Stop-After: mdadm # X-Stop-Before: $network # Should-Stop: $network That's debian! insserv. Peter