diff --git a/_toc.yml b/_toc.yml index 76d51506..ede935a9 100644 --- a/_toc.yml +++ b/_toc.yml @@ -43,6 +43,7 @@ chapters: - file: admin-guide/configuration/services - file: admin-guide/configuration/mount - file: admin-guide/configuration/distribute_files + - file: admin-guide/configuration/resize_vm_disk - file: admin-guide/configuration/vgroot - file: admin-guide/configuration/networking - file: admin-guide/configuration/xrdp diff --git a/admin-guide/configuration/resize_vm_disk.md b/admin-guide/configuration/resize_vm_disk.md new file mode 100644 index 00000000..a33a92de --- /dev/null +++ b/admin-guide/configuration/resize_vm_disk.md @@ -0,0 +1,72 @@ +# Resice VM Disk + +To increase the harddisk of a VM, go to vcenter.psi.ch, select the machine, right click, and select __Edit Settings ...__ + +![](resize_vm_disk/resize_vm_disk_01.png) + +Increase the harddisk size to the value you need to have: + +![](resize_vm_disk/resize_vm_disk_02.png) + + +Now connect to the system and change to root. + +List block devices: +```bash +[root@awi-ci-01 ~]# lsblk +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +sda 8:0 0 42G 0 disk +├─sda1 8:1 0 600M 0 part /boot/efi +├─sda2 8:2 0 1G 0 part /boot +└─sda3 8:3 0 32.4G 0 part + ├─vg_root-lv_root 253:0 0 14G 0 lvm / + ├─vg_root-lv_var_tmp 253:1 0 2G 0 lvm /var/tmp + ├─vg_root-lv_var_log 253:2 0 3G 0 lvm /var/log + ├─vg_root-lv_var 253:3 0 8G 0 lvm /var + ├─vg_root-lv_tmp 253:4 0 2G 0 lvm /tmp + └─vg_root-lv_home 253:5 0 2G 0 lvm /home +``` + +Extend partition: +```bash +[root@awi-ci-01 ~]# parted /dev/sda +GNU Parted 3.2 +Using /dev/sda +Welcome to GNU Parted! Type 'help' to view a list of commands. +(parted) print +Model: VMware Virtual disk (scsi) +Disk /dev/sda: 45.1GB +Sector size (logical/physical): 512B/512B +Partition Table: gpt +Disk Flags: + +Number Start End Size File system Name Flags + 1 1049kB 630MB 629MB fat32 EFI System Partition boot, esp + 2 630MB 1704MB 1074MB ext4 + 3 1704MB 36.5GB 34.8GB lvm + +(parted) resizepart 3 +End? [36.5GB]? -0 +(parted) print +Model: VMware Virtual disk (scsi) +Disk /dev/sda: 45.1GB +Sector size (logical/physical): 512B/512B +Partition Table: gpt +Disk Flags: + +Number Start End Size File system Name Flags + 1 1049kB 630MB 629MB fat32 EFI System Partition boot, esp + 2 630MB 1704MB 1074MB ext4 + 3 1704MB 45.1GB 43.4GB lvm + +(parted) quit +``` + +Resize physical volume: +```bash +[root@awi-ci-01 ~]# pvresize /dev/sda3 + Physical volume "/dev/sda3" changed + 1 physical volume(s) resized or updated / 0 physical volume(s) not resized +``` + +Now the effective volumes of the machine can be extended as documented [Resize System Volumes](vgroot.md) \ No newline at end of file diff --git a/admin-guide/configuration/resize_vm_disk/resize_vm_disk_01.png b/admin-guide/configuration/resize_vm_disk/resize_vm_disk_01.png new file mode 100644 index 00000000..78eecb51 Binary files /dev/null and b/admin-guide/configuration/resize_vm_disk/resize_vm_disk_01.png differ diff --git a/admin-guide/configuration/resize_vm_disk/resize_vm_disk_02.png b/admin-guide/configuration/resize_vm_disk/resize_vm_disk_02.png new file mode 100644 index 00000000..611a0963 Binary files /dev/null and b/admin-guide/configuration/resize_vm_disk/resize_vm_disk_02.png differ