setup_harddisk and softupdate

Janning Vygen vygen at planwerk6.de
Fri Dec 8 23:44:18 CET 2006


Hi,

i am using FAI for a few servers only by calling softupdate as the servers are 
pre-installed already and i have no control over the boot sequence.

I have two disks, one is used and formatted for the pre-installed system, the 
second disk is unused.

Now i wrote a hook softupdate.CLASS to run setup_harddisk, which just calls

     /usr/lib/fai/sbin/setup_harddisks -X

My disk_config looks like this:

disk_config sdb
primary  /media/sdb1    50000-  ; -c -j ext3 lazyformat
primary  /media/sdb2    50000-  ; -c -j ext3 lazyformat
primary  /media/sdb3    50000-  ; -c -j ext3 lazyformat

I dropped disk_config sda as this disk should not be touched at all.

Fine. But i am a little bit solicitous about my data. I would like to run the 
hook only the first time softupdate is called. But as i am runing softupdate 
i can't tell if it was called the first time on this server or a secondtime. 

Or is there any truly reliable method to decide if softupdate run before and 
therefore we won't call /usr/lib/fai/sbin/setup_harddisks?

Maybe i can check 
   -f /var/log/fai/FAI_CLASSES

Do you have any hints? What can go wrong? I don't want to loose my data. I 
want to be sure that my harddisk won't be formatted if it is already in use.

kind regards
janning




More information about the linux-fai mailing list