From: Gordan B. <go...@bo...> - 2007-10-12 09:11:15
|
On Fri, 12 Oct 2007, Gordan Bobic wrote: > On Fri, 12 Oct 2007, Marc Grimme wrote: > >>>> So I'll explain it without. >>>> It's basically quite easy: >>>> 1. For every node: spare one partition for the chroot (let's say it >>>> is /dev/sda4) and let it be at least 500M. >>>> 2. For every node: mkfs.ext3 /dev/sda4 >>>> 3. Add to the com_info section for every node the following: >>>> <chrootenv mountpoint="/var/comoonics/chroot" fstype="ext3" >>>> device="/dev/sda4" chrootdir="/var/comoonics/chroot"/> >>>> 4. Make a new initrd >>>> 5. reboot every node >>>> That's it no everything should be running on your local disk instead of >>>> tmpfs. >>> >>> OK - how does this work, then? Does it copy the initrd to the disk at >>> boot time? Or does the mkinitrd build the init root straight on that >>> partition? Or does something else happen? What does >>> /etc/sysconfig/comoonics-chroot do, then? I thought it had some part to >>> play in this. >> >> So first the initrd is loaded into RAM. This we cannot change. Then the >> localdisk is setup (linuxrc.generic.sh lines 279-288). Just thinking about this - would it not be better to explicitly re-create this file system (thus blowing away whatever was there beforehand) ever time the init root is put there? My reasoning is that something could pollute this fs in the meantime, or it could be not unmounted cleanly or similar. There is no need for journalling on this, as it is created from the ramdisk every time. So instead run mkfs.ext2 on it every time before it gets used. Any thoughts on this? Granted, this could be a tad dangerous, as accidentally changing the configuration would mean a wrong file system gets blown away - which is possibly a bit _too_ dangerous. Gordan |