Saturday, 12 July 2014

Extending partition in the VirtualBox

Today we have faced new problem in the Oracle Virtual Box. When we tried to install weblogic 12c on the Ubuntu Guest platform, got the following error.

You can extend the disk space by creating the new disk and adding it to the existing diskspace.


1. Creating new disk for Oracle Virtual Box
Processor changes in for Virtual Machine in Virtual Box

Step by Step approch for extending the disk space in Virtual box.

1. Goto the Settings -> Storage -> Controller SATA and click on add hard disk.
2. Select the disk file type as vmdi.
3. Select storage as fixed size.
4. Set the hard drive size as per requirement, before assigning check the availablity space of the         Windows partition.
5. Power ON the virtual box.

Note: During installation time if we create root filesystem with LVM, then we can extend the size of root file system. Otherwise its not possible to extend the existing patition size.

The problem we have is there is not enough space in /tmp for configuring a middleware application.
During installation if we create /tmp as individual filesystem with LVM, then we can extend the size of /tmp file system size. But if /tmp is not created as individual filesystem then it resides bu default as a directory under "/" root file system.
  So here we created a new file system and mounted as /tmp.

Now check whether newly attached hard drive detected logically or not.
 Run the command as
 # fdisk -l
  

 During Installation we configuring the file system on a hard drive i.e., /dev/sda.
The newly added hard drive is /dev/sdb.

Creating new partition from newly created disk. i.e., logical partition 
 after creating partition we need save and update to disk.
Then update modify disks to kernel as
   # partprobe /dev/sdb


Format the partition with ext4 file system type.


 mount the partition with /tmp.
 Remember mounting a logical device i.e., partition at shell prompt is temporary mounting. 
It will be available until session close.

To mount a file system permanently mounted, give the file system entry in /etc/fstab file as
# vi /etc/fstab
 Goto last line and give entries as
/dev/sdb5     /tmp      ext4     defaults     0  0
From above /dev/sdb5  --> logical device name
/tmp --> mount point
ext4 --> file system type
defaults -> file system permissions i.e., read & write.
0 -> no file system dump
0 -> don't run fsck at run time.






To lists all the permanently mounted file system information
# df -h


















No comments:

Post a Comment