Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
12-19-2010, 06:35 AM
|
#1
|
LQ Newbie
Registered: Dec 2010
Posts: 10
Rep:
|
Readjust disk space between /dev/sda2 and /dev/sda5
[CODE]Hi All-
I am new to Linux and I have it installed on VMWare Fusion.
All was happy until the Linux installation was succeeded and I am able to log in as root and created a user for myself.
However, when I installed Oracle Express Edition Database 10g, it complains that I have insufficient disk space on '/' directory.
Here is a snapshot of my system. Wondering if I would like to swap the free space from /dev/sda5 into /dev/sda2.
Code:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 6 48163+ 83 Linux
/dev/sda2 7 515 4088542+ 83 Linux
/dev/sda3 516 776 2096482+ 82 Linux swap / Solaris
/dev/sda4 777 2610 14731605 5 Extended
/dev/sda5 777 2610 14731573+ 83 Linux
Critically waiting for your inputs.
Appreciate it!!
Last edited by born2bdesi; 12-19-2010 at 08:26 AM.
|
|
|
12-19-2010, 07:31 AM
|
#2
|
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279
|
What is the output of df ?
Please use the code tags when posting terminal output.
|
|
|
12-19-2010, 07:41 AM
|
#3
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
The partition information, here presented in CODE tags so it is easier to read, is not enough to answer the question without also knowing which partitions are used for what and whether the swap space is used.
Code:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 6 48163+ 83 Linux
/dev/sda2 7 515 4088542+ 83 Linux
/dev/sda3 516 776 2096482+ 82 Linux swap / Solaris
/dev/sda4 777 2610 14731605 5 Extended
/dev/sda5 777 2610 14731573+ 83 Linux
What is the output of
Code:
df -hT
grep swap /etc/fstab
|
|
|
12-19-2010, 08:10 AM
|
#4
|
LQ Newbie
Registered: Dec 2010
Posts: 10
Original Poster
Rep:
|
Thanks for the replies!
Apologies, will use Code Tags from now on..
Here is the output.
Code:
[root@localhost ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext3 3.8G 3.3G 372M 90% /
/dev/sda5 ext3 14G 1016M 12G 8% /home
/dev/sda1 ext3 46M 11M 33M 25% /boot
tmpfs tmpfs 506M 0 506M 0% /dev/shm
.host:/ vmhgfs 56G 43G 14G 77% /mnt/hgfs
Code:
[root@localhost ~]# grep swap /etc/fstab
LABEL=SWAP-sda3 swap swap defaults 0 0
Please reply.
|
|
|
12-19-2010, 08:25 AM
|
#5
|
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279
|
Please clarify whether the Oracle Express Edition Database 10g is installed or fails to install.
If it is already installed then you need to find out which directory it expects to store the files that need this space. You could then either create a mount point to free space created by shrinking your home partition, or symlink the required directory to a directory on your existing home partition.
If it's not installing because of lack of free space, then you will have to shrink the home partition and create a new partition that you can mount in the required / directory.
Please note that XE 10G will create up to 4 GB of user files.
Last edited by smoker; 12-19-2010 at 08:27 AM.
|
|
|
12-19-2010, 08:28 AM
|
#6
|
LQ Newbie
Registered: Dec 2010
Posts: 10
Original Poster
Rep:
|
Thanks for your reply smoker!
Oracle Installation failed with the following error.
Code:
installing package oracle-xe-univ-10.2.0.1-1.0.i386 needs 82MB on the / filesystem
Please reply.
|
|
|
12-19-2010, 08:36 AM
|
#7
|
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279
|
Your df output shows 372MB available on the / partition. Maybe you could clear up any files in /tmp but you are looking at a fair amount of work if you decide to increase the partition size. The installed size of XE 10G is only supposed to be 150MB so I can't see why it would fail. Where did you download the rpm install package to ? Somewhere in home or direct to somewhere in / ?
|
|
|
12-19-2010, 08:42 AM
|
#8
|
LQ Newbie
Registered: Dec 2010
Posts: 10
Original Poster
Rep:
|
I have downloaded the RPM package into /home/<my login> and running the installation under 'root' login.
However, I would like to get your inputs on these.
Apart from Oracle10g installatiion, I would also like to install other software under /opt/software director which also has very low space at the moment.
Can I swap some space from /dev/sda5 to /dev/sda2; If so, please provide with instructions / steps to go ahead.
Appreciate your help!!
|
|
|
12-19-2010, 08:53 AM
|
#9
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Rep:
|
You cannot directly move space from sda2 to sda5. You can only move space from one away(sda2 from sda3, sda3 from sda4, and sda4 from sda5), which is a major PITA. There are a couple of ways to get around this. You can add another drive, copy all the files from the sub directory you need more space in, and then mount the new drive to the sub directory in place. Once you are certain everything is working fine you can unmount the other drive, and THEN delete the contents of the orginal sub directory(to regain the space on the master drive). This is how I handle my /home directory. You could do something similar using another partition on the same drive.
|
|
|
12-19-2010, 09:03 AM
|
#10
|
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279
|
Swapping space is not an easy process. Mounting free space is easier, depending on what is already in the required directory.
It would be easier to reinstall and specify a larger / partition during the install.
Failing that, you will have to use the install disk to boot from and use a partitioning tool such as parted to shrink your home partition, create a new partition in the empty space, then create a filesystem on that partition such as ext3 or what ever you choose. You could then edit your fstab file to point /opt/software at the new partition.
To actually move space to the / partition would entail shrinking home, then moving that partition to the end of the free space, then moving every other partition down until the free space was just after the / partition. You could then extend the / partition.
Initially I would try symlinking /opt/software to a directory on your home partition.
You must create the <directory> first.
In a terminal as root ...
Code:
cd /opt
ln -s /home/<user>/<directory> software
Replace <user> and <directory> with real ones on your system.
Last edited by smoker; 12-19-2010 at 09:05 AM.
Reason: forgot the link name !
|
|
1 members found this post helpful.
|
12-19-2010, 09:05 AM
|
#11
|
LQ Newbie
Registered: Dec 2010
Posts: 10
Original Poster
Rep:
|
Thanks for your reply, Lazlow!
Can you please take some time and walk me through the process (with commands), I am a newbie to Linux
This is what i understand. Please validate.
Code:
1. Add a new drive (e.g. /dev/sda6). How can I create this?
2. Copy all files from /opt/* to the newly created drive. I can do this step :)
3. Mount the new drive to the sub directory in place. Does this command work?
Code:
mount /dev/sda6 /opt
In my scenario, I want more space on root (/) partition. At the same time, I do not want to waste the space already available on my home partition; I am running on a 60GB HDD.
Appreciate it!!
|
|
|
12-19-2010, 09:20 AM
|
#12
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Rep:
|
By new drive I meant a physical drive.
On the same drive you would shrink sda5, create a sda6 partition, and then format it.
I do not believe that you can handle the root(/) this way. No pun intended, but it is the root of everything. When I moved my /home directory(in 07?) all I did was to (in gui): format new drive,(temporarily mounted it in media) copy files over(just drug them over), and then (as root in cli) I mounted in (similar as you did above) /home. After I used it for a week and made sure everything was happy, I umounted it, deleted all the data from the orginal /home, and thus regained all the space used by /home(orignal) for root(/). Here is my fstab line I used to make it permament(on bootup). Remember mount points do not take up any(significant) space on the drive.
Quote:
/dev/sda2 /home ext3 defaults 1 2
|
My boot drive is hda and sda1 is my swap.
|
|
|
12-19-2010, 09:45 AM
|
#13
|
LQ Newbie
Registered: Dec 2010
Posts: 10
Original Poster
Rep:
|
Thanks for your replies, Smoker & Lazlow!
Responding to Smoker..
I have established a symbolic link and am able to install software successfully by pointing the install location to /opt/software. However, I still cannot install Oracle 10g XE due to the error it has been returning. Can I instruct Oracle to use /opt directory instead?
Code:
installing package oracle-xe-univ-10.2.0.1-1.0.i386 needs 82MB on the / filesystem
Please assist.
|
|
|
12-19-2010, 09:52 AM
|
#14
|
LQ Newbie
Registered: Dec 2010
Posts: 10
Original Poster
Rep:
|
I got a different warning this time when I tried to install Oracle 10g.
Code:
Software installed successfully.
Some warnings were given.
----WARNING---
You have insufficient diskspace in the destination directory (/usr/lib) to
install Oracle Database 10g Express Edition. The installation requires at
least 1.5 GB free on this disk.
Any clues!
|
|
|
12-19-2010, 09:59 AM
|
#15
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
What about commenting swap out of fstab, deleting the swap partition sda3 and growing sda2 into the space formerly taken by sda3? sda5 could be shrunk to make space for a new swap partition.
|
|
|
All times are GMT -5. The time now is 03:22 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|