Michael Tautschnig <m...@debian.org> wrote: Hi,
> If done from within setup-storage, would it be as simple as to write all the > parted commands to a separate file (as well)? If so, wouldn't it be best to Nope, not that simple :) I want one script per physical device, and the script must include any command that might be needed to recreate the partition table, filesystems and (I don't need that at the moment) LVM volumes. mdadm commands aren't needed in this context. But that script must come out identical regardless of preserved partitions during installation (that requires some effort). > really just print all the commands to be executed *such that this command > script > ends up in the logs*? To me, logs sound like a good place for keeping this > kind > of backup-information. If it really is just about logging the commands, the The goal is to have scripts in /tmp/fai that I can copy to /root or somewhere else that is safe (RAID1) *on the machine* so the sysadmins can just pull the failed drive, instert the new one, run the script, rebuild the RAID. I have no guarantee the install logs will be available 4 years after the deployment when disks will fail :) > question is whether all commands should be logged, or just a specific subset. > If > the latter is the case, we could extend the setup-storage code that is used to > create commands to take a flag to enable or disable logging of the specific > command. It needs a bit more than that, as there are some mods needed so that preserving a partition still emits the necessary parted command in the script. So you need at least 2 flags: log command and execute command. JB. -- Julien BLACHE - Debian & GNU/Linux Developer - <jbla...@debian.org> Public key available on <http://www.jblache.org> - KeyID: F5D6 5169 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169