Expand the disk capacity of the root partition of the ora16 Virtual Machine

Source: Internet
Author: User
Expand the root partition disk capacity (VMwareworkstation7) of the ora16 Virtual Machine 1. disable the Virtual Machine fedora16 and use the vmware Virtual Machine/settings/to expand the disk capacity (8 GB); 2. run the command parted-l/dev/sdaprint to check whether the disk space has been properly increased. 3. because gpora16 uses GPT, all partitions that use parted instead of fdisk create and add disk space (lvm): & nb

Expand the disk capacity of the root partition of the ora 16 Virtual Machine(VMware workstation 7)

1. Disable Virtual Machine fedora 16 and expand the disk capacity (8 GB) through vmware Virtual Machine/settings );
2. Run the commandParted-l/dev/sda printConfirm that the disk space has been properly increased;
3. Because gpora 16 uses GPT, all do not needFdiskUsePartedCreate a new partition for the disk space (lvm ):
3.1 [root @ fedora ~] #Parted/dev/sda(Input command)
GNU parted3.0
Using/dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(Parted)Print(Input command)
Model: VMware, VMware Virtual S (scsi)
Disk/dev/sda: 16.1 GB (Displays the overall disk space)
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 526 MB 524 MB ext4 ext4 boot
3 526 MB 8589 MB 8063 MB lvm
(Partitioned but only 8 GB, the extended 8 GB is not shown here)
3.2 (parted)Mkpart newpart 8589 MB 16.0G(Create an extended 8 GB as a new partition)
(Parted)Print
Model: VMware, VMware Virtual S (scsi)
Disk/dev/sda: 16.1 GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 526 MB 524 MB ext4 ext4 boot
3 526 MB 8589 MB 8063 MB lvm
4 8589 MB 16.0 GB 7411 MB newpart
(Parted)Set 4 lvm(Set the new partition to lvm)
New state? [On]/off?On
(Parted)Print
Model: VMware, VMware Virtual S (scsi)
Disk/dev/sda: 16.1 GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 526 MB 524 MB ext4 ext4 boot
3 526 MB 8589 MB 8063 MB lvm
4 8589 MB 16.0 GB 7411 MB newpart lvm
4. Use the lvm management tool to extend the new partition to the root partition:
4.1 [root @ fedora ~] #Vgdisplay (View the lvm volume group name)
--- Volume group ---
VG Name vg_fedora
..........
4.2Pvcreate/dev/sda4 (Create new physical volume)
4.3Vgextend vg_fedora/dev/sda4 (Extended to volume group)
4.4Lvdisplay
--- Logical volume ---
LV Name/dev/vg_fedora/lv_root
VG Name vg_fedora
.............
4.5Lvextend/dev/vg_fedora/lv_root/dev/sda4(Extend to logical volume)
4.6Resize2fs/dev/vg_fedora/lv_root(Refresh the capacity of the logical volume of the root partition)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.