NCHC Opensource task force Steven Shiau steven@nchc.gov.tw National Center for High-Performance Computing Sep 10, 2002 1
Outline 1. 2. 3. Service DHCP, TFTP, NFS, NIS 4. 5. 2
DRBL (diskless remote boot in Linux) etherboot + nfs + nis 1. PC (client machine) 2. server client server server DRBL 3
( ) 3. Server server client LTSP (Linux terminal server project) server server DRBL server LTSP server server 4
DRBL server NIC 1 NIC 2 NIC 3 NIC 4 switch 1 switch 2...... node001 node020 node021 node040 5
: CPU 450MHz 256 MB fast ethernet ( ) 20GBytes. : CPU 300 Mhz 128 MB fast ethernet bootrom : fast ethernet switch, port client machine 40 client machines 2 24 ports switch 6
server client node001... client node040 DHCP IP etherboot 192.168.0.1 etherboot 192.168.0.40 TFTP kernel boot boot NFS file system /, /usr, /home... /, /usr, /home... NIS account user login user login 7
Service DHCP, TFTP, NFS, NIS 1.DHCP server (Dynamic Host Configuration Protocol Server) - For distributing IP for every client - /etc/dhcpd.conf looks like: default-lease-time 21600; max-lease-time 21600; use-host-decl-names on; option subnet-mask 255.255.255.0; subnet 192.168.0.0 netmask 255.255.255.0 { option broadcast-address 192.168.0.255; option routers 192.168.0.254; option domain-name-servers 192.168.0.254; host node001 { hardware ethernet 00:50:BA:65:C0:58; fixed-address 192.168.0.1; filename "vmlinuz.etherboot.viarhine"; }... } 8
Service( ) 2. TFTP server (Trivial File Transfer Protocol server) - For distributing kernel - /etc/xinetd.d/tftp looks like: service tftp { } socket_type protocol wait user server server_args disable per_source = 11 cps = 100 2 = dgram = udp = yes = root = /usr/sbin/in.tftpd = -s /tftpboot = no 9
Service( ) 3. NFS server (Network File Sharing protocol server) - For mounting file system - /etc/exports looks like: /tftpboot/node001 192.168.0.1(rw,no_root_squash) /usr 192.168.0.1(ro,no_root_squash) /opt 192.168.0.1(ro,no_root_squash) /home 192.168.0.1(rw,no_root_squash) /tftpboot/node002 192.168.0.2(rw,no_root_squash) /usr 192.168.0.2(ro,no_root_squash) /opt 192.168.0.2(ro,no_root_squash) /home 192.168.0.2(rw,no_root_squash)... 10
Service( ) 4. NIS server (Network Information Service server) - For account authentization - /var/yp/securenets looks like: # allow connections from local host -- necessary host 127.0.0.1 # same as 255.255.255.255 127.0.0.1 # # allow connections from any host # on the 192.168.0.0 network 255.255.255.0 192.168.0.0... 11
http://opensource.nchc.gov.tw/diskless 1. server service dhcp server tftp server nfs server nis server (ypserv) 2. client machine remote boot kernel kernel etherboot bzimage mknbi-linux Tag 12
( ) 3. server client /tftpboot ( node001 ),, dev, etc, lib, bin, sbin /tftpboot/node001 server NFS client,, client client /dev devfs, /tmp tmpfs server node ip redhat 7.3 client server 40MB 4.NCHC shell script client 13
Server 8 6 *:? Server: CPU 1 GHz, 1GB Ram, 1 gigabits NIC? Client: CPU 333 MHz, 128 MB Ram, 1 fast ethernet NIC? 2 fast ethernet switchs with 1 giga port connected to server Server CPU Utilization Without devfs & tmpfs? peak ~ 34%, average ~9.35% Server Disk I/O Utilization? read peak ~ 9MB/s, write peak ~ 5.8MB/sec,? read average ~ 61KB/s, write average ~ 430KB/sec Server Network Utilization? peak ~ 25MB/s, average ~ 9MB/sec, * 14
? http://opensource.nchc.gov.tw/diskless? http://www.study-area.org/? http://etherboot.sourceforge.org/? http://www.rom-o-matic.net/? http://www.ltsp.org/? Diskless HOWTO? Diskless-nfs-root HOWTO? Diskless-nfs-root-other HOWTO? NIS HOWTO 15