最后活跃于 1705433121

Resize VM disk

Jarno Rankinen 修订了这个 Gist 1654669343. 跳至此修订

1 file changed, 1 insertion, 1 deletion

guest_disk_resize.md

@@ -18,6 +18,6 @@
18 18 - `pvresize <PV>`, e.g. `pvresize /dev/sda2`
19 19 3. Resize the logical volume:
20 20 - List logical volumes with `lvs`
21 - - To grow and resize the filesyste,:
21 + - To grow and resize the filesystem:
22 22 `lvresize -r -l+100%FREE /dev/xxx/yyyy`
23 23

Jarno Rankinen 修订了这个 Gist 1654669321. 跳至此修订

1 file changed, 1 insertion, 1 deletion

guest_disk_resize.md

@@ -19,5 +19,5 @@
19 19 3. Resize the logical volume:
20 20 - List logical volumes with `lvs`
21 21 - To grow and resize the filesyste,:
22 - `lvresize -r -l+100 /dev/xxx/yyyy`
22 + `lvresize -r -l+100%FREE /dev/xxx/yyyy`
23 23

Jarno Rankinen 修订了这个 Gist 1654669301. 跳至此修订

1 file changed, 1 insertion, 1 deletion

guest_disk_resize.md

@@ -19,5 +19,5 @@
19 19 3. Resize the logical volume:
20 20 - List logical volumes with `lvs`
21 21 - To grow and resize the filesyste,:
22 - `lvresize -l+100`/dev/xxx/yyyy`
22 + `lvresize -r -l+100 /dev/xxx/yyyy`
23 23

Jarno Rankinen 修订了这个 Gist 1654669268. 跳至此修订

1 file changed, 0 insertions, 0 deletions

README.md 重命名为 guest_disk_resize.md

File renamed without changes

Jarno Rankinen 修订了这个 Gist 1654669248. 跳至此修订

1 file changed, 1 insertion

README.md

@@ -11,6 +11,7 @@
11 11 - list partitions with `p`, make note of the start sector
12 12 - delete the partition to grow
13 13 - create new partition, make sure to use same start sector
14 + - Use the same partition type signature
14 15 - write partition table
15 16 2. Resize the physical volume:
16 17 - List physical volumes with `pvs`

Jarno Rankinen 修订了这个 Gist 1654669188. 跳至此修订

1 file changed, 2 insertions, 2 deletions

README.md

@@ -2,8 +2,8 @@
2 2
3 3 1. Resize the virtual disk image
4 4 - On Proxmox: `qm resize <vmid> <disk id> <new size>`
5 - e.g. `qm resize 132 scsi0 100G` will set the disk image size to 100G
6 - On modern Linux guests (kernel >3.14) no need to reboot the guest
5 + - e.g. `qm resize 132 scsi0 100G` will set the disk image size to 100G
6 + - On modern Linux guests (kernel >3.6) no need to reboot the guest
7 7 3. Steps inside the guest
8 8 - for LVM:
9 9 1. Grow the partition:

Jarno Rankinen 修订了这个 Gist 1654669125. 跳至此修订

1 file changed, 22 insertions

README.md(file created)

@@ -0,0 +1,22 @@
1 + ### How to resize a guest VM disk
2 +
3 + 1. Resize the virtual disk image
4 + - On Proxmox: `qm resize <vmid> <disk id> <new size>`
5 + e.g. `qm resize 132 scsi0 100G` will set the disk image size to 100G
6 + On modern Linux guests (kernel >3.14) no need to reboot the guest
7 + 3. Steps inside the guest
8 + - for LVM:
9 + 1. Grow the partition:
10 + - fdisk <device>
11 + - list partitions with `p`, make note of the start sector
12 + - delete the partition to grow
13 + - create new partition, make sure to use same start sector
14 + - write partition table
15 + 2. Resize the physical volume:
16 + - List physical volumes with `pvs`
17 + - `pvresize <PV>`, e.g. `pvresize /dev/sda2`
18 + 3. Resize the logical volume:
19 + - List logical volumes with `lvs`
20 + - To grow and resize the filesyste,:
21 + `lvresize -l+100`/dev/xxx/yyyy`
22 +
更新 更早