Linux寶塔數據盤自動掛載

服務器相關問題

Linux寶塔數據盤自動掛載

2023-10-26 17:36







服務器需要掛載數據盤,否則只會顯示20G或者40G的系統分區,掛載數據盤教程:

注意:如果已經安裝過寶塔數據盤有數據,清空數據需要先執行格式化命令

mkfs.ext4 /dev/vdb1

執行命令後才能進行掛載,執行格式化會清空數據盤數據,請謹慎執行

根據您服務器安裝的作業系統,選擇執行以下數據盤掛載命令

centos系統:

yum install wget -y && wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

Ubuntu系統:

wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && sudo bash auto_disk.sh

debian系統:

wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

掛載完成後,重啓一次服務器,重啟後服務器能正常打開,說明掛載沒有問題。