530 reputation
39
bio website
location Hamburg, Germany
age 34
visits member for 4 years, 9 months
seen Jul 22 at 16:09

Jun
1
awarded  Notable Question
Mar
28
awarded  Nice Question
Jan
29
awarded  Popular Question
Oct
12
comment Best way to execute a command after Linux system halt
@SimonRichter the IPMI LAN Port is on a separate network, yes. But you can access your local card from the local machine without IP.
Oct
10
comment Best way to execute a command after Linux system halt
This works too and I would have done it that way if Fuzzyfelt hadn't come up with his single user mode solution which I feel is a little more elegant since it doesn't depend on the clock and the shutdown to finish in n-minutes. However using /sys/class/rtc/rtc0/wakealarm I was able to have the machine turn back on after the shutdown. Nice solution!
Oct
10
accepted Best way to execute a command after Linux system halt
Oct
10
comment Best way to execute a command after Linux system halt
Very straight forward and it solves the problem brilliantly! I implemented the updating and power cycling as a rc script that runs one time when single user mode is entered, since init sends SIGTERM and 5s later SIGKILL to all processes in it's process group upon changing runlevel. Also had to restart the ipmi driver to have /dev/ipmi0 on which ipmitool operates. Overall this works great!
Oct
10
revised Best way to execute a command after Linux system halt
fixed typo
Oct
10
awarded  Commentator
Oct
10
comment Best way to execute a command after Linux system halt
@MichaelHampton Using the DRAC card to execute a command on the system? No, what I meant was using the linux system to execute a command after system halt (to power cycle via the DRAC).
Oct
10
comment Best way to execute a command after Linux system halt
Another idea I had was to use GRUB's once-only option. I'd just like to avoid this because, like with the PXE boot, it would mean going through the BIOS's RAM test four times instead of two. With 256GB RAM in the servers that makes a difference of almost 20 minutes of downtime (a full reboot takes 11 minutes of which a little over 9 go to the bios mem test).
Oct
10
comment Best way to execute a command after Linux system halt
That was another idea I had. However I'm trying to keep the whole process contained to the machine that I'm updating. If I'm involving other machines (e.g. telling the PXE server to provide me with a different boot image on next reboot) I might use mcollective (which we got in place anyways) to tell a management machine to execute the power cycle on me once I'm unreachable (i.e. system halt completes). It's definitely an option if I don't find a way to do it local.
Oct
10
comment Best way to execute a command after Linux system halt
The SSDs that I'm updating are part of a zpool mirror. Half of the mirror is talken offline for the update. After the power cycle the firmware upgrade process waits for the pool to be resilvered, then takes the other half offline, updates and power cycles again. Since the FS the SSDs use is ZFS and the OS itself resides on an ext4 HDD I was already contemplating just calling 'sync' and then cycling the power since nothing should break. But I'm still interested if there's a proper way to execute a command after system halt.
Oct
10
asked Best way to execute a command after Linux system halt
Jun
15
awarded  Yearling
Feb
9
awarded  Scholar
Feb
9
accepted What is the meaning of an equal sign = or == at the end of a SSH public key?
Feb
9
awarded  Student
Feb
9
asked What is the meaning of an equal sign = or == at the end of a SSH public key?
Mar
8
awarded  Yearling