Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is a non official procedure (which is working) which allows users to extend their VMware disk in order to be able to add more Volumes.
- 1. OVA installation does not allow us to change disk size from default 100GB.
- 2. Using CLI, we can also check the disk size:
- [root@apple:INOPERATIVE:Standalone] config # vgdisplay
- --- Volume group ---
- VG Name vg-db-sda
- System ID (none)1338361604
- Format lvm1
- VG Access read/write
- VG Status resizable
- MAX LV 255
- Cur LV 17
- Open LV 8
- Max PV 255
- Cur PV 1
- Act PV 1
- VG Size 98.77 GB
- PE Size 4.00 MB
- Total PE 25284
- Alloc PE / Size 19828 / 77.45 GB
- Free PE / Size 5456 / 21.31 GB
- VG UUID G45wy5-orj4-z0Wq-XQ4g-vKqK-C3Qo-NIeYh0
- [root@edge:INOPERATIVE:] config # fdisk /dev/sda
- The number of cylinders for this disk is set to 13054.
- There is nothing wrong with that, but this is larger than 1024,
- and could in certain setups cause problems with:
- 1) software that runs at boot time (e.g., old versions of LILO)
- 2) booting and partitioning software from other OSs
- (e.g., DOS FDISK, OS/2 FDISK)
- Command (m for help): p
- Disk /dev/sda: 107.3 GB, 107374182400 bytes
- 255 heads, 63 sectors/track, 13054 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- /dev/sda1 * 1 28 224909+ b W95 FAT32
- /dev/sda2 29 158 1044225 82 Linux swap / Solaris
- /dev/sda3 159 13052 103571055 8e Linux LVM
- 3. Increase the hard disk size of the virtual machine. and then reboot the virtual machine. (in this example, we used 300GB)
- 4. Once it is rebooted, run fdisk command to add a new partition: primary, partition 4. Then accept the default values. (Last cylinder size is differed how much size you assigned to the virtual machine)
- [root@apple:INOPERATIVE:Standalone] config # fdisk /dev/sda
- The number of cylinders for this disk is set to 39162.
- There is nothing wrong with that, but this is larger than 1024,
- and could in certain setups cause problems with:
- 1) software that runs at boot time (e.g., old versions of LILO)
- 2) booting and partitioning software from other OSs
- (e.g., DOS FDISK, OS/2 FDISK)
- Command (m for help): m
- Command action
- a toggle a bootable flag
- b edit bsd disklabel
- c toggle the dos compatibility flag
- d delete a partition
- l list known partition types
- m print this menu
- n add a new partition
- o create a new empty DOS partition table
- p print the partition table
- q quit without saving changes
- s create a new empty Sun disklabel
- t change a partition's system id
- u change display/entry units
- v verify the partition table
- w write table to disk and exit
- x extra functionality (experts only)
- Command (m for help): n
- Command action
- e extended
- p primary partition (1-4)
- p
- Selected partition 4
- First cylinder (13053-39162, default 13053):
- Using default value 13053
- Last cylinder or +size or +sizeM or +sizeK (13053-39162, default 39162):
- Using default value 39162
- 5. Now, using p command to show the new partition table. Make sure the added partition type, and change it to "Linux LVM"
- Command (m for help): p
- Disk /dev/sda: 322.1 GB, 322122547200 bytes
- 255 heads, 63 sectors/track, 39162 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- /dev/sda1 * 1 28 224909+ b W95 FAT32
- /dev/sda2 29 158 1044225 82 Linux swap / Solaris
- /dev/sda3 159 13052 103571055 8e Linux LVM
- /dev/sda4 13053 39162 209728575 83 Linux
- Command (m for help): t
- Partition number (1-4): 4
- Hex code (type L to list codes): L
- 0 Empty 1e Hidden W95 FAT1 80 Old Minix bf Solaris
- 1 FAT12 24 NEC DOS 81 Minix / old Lin c1 DRDOS/sec (FAT-
- 2 XENIX root 39 Plan 9 82 Linux swap / So c4 DRDOS/sec (FAT-
- 3 XENIX usr 3c PartitionMagic 83 Linux c6 DRDOS/sec (FAT-
- 4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c7 Syrinx
- 5 Extended 41 PPC PReP Boot 85 Linux extended da Non-FS data
- 6 FAT16 42 SFS 86 NTFS volume set db CP/M / CTOS / .
- 7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set de Dell Utility
- 8 AIX 4e QNX4.x 2nd part 88 Linux plaintext df BootIt
- 9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM e1 DOS access
- a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e3 DOS R/O
- b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e4 SpeedStor
- c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS eb BeOS fs
- e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi ee EFI GPT
- f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ef EFI (FAT-12/16/
- 10 OPUS 55 EZ-Drive a6 OpenBSD f0 Linux/PA-RISC b
- 11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f1 SpeedStor
- 12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f4 SpeedStor
- 14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f2 DOS secondary
- 16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot fb VMware VMFS
- 17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
- 18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
- 1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
- 1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
- Hex code (type L to list codes): 8e
- Changed system type of partition 4 to 8e (Linux LVM)
- 6. Then make sure added partition type is changed to Linux LVM with p command.
- Command (m for help): p
- Disk /dev/sda: 322.1 GB, 322122547200 bytes
- 255 heads, 63 sectors/track, 39162 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- /dev/sda1 * 1 28 224909+ b W95 FAT32
- /dev/sda2 29 158 1044225 82 Linux swap / Solaris
- /dev/sda3 159 13052 103571055 8e Linux LVM
- /dev/sda4 13053 39162 209728575 8e Linux LVM
- 7. Now, run w command to save the new partition table. Then reboot the box for the changes to take place.
- Command (m for help): w
- The partition table has been altered!
- Calling ioctl() to re-read partition table.
- WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
- The kernel still uses the old table.
- The new table will be used at the next reboot.
- Syncing disks.
- [root@apple:Active:Standalone] config # reboot
- 8. Once unit is rebooted, create a new physical volume using pvcreate command with key "-M1" extension, since fdisk create -M2 by default and need to have the same metadatatype.
- [root@apple:Active:Standalone] config # pvcreate /dev/sda4 -M1
- Physical volume "/dev/sda4" successfully created
- 9. Makes sure the VG name and then add the new pv to volume group so that we can increase the disk size by vgextend.
- [root@apple:Active:Standalone] config # vgdisplay
- --- Volume group ---
- VG Name vg-db-sda
- System ID (none)1338361604
- Format lvm1
- VG Access read/write
- VG Status resizable
- MAX LV 255
- Cur LV 17
- Open LV 9
- Max PV 255
- Cur PV 1
- Act PV 1
- VG Size 98.77 GB
- PE Size 4.00 MB
- Total PE 25284
- Alloc PE / Size 19828 / 77.45 GB
- Free PE / Size 5456 / 21.31 GB
- VG UUID G45wy5-orj4-z0Wq-XQ4g-vKqK-C3Qo-NIeYh0
- [root@apple:Active:Standalone] config # vgextend vg-db-sda /dev/sda4
- Volume group "vg-db-sda" successfully extended
- 10. Now you can see the VG size has been increased.(from 98.77GB to 298.77GB)
- [root@apple:Active:Standalone] config # vgdisplay
- --- Volume group ---
- VG Name vg-db-sda
- System ID (none)1338361604
- Format lvm1
- VG Access read/write
- VG Status resizable
- MAX LV 255
- Cur LV 17
- Open LV 9
- Max PV 255
- Cur PV 2
- Act PV 2
- VG Size 298.77 GB
- PE Size 4.00 MB
- Total PE 76486
- Alloc PE / Size 19828 / 77.45 GB
- Free PE / Size 56658 / 221.32 GB
- VG UUID G45wy5-orj4-z0Wq-XQ4g-vKqK-C3Qo-NIeYh0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement