View previous topic :: View next topic |
Author |
Message |
KoichiSenada n00b

Joined: 05 Jul 2012 Posts: 12
|
Posted: Tue Jul 10, 2012 5:02 am Post subject: Complicated mounting scheme for network booted clients |
|
|
I have some rather complicated mounting scheme for network booted clients.
Clients boot with DHCP/PXE/NFS/OpenRC and use the universal network server hosted image generated by genkernel.
It uses nfs for /root and /var/www mounting points.
It uses tmpfs for /tmp and /run mounting points.
It uses ext3 partitions labeled as home for /home mounting point.
The /etc/fstab does it as follows.
Code: | none / none ro 0 0
none /mnt tmpfs nodev,nosuid 0 0
none /media tmpfs nodev,nosuid 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
192.168.1.1:/netboot/gentoo3 / nfs ro,intr,rsize=8192,wsize=8192 0 0
tmpfs /tmp tmpfs defaults,nosuid,noatime 0 0
tmpfs /run tmpfs defaults,nosuid,noatime 0 0
192.168.1.1:/var/www /var/www nfs rw,nolock 0 0
/dev/disk/by-label/home /home ext3 rw,nodiratime,noatime 0 0
|
And also we have there a custom mounting script in the sysinit runlevel for sys-fs/aufs3 to mix it all with tmpfs for /var and /root mounting points.
Code: | #!/sbin/runscript
description="Configure system for netboot"
depend()
{
before udev
}
start() {
einfo "netboot-mount start"
mount -l
mount -nt tmpfs -o rw none /ramdisk && einfo "mount tmpfs ramdisk" || eerror "mount tmpfs ramdisk failed"
for i in etc var root; do
mkdir /ramdisk/$i
mount -nt aufs -o dirs=/ramdisk/$i=rw:/$i=rr aufs /$i
done
}
|
But there is a problem that clients boot without the /var/www and so we have to mount it manually each time by a special command.
Code: | mount 192.168.1.1:/var/www /var/www -o nolock |
So I have a number of troubles and questions because of that.
Hopefully, someone can assist me.
1. What prevents the scheme from mounting it all by itself and how to fix it?
2. Why is there only a short output lines log in the /var/log/rc.log about the mounting and how to view the complete mounting log?
3. What happens first, parsing the /etc/fstab file or running the sysinit runlevel scripts?
4. Would that be possible to simplify the mounting scheme above and keep it just in the /etc/fstab file without the mouting script for aufs?
5. Whether does Gentoo mount the partitions twice or just once at the boot time and how to analyze it? |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55195 Location: 56N 3W
|
Posted: Tue Jul 10, 2012 6:44 pm Post subject: |
|
|
KoichiSenada,
sys-init scripts run before anything else.
/etc/fstab is parsed by the localmount script
I am sure the Gentoo only mounts filesystems once as I messed up an initrd and accidently had things mounting twice.
You will notice the warnings.
What do you have in /etc/fstab as don't see your /var/www getting mounted anywhere. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
KoichiSenada n00b

Joined: 05 Jul 2012 Posts: 12
|
Posted: Wed Jul 11, 2012 6:26 am Post subject: |
|
|
NeddySeagoon wrote: | KoichiSenada,
sys-init scripts run before anything else.
/etc/fstab is parsed by the localmount script
I am sure the Gentoo only mounts filesystems once as I messed up an initrd and accidently had things mounting twice.
You will notice the warnings.
What do you have in /etc/fstab as don't see your /var/www getting mounted anywhere. |
NeddySeagon, actually I have listed whole the content of both /etc/fstab and the mounting script above, there is nothing else inside.
And I believe I have some filesystems mounted twice or remounted or even dismounted.
But where would I notice the warnings and read the logs or at the very least pause the boot process?
Would it be possible for me to place the mounting script directives into the /etc/fstab file to make things easier and do whole the mounting in one script?
I have seen a /etc/fstab file with aufs filesystems mounted and I am wondering if I can do the same for my scheme.
Sample: Netboot setup with hybrid (ro/rw) root filesystem |
|
Back to top |
|
 |
KoichiSenada n00b

Joined: 05 Jul 2012 Posts: 12
|
Posted: Mon Jul 16, 2012 12:30 pm Post subject: |
|
|
How can I pause the boot process to view the console output, at least? |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|