PowerEdge:自動化 Dell BOSS 作業系統部署 - 適用於不同作業系統的技巧
Summary: 本文提供 Dell Boot Optimized Storage Solution (BOSS) PCIe 介面卡的資訊。此外,還提供將 Windows、Red Hat、SuSE、Ubuntu 及相關 Linux 版本安裝在這些介面卡上的指示。
Instructions
Dell Boot Optimized Storage Solution (BOSS) 裝置是獨立的 PCIe 卡,支援兩個 M.2 固態硬碟,預設為 RAID 1 組態。其設計作為作業系統開機磁碟,可讓所有其他磁碟機作為快取或資料儲存裝置使用。這是一種簡單的方法,可確保主要磁碟機托架可以完全用於比開機作業系統更重要的工作。
但是,由於 BOSS 介面卡受正常裝置列舉的限制,因此不同的開機裝置可能會在 BIOS 開機順序中顯示為第一個裝置。這可能會在以程式編寫的方式部署作業系統時導致問題。
下列資訊顯示如何標記或識別 Dell BOSS 卡,以確保在其上安裝作業系統。搜尋並使用「易記名稱」 (例如 DELLBOSS VD) 是確保作業系統已安裝至 BOSS 的正確方式。每個作業系統都可透過本文詳述的各種方法找到並使用 BOSS 卡。
全部顯示 | 全部隱藏
在 Linux 作業系統中識別 BOSS 裝置
BOSS 裝置在其型號屬性中包含字串 DELLBOSS。此選項可用來識別,如下範例所示:
# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: DELLBOSS VD Rev: MV.R Type: Direct-Access ANSI SCSI revision: 05 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: Marvell Model: Console Rev: 1.01 Type: Processor ANSI SCSI revision: 05
Linux 型作業系統使用 udev 在以下位置建立符號連結: /dev/disk/by-id/ 可以用來找出 BOSS 裝置,如下所示:
# ls -l /dev/disk/by-id/ total 0 lrwxrwxrwx. 1 root root 9 Jan 13 15:02 ata-DELLBOSS_VD_6668c813b78a0010 -> ../../sda
此屬性可用於自動化安裝指令檔,以偵測是否存在 BOSS 卡,並指示安裝程式使用它進行安裝。
Red Hat Enterprise Linux 和衍生作品 (CentOS、Scientific Linux、Fedora) 互動式安裝
執行互動式安裝時,使用者可將 BOSS 裝置選擇為主要安裝或開機裝置。BOSS 裝置會顯示為 ATA DELLBOSS VD,如下圖所示。選擇 ATA DELLBOSS VD 裝置可確保安裝程式將作業系統檔案放置在 BOSS 裝置上,而其他磁碟機則保持不變。
圖 1:安裝目的地
Red Hat Enterprise Linux 和衍生作品自動安裝
針對自動 (kickstart) 安裝,可使用預先安裝指令檔,以確保安裝程式將作業系統放置於正確的磁碟機上。下列指令檔透過在型號欄位中搜尋含有 DELLBOSS 的裝置,以識別 BOSS 裝置。它會指示安裝程式專門使用該裝置,而忽略其他所有安裝程式可用的儲存裝置。
ks.cfg: %include /tmp/bootdisk.cfg %pre # Use DELLBOSS device for OS install if present. BOSS_DEV=$(find /dev -name "*DELLBOSS*" -printf %P"\n" | \ egrep -v -e part -e scsi| head -1) if [ -n "$BOSS_DEV" ]; then echo ignoredisk --only-use="$BOSS_DEV" > /tmp/bootdisk.cfg fi %end
下面是一個範例 /tmp/bootdisk.cfg 包含安裝程式應使用的 BOSS 裝置的裝置名稱。
# cat /tmp/bootdisk.cfg ignoredisk --only-use=disk/by-id/ata-DELLBOSS_VD_6668c813b78a0010
SUSE 和衍生產品互動式安裝
SUSE 型作業系統的互動式安裝不會列出裝置標籤,只會列出其裝置名稱。因此,用戶必須切換到文本控制台才能獲取 BOSS 設備的設備名稱。
圖 2:建議的分區。
在 建議的磁碟分割 畫面中,選擇 引導式安裝。
圖 3:硬碟選擇
按下 Ctrl+Alt+F2 切換至主控台。在命令提示字元中輸入下列命令,以顯示應該用於安裝的 BOSS 裝置的 SCSI 裝置名稱。
chvt 7 命令退出主控台:
# lsscsi| grep DELLBOSS # chvt 7
圖 4: lsscsi 輸出
在 「選取硬碟 」畫面中,從 lsscsi 上述命令輸出,確保未選取所有其他裝置。
繼續安裝。這可確保將作業系統安裝在 BOSS 裝置上。
SUSE 和衍生作品自動安裝
- 若要進行自動安裝,可新增下列內容至
autoyast.xml:
##Sample pre-script section in the autoyast file to extract the device name for BOSS device. <pre-scripts config:type="list"> <script> <feedback config:type="boolean">true</feedback> <debug config:type="boolean">false</debug> <filename>pre.sh</filename> <interpreter>shell</interpreter> <source><![CDATA[ # Use DELLBOSS device for OS install if present. DEV=$(find /dev -name "*DELLBOSS*" | egrep -v -e part -e scsi| head -1) if [ -n "$DEV" ]; then BOSS_DEV=$(basename $(readlink $DEV)) sed -e "s/@ROOT_DEVICE@/$BOSS_DEV/" /tmp/profile/autoinst.xml >/tmp/profile/modified.xml cp /tmp/profile/modified.xml /tmp/profile/autoinst.xml fi ]]> </source> </script> </pre-scripts> ###Sample autoyast partitioning section with ROOT device variable that needs to be replaced by the BOSS device found in the pre-script section above. <partitioning config:type="list"> <drive> <device>/dev/@ROOT_DEVICE@</device> <disklabel>gpt</disklabel> <enable_snapshots config:type="boolean">true</enable_snapshots> <initialize config:type="boolean">true</initialize> <partitions config:type="list"> <partition> <create config:type="boolean">true</create> <crypt_fs config:type="boolean">false</crypt_fs> <filesystem config:type="symbol">vfat</filesystem> <format config:type="boolean">true</format> <fstopt>umask=0002,utf8=true</fstopt> <loop_fs config:type="boolean">false</loop_fs> <mount>/boot/efi</mount> <mountby config:type="symbol">uuid</mountby> <partition_id config:type="integer">259</partition_id> <partition_nr config:type="integer">1</partition_nr> <resize config:type="boolean">false</resize> <size>155352576</size> </partition> </partitions> </drive> </partitioning>
Ubuntu 互動式安裝
圖 5:磁碟分割區方法
圖 6:磁碟分割區
Ubuntu 自動安裝
ks.cfg: %include /tmp/bootdisk.cfg %pre # Use DELLBOSS device for OS install if present. BOSS_DEV=$(readlink -f $(find /dev -name "*DELLBOSS*" | \ egrep -v -e part -e scsi| head -1)) if [ -n "$BOSS_DEV" ]; then echo ignoredisk --only-use="$BOSS_DEV" > /tmp/bootdisk.cfg fi %end
VMware ESXi 互動式安裝
圖 7:ESXi 安裝程式
VMware ESXi 自動安裝
ESXi 略有不同,安裝程式可以偵測 BOSS 磁碟機,因此啟動指令檔只有一行。
install --overwritevmfs --firstdisk="DELLBOSS VD"
Microsoft Windows 互動式安裝
在擁有多個磁碟機的伺服器中,確定將作業系統安裝至 BOSS 卡可能較為困難。在此範例中,BOSS 卡是磁碟 6,但並不會立即顯示在「磁碟管理」中。(注意:在此擷取畫面中,已完整安裝作業系統。)BOSS 卡並未識別在最高層級,但可透過以滑鼠右鍵按一下磁碟 6 並選取屬性來識別。
圖 8:磁碟管理
圖 9:Dell BOSS 內容檢視
此外,使用 WinPE 的標準 Windows 安裝程式也帶來了一些挑戰。預設無法在 WinPE 中使用 PowerShell (雖然可以新增),而且只有特定工具可用來識別 BOSS 卡。標準安裝畫面中沒有 BOSS 卡的識別符,如下圖所示。
瞭解 BOSS 卡的大小對於安裝至介面卡很實用。若要確定,請使用 Shift-F10 在 WinPE 中叫出命令提示字元視窗。
在下列螢幕擷取畫面中,無法明確地將磁碟 6 識別為 BOSS 卡。此範例有六個磁碟機,但有些伺服器還有更多磁碟機。
圖 10:Windows 磁碟選取
圖 11: Windows 磁碟選取
圖 12:Windows 磁碟選取
命令行介面可提供一種解決方案。若要開啟命令提示字元,請在安裝 Windows 時隨時在 WinPE 按下 Shift-F10。
1.DiskPart:DiskPart 唯一的問題是在執行 詳細磁碟之前必須選取磁碟,如下所示。您需要猜測該選取哪一個磁碟。同樣地,瞭解 BOSS M.2 裝置的大小也相當重要。選取正確的磁碟機會出現 DELLBOSS VD:
圖 13: Diskpart
2.使用 PowerShell 有多種方式可識別 BOSS 卡。但是,PowerShell 預設在 WinPE 中不可用,因此除非已添加或已完全安裝作業系統,否則它沒有用處。
圖 14:PowerShell 不適用於 WinPE
3。Windows Management Instrumentation 命令行介面 (WMIC) 可協助我們正確地選擇 Dell BOSS 裝置。可在完整作業系統和 WinPE 中使用 WMIC。
使用下列命令識別 BOSS 卡:
WMIC Diskdrive get model, name

圖 15:WMIC 輸出
您可以使用 WMIC,將硬碟位置與名稱 DELLBOSS VD 相連結。(參閱上方的 PHYSICALDRIVE6。)
Microsoft Windows 自動安裝
使用上述任一方法 (DiskPart 或 WMIC) 知道實體位置後,便可在指令檔中使用下列內容:
Diskpart SELECT DISK=<disk location path> command to select each drive.
例如:
SELECT DISK=PCIROOT(0)#PCI(0100)#ATA(C00T00L00)
在以上伺服器範例中,命令會是:
SELECT DISK=PCIROOT(3A)#PCI(0000)#PCI(0000)#ATA(C00T00L00)
以下是格式化磁碟的簡單範例。
建立文字檔 (diskpart.txt),使用如上所示的路徑:
SELECT DISK=PCIROOT(3A)#PCI(0000)#PCI(0000)#ATA(C00T00L00) CLEAN CREATE PART PRI SELECT PART 1 ACTIVE ASSIGN FORMAT FS=NTFS QUICK EXIT
建立作業系統安裝指令檔或批次檔案,並新增下行:
DISKPART /s diskpart.txt
替代方法:使用 PowerShell、WMI 和登錄檔識別 BOSS 卡。
PowerShell
在 Windows 中,PowerShell 可使用 Get-Disk 或 Get-PhysicalDisk 命令,如下所示。此範例顯示 BOSS 卡並非一律列舉為磁碟 0。此處顯示為磁碟 12:
圖 16:Powershell Get-Disk 輸出

圖 17:Powershell Get-PhysicalDisk 輸出
圖 18:Powershell Get-PhysicalDisk 濾波輸出
WMI 階層
這遠非最直接的方法,但您可以使用 WbemTest 工具,以透過遍曆 WMI 階層來識別 BOSS 卡。
- 輸入以啟動工具
wbemtest在命令提示符下。 - 連線至
root\cimv2命名空間。 - 按一下 Enum Classes,選取 Recursive,然後按一下確定以開啟類別清單。
- 按兩下
Win32_DiskDrive,然後單擊 實例以列出系統中的所有驅動器 - 按兩下每個列出的裝置,然後檢查其 Caption 屬性。
圖 19: WBEMTEST 應用程式畫面
Powershell
Get-WmiObject Cmdlet 提供了一種更簡單的方式來顯示相同的資訊:
圖 20:Powershell Get-WmiObject 輸出
登錄檔路徑
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\Scsi\Scsi Port #\Scsi Bus #\Target Id #\Logical Unit Id #\Identifier
圖 21:Windows 登錄
用於頻外識別和安裝的 RACADM 命令
Dell 支援會建立包含 racadm 和其他必要工具的即時 ISO 映像。客戶可以使用此 ISO 開機至 Linux,並執行 racadm 工作。請按 一下這裡 瞭解更多資訊。
以下是使用 RACADM 命令部署至 BOSS 之指令檔中的一些片段:
# Identify
##Get the list of all AHCI controllers and grab the BOSS controller.
racadm storage get controllers | grep -i ahci > /tmp/all_ctrls.txt
for ctrl in `cat /tmp/all_ctrls.txt`;do if [[ `racadm storage get controllers:$ctrl -p Name | grep -i boss` ]];then boss_ctrl=$ctrl;fi;done
# Configure RAID
##BOSS SSD drives are of form factor M.2. Capture the m.2 for factor physical disks
racadm storage get pdisks > /tmp/all_disks.txt
racadm storage get pdisks:$disk -p FormFactor | grep -i 'm.2'
##Create a VD (raid 1) on the two BOSS PDs
racadm storage createvd:$boss_ctrl -rl r1 -name boss_ssd -pdkey:${boss_disks[0]},${boss_disks[1]}
# Change boot order in bios to boot from.
racadm set BIOS.BootSettings.HddSeq <AHCI controller> && /opt/dell/srvadmin/sbin/racadm set BIOS.BootSettings.HddFailover Enabled
參考資料
Dell PowerEdge 開機最佳化儲存解決方案 - BOSS
Kickstart 命令 Ignoredisk
Windows 硬碟和分割區