Scenario 1: If the current disk has capacity to expand
Under Root, the "fdisk-l" Maximum partition is/dev/sda3, and the newly created latest partition is/DEV/SDA4
Enter "FDISK/DEV/SDA"
"N" adds a new partition
"P" creates a primary partition
"Enter" selects the default size (also full size) so that no space is wasted
"Enter", select the default start cylinder.
"W" remains modified
"Reboot" Restart Linux, you must restart Linux, otherwise/dev/sda4 will not be able to format the/dev/directory, you can see the new partition SDA4
The MKFS.EXT4/DEV/SDA4 is formatted
"Mount/dev/sda4/opt" mount the partition to/opt
"Vi/etc/fstab" last line joins/dev/sda4/opt ext4 defaults 0 0
Save, realize boot automatically mount. At this point, the new increase in disk space capacity, can be reflected on the/opt, and reboot automatically mount the partition, additional disk space to work.
Scenario 2: If the current disk is not wide, you can use the method of increasing the disk, in the VMware main interface, select the "VMware" drop-down menu, select "Settings", with "add" method to add a disk.
In the virtual machine settings, a new disk, my virtual machine's disk is the IDE type, so the new disk is also the IDE, the capacity of 5G. (Open VMware, select the edit Virtual mache settings,utilities drop-down box to locate expand.) )
Under the root user, the "fdisk-l" Maximum partition is/dev/sda3, and the newly created latest partition is/DEV/SDB1.
Enter "Fdisk/dev/sdb"
"N" adds a new partition
"P" creates a primary partition
"Enter" selects the default size (also full size) so that no space is wasted
"Enter", select the default start cylinder.
"W" remains modified
"Reboot" Restart Linux, you must restart Linux, otherwise/DEV/SDB1 will not be able to format the/dev/directory, you can see the new partition SDB1
"MKFS.EXT4/DEV/SDB1" to format "mount/dev/sdb1/opt" to mount the partition to/opt
The last line of "Vi/etc/fstab" is added/dev/sdb1/opt ext4 defaults 0 0 save, realize boot auto mount.
At this point, the new increase in disk space capacity, can be reflected on the/opt, and reboot automatically mount the partition, additional disk space to work.
How to append disk space under Linux