How to expand the redhat5.5 root partition under VMWare to

  

The following error is reported when starting the database via sqlplus /as sysdba under Linux: ERROR:ORA-09817: Write to audit file failed.Linux-x86_64 Error: 28 : No space left on deviceORA-09945: Unable to initialize the audit trail fileLinux-x86_64 Error: 28: No space left on device After checking, the reason is that the Linux virtual machine root partition has been used 100%, so that the service cannot be performed normally: [oracle@etl110 ~]$ df -h file system capacity is available usable % mount point /dev/mapper/VolGroup00-lvm_root16G 15G 0 100% //dev/mapper/VolGroup00-lv_home2.0G 68M 1.8G 4% /home/dev/sda1 99M 13M 82M 14% /boottmpfs 579M 0 579M 0% /dev/shm

Consider expanding the virtual machine disk space from 20G to 40G, based on LVM operation, the following is the operation: Br>

Step 1: Use VMware tools to expand the allocated hard disk space 1.vmware provides a command line tool, under Windows
, vmware-vdiskmanager.exe is located in the vmware installation directory, such as vmware -vdiskmanager.exe; under Linux Direct vmware-vdiskmanager command; the operation: enter the command line window under windows, go to the vmware installation directory, execute vmware-vdiskmanager.exe; under Linux, directly type vmware-vdiskmanager, you can use this command to expand the use. Instructions: vmware-vdiskmanager -x 40Gb vmdisk1.vmdk.

Note: The system to be expanded cannot be run at this time. The parameter "-x" indicates that the virtual machine hard disk space is to be expanded, and the number following it is the size to be expanded, not the amount of increase ( This example is extended to 40GB, which is a total amount of disk, including the original disk capacity). Finally, specify the specific file of the virtual machine disk to be operated. If there are spaces in the path name, it must be enclosed in double quotes. Press Enter to start execution. After the execution is complete, exit the Command Prompt window and restart VMware. The virtual machine hard disk space has become 40GB.

2. After we restarted the virtual machine, we found that the virtual machine's hard disk became 40GB, but after entering the Linux system, use "df -h" to see that the hard disk space is still as large as before. Although the disk has been expanded, since the file system has not been partitioned, the Linux operating system
is not recognized. In fact, it is equivalent to your hard drive, although you have not partitioned it is a reason.

Step 2: Use the fdisk tool under Linux to partition. First, you need to log in to the system as root.

The fdisk -l command prints the current disk partition table: [root@etl110 ~]# fdisk -l

Disk /dev/sda: 42.9 GB, 42949672960 bytes255 heads, 63 sectors/track , 5221 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda2 14 2610 20860402+ 8e Linux LVM

(1) Type the command: fdisk /dev/sda, sda is the hard disk that is expanded, the SCSI hard disk, the IDE type hard disk corresponds to hda, is the operation of the hard disk; (2) type: m enter the list to list the fdisk (3) Type: n Enter to add a new partition, at this time, fdisk will let you choose to add as a logical partition (number starting from 5) or primary partition (number 1 to 4) type p to select the primary partition Type l to select the logical partition, here we type p to select the primary partition, after the carriage return fdisk will let you choose the number of the primary partition, if you already have the primary partition sda1, sda2, then the number is selected 3, that is to create The partition is sda3, and then fdisk will let you choose the partition to open. Value is the value of the Start value and End district, directly enter choose the default value; the last type w write the partition table, the whole operation is as follows, to add my comments back with a # sign, easy to understand.

[root@etl110 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 5221.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 (eg, old versions of LILO)2) booting and partitioning software from other OSs(eg, DOS FDISK, OS/2 FDISK)

Command (m for help): m #Get command help list Command actiona toggle a bootable flagb edit bsd disklabelc toggle the dos compatibility flagd delete a partitionl list known partition typesm print this menun add a new partitiono create a new empty DOS partition tablep print The partition tableq quit without saving changess create a new empty Sun disklabelt change a partition's system idu change display/entry unitsv verify the partition tablew write table to disk and exitx extra functionality (experts only)

Command (m for help ): n #New Partition Command actione extendedp primary partition (1-4)pPartition number (1-4): 3 #Create id Partition No. 3 First cylinder (2611-5221, default 2611): #直回, using the default value Using default value 2611Last cylinder or +size or +sizeM or +sizeK (2611-5221, default 5221): #直回Car, use the default value Using default value 5221

Command (m for help): t #Modify the system partition id number Partition number (1-4): 3 #Specify the partition id number to be modified Hex code ( Type L to list codes): 8e # specifies the id number to be changed, 8e represents LVMChanged system type of partition 3 to 8e (Linux LVM)

Command (m for help): w #write partition table 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 is busy. The kernel Still uses the old table. The new table will be used at the next reboot.

[root@etl110 ~]# reboot After rebooting the system, you can see sda3 under /dev/

Step 3: Format the newly added partition. Type the command: mkfs -t ext3 /dev/sda3, format /dev/sda3 to ext3 format, the operation process Under shown:

Copyright © Windows knowledge All Rights Reserved