Create Rescue CD, you may already have one created so just mount this in edit settings#
- Download rescuecd from http://www.sysresccd.org
- Load into ISO
- Startup VM with ISO, in boot options ensure to boot into BIOS, set CD as primary boot device
- Restart VM and you should see a command line
Resize partitian table#
- enter or in 64 bit redhat type rescue64 (for keymap)
- fdisk -l
- fdisk /dev/sda
- p (to print)
- d (to delete)
- 2 (choose second one)
- n (to recreate)
- p (choose primary)
- 2 (choose second one)
- enter (to except new size)
- enter (to accept last one)
- p (show new size)
- t (change type)
- 2 (choose second one)
- 8e (to change patitian type code)
- p (to print shows 83 changed to 8e)
- w (to commit changes)
Scan for new or changed disks#
echo "- - -" > /sys/class/scsi_host/hostX/scanWhere X can be 0, 1, 2....
Resize physical volumne#
- pvdisplay /dev/sda2 (show old size)
- pvresize /dev/sda2
- pvdisplay /dev/sda2 (to show new size)
extend volume group#
- vgdisplay (show free space available, check "Free PE / Size" for $FreePESize parameter below)
Register Volumes#
- vgscan
- vgchange -ay (activate the lvm)
Extend Logical Volume#
- lvextend -l +$FreePESize /dev/VolGroup00/LogVol00 (the 64 is the param above)
- lvextend -l +$FreePESize /dev/VolGroup/lv_root (the 64 is the param above)
Resize File System#
- resize2fs /dev/VolGroup00/LogVol00
- resize2fs /dev/VolGroup/lv_root
Wait until this is finished.#
Sync buffer to disk#
- sync
- sync
Shutdown VM#
- shutdown -h now
- wait for machine to shutdown properly
- remove rescue cd from machine
- start machine as normal
If it fails when booting up, then run the fsck and click Y, then run this when OS starts from command line: resize2fs /dev/VolGroup00/LogVol00
Back to Linux
Add new attachment
Only authorized users are allowed to upload new attachments.
«
This page (revision-24) was last changed on 24-May-2017 15:30 by Hyve Support