Linux virtual machine to increase the size of the drive to go from

Source: Internet
Author: User

Transfer from http://blog.csdn.net/tongyu2009/article/details/8525384 when I do #unzip liunx_oracle, prompt disk full? [email protected] ~]# df-h found used 100%, indicates that the space allocated at the time of installation 10G is not enough, you need to increase the virtual machine hard disk space, refer to the following methods: First, you can back up the next. VMDK  I use the above method, Linux plus hard disk space is successful, But because I mounted to the Home/tony folder inside, and Home/tony is my Linux personal account folder, After the mount, the contents are all gone, Tony users will not be able to log in therefore, when operating the following methods, it is best to first mkdir/oracle under the root, and then mount, without mounting to the existing path The next day, I #vi/etc/fstab/dev/sda3/home/tony ext3 defaults, 0 1 deleted, wq! when prompted then prompt "/etc/fstab" E514:write error (File system full?) The space was too full, so 1. Rm-f/temp/* 2. #vi/etc/fstab/dev/sda3/home/tony ext3 defaults, 0 1 Delete, save successfully 3.umount/dev/sda3/home/tony Uninstall, Tony folder contents back again haha, more Shei Sir Ah but at this point after restart with Tony user still unable to log in, display user's $Home/.DMRC file is being ignored ... after clicking OK, show GDM could not write to your author ... Ah, the idea of a moment to make so many problems, I want to re-install .... A: First introduce the method of disk expansion: 1, VMware provides a command-line tool, Vmware-vdiskmanager.exe, located in the installation directory of VMware, such as C:/Program Files/vmware/vmware workstation/ Vmware-vdiskmanager.exe. In the cmd window of Windows, go to the installation directory for VMware: cd C:/Program files/vmware/vmware Workstation/vmware-vdisk Manager.exe can view help 2, for the expansion, you can enter the following command: Vmware-vdiskmanager-x 4Gb "D:/VMWARE/WINXP/MYLINUX.VMDK" parameter "-X" means to extend the virtual machine hard disk space, tight     The number that follows is the size to expand to (this example expands to 4GB, which is the total amount of disk, which contains the original disk capacity). Finally, specify the specific files for the virtual machine disks that you want to manipulate, and if there are spaces in the path name, enclose them in double quotation marks. Press ENTER to start, execute, exit the command Prompt window, restart VMware, you will find that the virtual machine hard disk space has become 4GB. most of the instructions on the Internet to the end of this step, it is not. After we restarted the virtual machine, we found that the virtual machine's hard disk was turned into 4GB, but after entering the Linux system, the "Df-ah" view found that the hard disk space is still the same size.   Although the disk has been expanded, but because it has not been partitioned to specify the file system, so the Linux operating system is not recognized (in fact, the equivalent of your hard disk, but you do not partition it is a reason). Below we do partition processing.  3, Partition:  fdisk command: fdisk-l : Print the current disk partition table, we can see that the total amount of disk has actually increased to 4GB, but the partition has only the previous partition of the original.   Type Command:fdisk/dev/sda   "SDA is a hard disk that has been expanded, for a SCSI hard disk, the IDE type hard disk corresponds to HDA, is to operate on that hard disk"   type:   m      "list fdisk help"   We're here to add a new partition that will be expanded to create a new partition so that it can be identified by the operating system mount.   Type:    n     "command N to add a new partition"     at this time, FDISK will let you choose to add as logical partitions (numbered 5) or primary (numbers 1 to 4). Select the primary partition, type P, and select logical partition to Type L.   We select Primary partition so:   type:   p                 Select Create Primary partition   at this point, Fdisk will let you select the number of the primary partition, and if you already have the primary partition Sda1,sda2, then the number will be 3, that is, the partition to be created is Sda3.   Type:    3   at this point, Fdisk will let you choose the start value of the partition this is the start value of the partition (start cylinder); it's best to press ENTER directly,   If you enter a non-default number, it can create a waste of space;   Type:w             at this time   "Save all and exit, Partition complete" We need a reboot to find this area . We can't use this partition now, why? Not formatted Ah, hehe!4. Format the newly added partition: type: mkfs-t ext3/dev/sda3 or MKFS.EXT3/DEV/SDA3 format the specified partition, and so on, and now most of the system is ext3 format, if you need anything else, You can view help for MKFS. at this point we can use the new partition:5. Mount the partition: Manually mount, then type: mount/dev/sda3/home/work/"means to mount the new partition under/home/work/this directory" to automatically mount the boot, then modify the/etc/fstab file, add a line in this file: /dev/sda3/home/work ext3 defaults, 0 1 "about the format of the file, after writing the article discusses ^_^" each boot will be the partition on the big work          Below the catalogue. You can use the new plus partition here. Two: Another way is to first add a hard disk to the virtual machine and then mount it. This is equivalent to buying a hard disk, which can alleviate the problem of disk space tension. 1, start the virtual machine, select "Edit Virtual machines Settings", click the button "adding", follow the wizard by default add a disk, generally SCSI devices. Specify the hard drive capacity and then reboot into the system. Root user action: 2, Fdisk-l will see a new setting, if you have a hard disk (SDA1, sda2 ...), the new addition should be (/DEV/SDB). See that the system has identified the hard drive, and then we will partition the hard disk, format. Fdisk/dev/sdb (Of course if you add an IDE setting that will be HDX) x represents a number, 1 to 4 refers to the primary partition number, and more than 5 refers to the logical partition.   Specific information can be found on the Internet. 3, partition format: The operation and the above partition format is roughly the same, just pay attention to change the/DEV/SDA to/dev/sdb, the subsequent operation is consistent.

Linux virtual machine to increase the size of the drive to go from

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.