From: Erik de B. - L. <Erik@LowVoice.nl> - 2003-06-17 09:59:19
|
James McMechan wrote: > I do not understand why you would not want to use "cad", it is intended > for similar uses and is already implemented in UML adding the power fail > signal could just be a copy of the current "cad" code it just sends init > a different signal PWRFAIL I think, but why is the current "cad" handler > the least worse option? I just wanted something that doesn't need to be setup by the user. I'd prefer PWRFAIL over CAD because the CAD needs more setting up. Your comments are fair though, It does seem the right method (through init) to invoke a shutdown from the host. The sysrq options seem a great addition to the cad feature, in case it fails. I think I'll implement those in a script. I'm thinking of preceding the failsafe mconsole halt with sysrq s; sysrq u; sysrq l (sync, umount root_fs, kill all). I'd like to make a script that shows what it does and tries and logs it. It should shut down as cleanly as possible in a pretty short time. What sysrq options do you suggest, before killing/halting it hard? And what would you guys do after a failing cad (with halt set, not reboot)? Best regards, Erik de Bruijn Ps. James McMechan, thanks for the clear explanation. It's more useful than a concrete one-sentence 'answer'. ----- Original Message ----- From: "James W McMechan" <mcm...@ju...> To: <Erik@LowVoice.nl> Cc: <use...@li...> Sent: Tuesday, June 17, 2003 5:19 AM Subject: Re: [uml-user] Clean shutdown of UML > I often setup "cad" to halt "shutdown -h 0" instead of a reboot this can > be done from uml_mconsole > It also helps to always set umid= so that you don't have to hunt up the > id. > > This does not require a working network or console connection as it uses > the mconsole administration interface if you can do "uml_mconsole X > halt", then "uml_mconsole X cad" should change the UML's init state, this > does not always work (even halt sometimes fails) but most times when the > system is still partly working it will shutdown. > > I am more willing to use halt when I am experimenting, as I usually have > a disposable COW file which I just delete afterwards getting rid all the > corruptions. > > I don't quite understand what the umlrun stuff is doing, and why it is > leaving a process running. > > The "cad" stuff also works on real machines and can be used over serial > consoles (with break) it makes it easy to shutdown many UMLs under host > control, if you can't connect to the host shutting down the UML is not > your main problem. > > If "cad" is not what you want there is a slight chance that the sysrq > stuff might be, but it may require a UML kernel recompile to make sure it > is turned on and it may also require that the /proc file be set to enable > it. "uml_mconsole X sysrq-s" or something similar should sync the UML's > disks. > > I do not understand why you would not want to use "cad", it is intended > for similar uses and is already implemented in UML adding the power fail > signal could just be a copy of the current "cad" code it just sends init > a different signal PWRFAIL I think, but why is the current "cad" handler > the least worse option? > > The start/stop/halt commands behave like hardware controls > starting/stopping the processor clock and turning off the power, the > "cad" and "sysrq" functions are used to send controls to /sbin/init or > the kernel just like on a real system but via uml_mconsole since they can > not be sent from the host (it interprets them), the next layer up would > be to login via screen/xterm/ssh and issue commands, this is how real > systems also deal with the same problem. "powerfail" and "cad" both > operate through /sbin/init so I don't see much difference. > > ________________________________________________________________ > The best thing to hit the internet in years - Juno SpeedBand! > Surf the web up to FIVE TIMES FASTER! > Only $14.95/ month - visit www.juno.com to sign up today! > > > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU Hosting Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > |