resize ubuntu root

https://www.proxmox.com/en/
回覆文章
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

resize ubuntu root

文章 yehlu »

PVE
先在 PVE 關機後變更磁碟空間

代碼: 選擇全部

qm resize 121 scsi0 +192G
開機進linux做

代碼: 選擇全部

root@u1804:/home/yehlu# parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) resizepart
Warning: Not all of the space available to /dev/sda appears to be used, you can
fix the GPT to use all of the space (an extra 167772160 blocks) or continue with
the current setting?
Fix/Ignore? Fix
Partition number? 2
Warning: Partition /dev/sda2 is being used. Are you sure you want to continue?
Yes/No? Yes
End?  [85.9GB]? 160G

代碼: 選擇全部

resize2fs /dev/sda2
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Re: resize ubuntu root

文章 yehlu »

不需要關機

直接在硬體,調整磁碟大小,增加容量即可。
附加檔案
截圖 2021-12-14 上午9.22.14.png
截圖 2021-12-14 上午9.22.14.png (13.86 KiB) 已瀏覽 1311 次
截圖 2021-12-14 上午9.21.57.png
截圖 2021-12-14 上午9.21.57.png (63.36 KiB) 已瀏覽 1311 次
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Re: resize ubuntu root

文章 yehlu »

root@41198:/home/yehlu# parted
GNU Parted 3.3
使用 /dev/sda
歡迎使用 GNU Parted!輸入 'help' 來檢視指令列表。
(parted) resizepart
分割區編號? 2
警告: 正在使用分割區 /dev/sda2。您確定要繼續嗎?
是/Yes/否/No? Yes
終點? [34.4GB]? 96G
回覆文章

回到「Proxmox VE」