Extending root disk of Cloud Director appliance
Cloud Director 10.x appliance
Need to expand the root partition of a Cloud Director appliance.
SSH into the Cloud Director applianceecho 1 > /sys/class/block/sda/device/rescanroot@cell [ ~ ]# fdisk -l....GPT PMBR size mismatch (83886079 != 94371839) will be corrected by write.The backup GPT table is not on the end of the device. This problem will be corrected by write.Disk /dev/sda: 45 GiB, 48318382080 bytes, 94371840 sectors << New disk sizeroot@cell [ /etc/yum.repos.d ]# tdnf install partedRefreshing metadata for: 'VMware Photon Linux 3.0 (x86_64)'Refreshing metadata for: 'VMware Photon Linux 3.0 (x86_64) Updates'Refreshing metadata for: 'VMware Photon Extras 3.0 (x86_64)'photon-extras 123 100%Installing:parted x86_64 3.2-9.ph3 photon-updates 1.12M 1170933Total installed size: 1.12M 1170933Is this ok [y/N]:yDownloading:parted 423548 100%Testing transactionRunning transactionInstalling/Updating: parted-3.2-9.ph3.x86_64Complete!root@cell [ /etc/yum.repos.d ]## parted /dev/sdaGNU Parted 3.2Using /dev/sdaWelcome to GNU Parted! Type 'help' to view a list of commands.(parted) printprintWarning: Not all of the space available to /dev/sda appears to be used, you canfix the GPT to use all of the space (an extra 10485760 blocks) or continue withthe current setting?Fix/Ignore? Fix <<FixModel: VMware Virtual disk (scsi)Disk /dev/sda: 48.3GBSector size (logical/physical): 512B/512BPartition Table: gptDisk Flags:Number Start End Size File system Name Flags 1 1049kB 3146kB 2097kB bios_grub 2 3146kB 137MB 134MB ext3 4 137MB 272MB 134MB linux-swap(v1) 3 272MB 42.9GB 42.7GB ext3(parted) resizepart 3resizepart 3Warning: Partition /dev/sda3 is being used. Are you sure you want to continue?(YES/no) yes(42.9GB) 100%(parted) quitroot@cell [ /etc/yum.repos.d ]# resize2fs /dev/sda3resize2fs 1.45.5 (07-Jan-2020)Filesystem at /dev/sda3 is mounted on /; on-line resizing requiredold_desc_blocks = 5, new_desc_blocks = 6The filesystem on /dev/sda3 is now 11730171 (4k) blocks long.root@cell [ /etc/yum.repos.d ]# df -l /Filesystem 1K-blocks Used Available Use% Mounted on/dev/sda3 45922128 13317084 30295188 31% /