DRBL 操作指南

作者:TeliuTe 来源:基础教程网

五、服务器备份 返回目录 下一课

 设置好DRBL后,可以把一些文件备份一下;

 1、配置文件

 1)\etc\drbl 文件夹,这个文件夹里面存放用 drblpush -i 生成的客户机的相关信息;

 drbl_deploy.conf 存放 drblpush 时回答的各个选项

config_file="drblpush.conf"
purge_client="yes"
client_root_passwd=""
client_pxelinux_passwd=""
language="zh_CN.UTF-8"
set_client_system_select="yes"
use_graphic_pxelinux_menu="yes"
set_DBN_client_audio_plugdev="yes"
open_thin_client_option="no"
client_system_boot_timeout="70"
collect_mac=yes
total_client_no=1
nfs_protocol="tcp"
client_init="graphic"
mkswapfile="mkswapfile"
ocs_img_repo_dir="/home/partimag"
nfsserver_default=""
nameserver="127.0.0.1"
nameserver_="127.0.0.1"
domain="218.202.152.130"
nisdomain="teliute"
public_ip_list="public_ip.drbl"
login_gdm_opt="auto_login"
client_autologin_passwd="st"
timed_login_time=""
run_drbl_ocs_live_prep="yes"
drbl_ocs_live_server=""
clonezilla_mode="clonezilla_box_mode"
live_client_branch="alternative"
live_client_cpu_mode="generic"
drbl_mode="drbl_ssi_mode"
sh_debug=""
verbose_opt=""
CLIENT_IP_HOSTNAME_LIST="IP_HOST_TABLE"
drbl_server_as_NAT_server="no"
add_start_drbl_services_after_cfg="yes"
continue_with_one_port="y"

 2)drblpush.conf 存放客户机的登录信息;

#Setup for general
[general]
domain=218.202.152.130
nisdomain=teliute
localswapfile=yes
client_init=graphic
login_gdm_opt=auto_login
timed_login_time=
maxswapsize=128
ocs_img_repo_dir=/home/partimag
total_client_no=1
create_account=
account_passwd_length=8
hostname=st-
purge_client=yes
client_autologin_passwd=st
client_root_passwd=
client_pxelinux_passwd=
set_client_system_select=yes
use_graphic_pxelinux_menu=yes
set_DBN_client_audio_plugdev=yes
open_thin_client_option=no
client_system_boot_timeout=70
language=zh_CN.UTF-8
set_client_public_ip_opt=no
config_file=drblpush.conf
collect_mac=yes
run_drbl_ocs_live_prep=yes
drbl_ocs_live_server=
clonezilla_mode=clonezilla_box_mode
live_client_branch=alternative
live_client_cpu_mode=generic
drbl_mode=drbl_ssi_mode
drbl_server_as_NAT_server=no
add_start_drbl_services_after_cfg=yes
continue_with_one_port=y

#Setup for eth1
[eth1]
interface=eth1
mac=macadr-eth1.txt
ip_start=2
gateway=192.168.1.100

 

 3)IP_HOST_TABLE 存放客户机分配的IP地址和机器名称;

# Created by DRBL (drblpush), begin
192.168.1.2 st-102
192.168.1.3 st-103
# Created by DRBL (drblpush), end

 

 4)macadr-eth0.txt 存放客户机的网卡 MAC 地址;

08:00:27:12:2d:e1
08:00:27:c5:aa:0e

 

 5)\etc\dhcp 文件夹,里面存放 drblpush -i 生成的 DHCP 配置文件;

 dhcpd.conf 包含客户机的网卡地址和分配的 ip 地址等网络信息

# Generated by DRBL.
# Do NOT modify this file unless you know what you are doing!

default-lease-time 300;
max-lease-time 300;
option subnet-mask 255.255.255.0;
option domain-name-servers 127.0.0.1;
option domain-name "218.202.152.130";
ddns-update-style none;
server-name drbl;

filename = "pxelinux.0";
# gpxelinux.0 features: HTTP, DNS, TFTP, iSCSI, AoE, bzImage ELF, Multiboot, PXE, PXEXT. Ref: http://ols.fedoraproject.org/OLS/Reprints-2008/anvin-reprint.pdf
# filename = "gpxelinux.0";

## Uncomment the following "if block" when you have some buggy PXE NIC card (such as annoying sis900 NIC). Remember to modify the MAC vendor prefix and restart dhcpd service!!!
## This is a workround for some network card with BAD PXE code in firmware.
## It will only affect those clients with MAC vendor prefix you assigned.
## Ref: http://syslinux.zytor.com/archives/2005-August/005640.html

#if substring (option vendor-class-identifier, 0, 3) = "PXE" {
# # **************************************************************
# # ***MODIFY*** the MAC vendor prefix of client network card here.
# # **************************************************************
# # For annoying sis900 network card, maybe it is 00:07:95, 00:0C:6E...
# if substring (hardware, 1, 3) = 00:0C:6E {
# # sis900.zpxe is specially for sis900 NIC, you can download it from
# # http://rom-o-matic.net/etherboot/etherboot-5.4.4/contrib/rom-o-matic
# filename = "sis900.zpxe";
# }
#}

# Uncomment the following to get the debug/verbose messages in system log. The messages like the following will be shown:
# Client 0:c:29:3b:34:fb requests 1:2:3:5:6:b:c:d:f:10:11:12:2b:36:3c:43:80:81:82:83:84:85:86:87 - PXEClient:Arch:00000:UNDI:002001 - no dhcp-client-id
# Client 0:c:29:3b:34:fb requests 1:3:6:c:f:1c:28:29:2a - DRBLClient - no dhcp-client-id
# Begin of log command
#log(info, concat("Client ",
# binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
# " requests ",
# binary-to-ascii(16, 8, ":", option dhcp-parameter-request-list),
# " - ",
# pick-first-value(option vendor-class-identifier, "no vendor-id"),
# " - ",
# pick-first-value(option dhcp-client-identifier, "no dhcp-client-id"))
# );
# End of log command

# This class 'DRBL-Client' defines 3 kind of clients: PXE, Etherboot (1st stage) or DRBL client (2nd stage, i.e. in network initrd/initramfs (mkpxeinitrd-net)) to lease IP address. This will only affect 'range' statement only, not the 'host' statement.
# Note! The following line(s) in the pool statement: 'allow members of "DRBL-Client";' is/are commented to disable this mechanism by default.
# If you do want to use this mechanism, uncomment all 'allow members of "DRBL-Client";', then only PXE, etherboot and DRBL client can lease IP address from this DHCP service.
# ///NOTE/// In summary, two cases you can turn on this mechanism:
# (1) This DRBL server is not used as a clonezilla server.
# (2) This DRBL server is used as a Clonezilla server, with the following conditions:
# (a) 'range' statement is used in this DRBL service.
# (b) There is an existing DHCP service which can provide IP address leases to the restored OS (either GNU/inux or MS Windows) in the client. Otherwise if you uncomment 'allow members of "DRBL-Client";', restored OS won't be able to lease IP address.

# The DRBL client class: PXE, Etherboot or DRBL client
class "DRBL-Client" {
match if
(substring(option vendor-class-identifier, 0, 9) = "PXEClient") or
(substring(option vendor-class-identifier, 0, 9) = "Etherboot") or
(substring(option vendor-class-identifier, 0, 10) = "DRBLClient") ;
}

# If you want to use special port for DHCP service, edit here:
# For more info, ref: http://drbl.sourceforge.net/faq/index.php#path=./2_System&entry=37_coexist_with_existing_dhcp.faq
# local-port 1067;
# remote-port 1068;

subnet 192.168.1.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 192.168.1.100;
next-server 192.168.1.251;

host st-102 {
hardware ethernet 08:00:27:12:2d:e1;
fixed-address 192.168.1.2;
# option host-name "st-102";
}
host st-103 {
hardware ethernet 08:00:27:c5:aa:0;
fixed-address 192.168.1.3;
# option host-name "st-103";
}
}

 

 本节学习了备份服务器的基础知识,如果你成功地完成了练习,请继续学习下一课内容;

返回目录 下一课

本教程由86团学校TeliuTe制作|著作权所有

基础教程网:http://teliute.org/

美丽的校园……

转载和引用本站内容,请保留作者和本站链接。