LINUX做伺服器的無盤系統

2021-08-31 05:09:22 字數 2685 閱讀 9507

客戶端是支援pxe方式啟動的刀片,用linux作為伺服器,伺服器配置如下:

1) 安裝dhcp伺服器dhcpd

2) 配置/etc/dhcpd.conf檔案,下面是我機器上的檔案

max-lease-time -1;

default-lease-time -1; #注:ip位址永不過期

option subnet-mask 255.0.0.0;

option routers 10.0.0.1;

option domain-name-servers 10.10.10.10;

# option netbios-name-servers 10.10.10.10;

option broadcast-address 10.255.255.255;

# option dhcp-class-identifier "xeclient";

# option vendor-encapsulated-options 01:04:00:00:00:00:ff;

# option option-135 "start";

subnet 10.0.0.0 netmask 255.0.0.0

host blade02

host blade03

host blade04

host blade05

}  工具包裡邊的pxelinux來作為遠端啟動的loder.

3) 配置tftp server

通過xinetd來使用tftp服務,我的/etc/xinetd.conf檔案如下

......

service tftp

4) 配置pxelinux

將pxelinux.0拷貝到/tftpboot/目錄下,然後建立/tftpboot/syslinux.cfg/目錄。該目錄下存放配置檔案。

pxelinux使用ip位址的十六進製制表示來作為該ip位址的配置檔案的檔名。如blade01的

default linux

label linux

kernel vmlinuz

5) 配置nfs

為每個刀片建立乙個根目錄,在該刀片的pxelinux配置檔案裡指定了從這個nfs export的目錄啟動。

該根目錄裡應把標準的目錄都建好,另外需要重新mount的usr, home, public等目錄也要export。

我的 /etc/exports檔案:

# /etc/exports: the access control list for filesystems which may be exported

# to nfs clients. see exports(5).

/remote/blade01 blade01(rw,async,no_root_squash)

/remote/blade02 blade02(rw,async,no_root_squash)

/remote/blade03 blade03(rw,async,no_root_squash)

/remote/blade04 blade04(rw,async,no_root_squash)

/remote/blade05 blade05(rw,async,no_root_squash)

/remote/root *(rw,async,no_root_squash)

/remote/home *(rw,async,no_root_squash)

/usr *(ro,async,no_root_squash)

/sbin *(ro,async,no_root_squash)

/bin *(ro,async,no_root_squash)

/lib *(ro,async,no_root_squash)

/home *(ro,async,no_root_squash)

6)為每個刀片修改它的/etc/fstab檔案,以blade01為例,它的nfs root是/remote/blade01

/remote/blade01/etc/fstab檔案如下:

# /etc/fstab: static file system information.##

10.10.11.120:/remote/blade01 / nfs defaults,intr 0 1

10.10.11.120:/remote/root /root nfs defaults,intr 0 1

10.10.11.120:/remote/home /home nfs defaults,intr 0 1

10.10.11.120:/bin /bin nfs defaults,intr 0 1

10.10.11.120:/usr /usr nfs defaults,intr 0 1

10.10.11.120:/sbin /sbin nfs defaults,intr 0 1

10.10.11.120:/lib /lib nfs defaults,intr 0 1

none /proc proc defaults,intr 0 1

同時還要為每個刀片修改它的網路配置檔案,配置ip位址,啟動兩塊網絡卡等等。。

7) 編譯核心

刀片用的核心,應該支援kernel level auto configuration的dhcp協議,支援nfs,支援nfs root,

假設編譯好的核心為vmlinuz,將它拷貝到/tftpboot/目錄下。

Linux 無盤伺服器 簡明架設指南

假設有一台伺服器裝有 debian gnu linux。有兩塊網絡卡 網絡卡 eth0 對外 ip 10.0.2.15 netmask 255.255.255.0 gateway 10.0.2.2 網絡卡 eth1 對內 ip 192.168.1.1 netmask 255.255.255.0 網路...

Linux 雲伺服器系統掛載資料盤

linux 系統掛載資料盤 適用系統 redhat centos linux的雲主機資料盤未做分割槽和格式化,可以根據以下步驟進行分割槽以及格式化操作。下面的操作將會把資料盤劃分為乙個分割槽來使用。1 檢視資料盤 在沒有分割槽和格式化資料盤之前,使用 df h 命令,是無法看到資料盤的,可以使用 f...

Soliware SSD在無盤伺服器中的應用

網咖,教育系統,ktv點歌系統都在大量使用無盤伺服器,因為無盤伺服器減少了維護成本和確保了系統工作效率,但無盤伺服器中工作站的機器執行速度,和本身伺服器的維護成本一直是沒有乙個很好的解決方案,雖然各種無盤軟體系統做了很好的優化,但隨著檔案系統的資料量加大,再好的優化也很難解決機器本身的i o處理速度...