fai-setup running potentially disastrous command?

Ryan Steele ryans at aweber.com
Thu Sep 25 21:21:12 CEST 2008


Hey list,

I was in the middle of testing an FAI install today, and had to re-run 
'fai-setup -v'.  However, I noticed that it was taking a long, long time 
to delete the old nfsroot, and noticed something extremely alarming.  
The nfsroot is located at '/srv/fai/nfsroot', as defined in 
make-fai-nfsroot.conf:

NFSROOT=/srv/fai/nfsroot

And, the mount point for the mirror is defined as /media/mirror in fai.conf:

MNTPOINT=/media/mirror

However, I noticed that this appears to be relative to 
/srv/fai/nfsroot/live/filesystem.dir:

root at faimaster:~# mount | grep nfsroot
remotenfshost:/path/to/repo on 
/srv/fai/nfsroot/live/filesystem.dir/media/mirror type nfs 
(rw,remount,noatime,rsize=8192,addr=10.x.x.x)

When running 'fai-setup -v', it detected that there was an existing 
nfsroot, and it went to delete that, but disturbingly, it did so with 
the following command:

root     27858  0.7  0.1   2952   660 pts/0    S+   18:48   0:04 rm -rf 
/srv/fai/nfsroot/.??* /srv/fai/nfsroot/live

Correct me if I'm wrong, but doesn't this mean that the mirror located 
at /srv/fai/nfsroot/live/filesystem.dir/media/mirror is going to be 
blown away if it was mounted rw, as seen above?  I happened to catch 
this, but I'm not sure all what was lost yet.  This was using FAI 
3.2.8.  I really, really hope I'm mistaken here, and am glad to be told 
that I am, but am now afraid to do any further testing until I can 
figure out what happened here.

Thanks


More information about the linux-fai mailing list