VMware extended Hard Drive partitioning

Source: Internet
Author: User
Tags uuid hex code

Extended Drive

Partitioning the hard disk
(1) To view existing hard disk partitions [email protected]~]$DF-hfilesystem Size used Avail use%mounted on/dev/mapper/vg_china-lv_root 18G5.2G 12G +% /tmpfs 931M 72K 931M1%/dev/SHM/DEV/SDA1 485M 39M 421M9% /Boot (2Add a new partition to the new hard disk space (the number of hard drives does not increase, the increase is the space)sudofdisk/dev/SDA appears with the following prompt: Command (M forHelp ): N Description: New partition continue prompt: Command action e Extended P primary partition (1-4) P Description: Print partition Table3Description: Partition Number (1-4): Fdisk will let you select the number of the primary partition, and if you already have the primary partition Sda1,sda2, then the number is 3, that is, the partition to be created is Sda3. First Cylinder (2611-16632, default2611): Default carriage return (minimum) Using default value2611Last cylinder or+size or +sizem or +sizek (2611-16632, default16632): Default carriage return (max) Using default value16632Command (M forHelp ): T Description: Modify the partition type partition number (1-4):3Description: Modify the partition number for the partitioning type hex code (type L to list codes): 8e Description: 8e is the LVM disk type changed system type of partition3To 8e (Linux LVM) Command (M forHelp ): P Description: Print partition Table command (M forHelp):WDescription: Save exit the partition table has been altered!(3) Restart the system reboot (4) Enter the commandsudoFdisk-l/dev/SDA (5). Performsudopvcreate/dev/Sda3 Create a physical volume volume for this new partition;6). Now to do is to extend the physical volume (volume) to the new physical volume, execute the command firstsudoVgdisplay to see the status of the existing system volume group, the output is as follows: [[email protected]~]# Vgdisplay---Volume Group---VG Name vg_china System ID Format lvm2 Metadata areas1Metadata Sequence No3VG Access Read/WriteVG Status resizable MAX LV0Cur LV2Open LV2Max PV0Cur PV1Act PV1VG Size19.51GiB PE Size4.00MiB Total PE4994Alloc PE/Size4994/19.51GiB Free PE/Size0/0VG UUID sci2or-nhr6-89fg-afdw-czsm-hxql-QPS3JR (7) Execute command vgextend Vg_china/dev/Sda3, extend the subsequent volume group to the new Physical disk volume volume. (8The next step is to extend the logical volume (logic Volume) to the new volume, first using the command Vgdisplay to see the current logical volume (logic Volume) [[email protected]~]# Vgdisplay---Volume Group---VG Name vg_china System ID Format lvm2 Metadata areas2Metadata Sequence No4VG Access Read/WriteVG Status resizable MAX LV0Cur LV2Open LV2Max PV0Cur PV2Act PV2VG Size99.50GiB PE Size4.00MiB Total PE25473Alloc PE/Size4994/19.51GiB Free PE/Size20479/80.00GiB VG UUID sci2or-nhr6-89fg-afdw-czsm-hxql-QPS3JR (9) Execute the command extension logical partition [[email protected]~]# Lvextend-l + -.99g/dev/vg_china/lv_root/dev/Sda3 rounding size to boundary between physical extents:79.99GiB Extending Logical Volume Lv_root to97.50GiB Logical Volume lv_root successfully resized (TenFinally, resize the file system to a new logical volume and executes the command [[email protected]~]# resize2fs/dev/vg_china/LV_ROOTRESIZE2FS1.41. A( --may- .) Filesystem at/dev/vg_china/lv_root is mounted on/; on-Line resizing requiredold desc_blocks=2, new_desc_blocks =7performing an on-line Resize Of/dev/vg_china/lv_root to25559040(4k) blocks. The FileSystem on/dev/vg_china/lv_root is now25559040BlocksLong. ( One) See the expanded partition with the command [email protected]~]# fdisk-l/dev/Sdadisk/DEV/SDA:107.4GB,107374182400bytes255Heads theSectors/track,13054cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x0007243fDevice Boot Start End Blocks Id System/DEV/SDA1 *1           -      512000    thelinuxpartition1does not end on cylinder boundary./dev/sda2 -        2611    204584968e Linux LVM/dev/sda32611       13054    838847358e Linux lvm[[email protected]~]#DF-hlfilesystem Size used Avail use%mounted on/dev/mapper/vg_china-lv_root 96G5.2G 86G6% /tmpfs 931M 72K 931M1%/dev/SHM/DEV/SDA1 485M 39M 421M9%/boot

VMware extended Hard Drive partitioning

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.