Show Table of Contents
23.4. Kickstart 配置的範例
23.4.1. 進階磁碟分割範例
以下為顯示了
clearpart、zerombr、raid、part、volgroup 與 logvol 這些 Kickstart 選項運作時的單一、整合範例:
範例 23.6. 進階磁碟分割範例
clearpart --drives=hda,hdczerombr# Raid 1 IDE configpart raid.11 --size 1000 --asprimary --ondrive=hdapart raid.12 --size 1000 --asprimary --ondrive=hdapart raid.13 --size 2000 --asprimary --ondrive=hdapart raid.14 --size 8000 --ondrive=hdapart raid.15 --size 16384 --grow --ondrive=hdapart raid.21 --size 1000 --asprimary --ondrive=hdcpart raid.22 --size 1000 --asprimary --ondrive=hdcpart raid.23 --size 2000 --asprimary --ondrive=hdcpart raid.24 --size 8000 --ondrive=hdcpart raid.25 --size 16384 --grow --ondrive=hdc# You can add --spares=xraid / --fstype xfs --device root --level=RAID1 raid.11 raid.21raid /safe --fstype xfs --device safe --level=RAID1 raid.12 raid.22raid swap --fstype swap --device swap --level=RAID1 raid.13 raid.23raid /usr --fstype xfs --device usr --level=RAID1 raid.14 raid.24raid pv.01 --fstype xfs --device pv.01 --level=RAID1 raid.15 raid.25# LVM configuration so that we can resize /var and /usr/local latervolgroup sysvg pv.01logvol /var --vgname=sysvg --size=8000 --name=varlogvol /var/freespace --vgname=sysvg --size=8000 --name=freespacetouselogvol /usr/local --vgname=sysvg --size=1 --grow --name=usrlocal
此進階範例在 RAID 上實做了 LVM,以及調整各個目錄大小以供日後需求的功能。
首先,
clearpart 指令會清除 hda 與 hdc 兩個磁碟。zerombr 指令會對未使用的分割表進行初始化。
接下來,這兩個磁碟會被建立分割區,準備進行 RAID 配置。每個磁碟都會被切割為五個分割區,每個磁碟的配置都一樣。
接下來的部分會使用一對對的實體分割區建立軟體 RAID 裝置,採行的方法是 RAID1(鏡射)。前四個 RAID 裝置會給
/(root)、/safe、swap 與 /usr 使用。第五個,也是最大的一對分割區,名為 pv.01,會被用在以下部分,作為 LVM 的實體卷冊。
最後一組指令會在
pv.01 的實體卷冊上,先建立名為 sysvg 的卷冊群組。然後會建立三個邏輯卷冊(/var、/var/freespace、以及 /usr/local),並將這三個卷冊加入 sysvg 卷冊群組中。/var 與 /var/freespace 卷冊的大小會被設定為 8 GB,且 /usr/local 卷冊會使用 --grow 選項使用剩下的空間。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.