LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-28-2003, 04:04 PM   #1
invictus
Member
 
Registered: Jun 2003
Location: Waterloo, ON, Canada
Distribution: Debian/Woody 2.4.19 kernel
Posts: 46

Rep: Reputation: 15
Reallocating space for existing install


Debian/Woody kernel 2.4.1

Structure as follows:
hda1 -- Win32, 6 gb
hda2 -- swap, 170 mb
hda3 -- ext2 primary, 1.2 gb

hdb1 -- Win32, 30 gb
hdb5 -- Win32, 30 gb

hdb1 is soon to be an ext2 or ext3 partition, in part or all of it. My problem, however, is this:

How do I force my current install to use the extra space for something like, say, /usr, which is 673 mb(!!) on my miserable 1.2 gb partition?
 
Old 06-28-2003, 07:59 PM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
just change the partition type in fdisk to type 83 (linux)

fdisk /dev/hdb1

t
1
83


format the partition with..
mke2fs /dev/hdb1

create journal to convert to ext3..
tune2fs -j /dev/hdb1

mount it somewhere..
mkdir /somewhere
mount /dev/hdb1 /somewhere

copy /usr files to it..
cd /usr
tar -c . | (cd /somewhere; tar -x)

now a copy of your files in /usr will be in /somewhere
mount the partition to /usr..

umount /somewhere
mount /dev/hdb1 /usr


update your /etc/fstab file to mount the partition at boot..
/dev/hdb1 /usr ext3 defaults 1 2




note: you can delete the files in /usr to reclaim disk space in /
do it like this..
umount /usr
rm -rf /usr
mkdir /usr
mount /usr
 
Old 06-28-2003, 08:14 PM   #3
invictus
Member
 
Registered: Jun 2003
Location: Waterloo, ON, Canada
Distribution: Debian/Woody 2.4.19 kernel
Posts: 46

Original Poster
Rep: Reputation: 15
Ah-HAH!

Thank you muchly, I get it now.
 
Old 08-17-2003, 12:10 AM   #4
invictus
Member
 
Registered: Jun 2003
Location: Waterloo, ON, Canada
Distribution: Debian/Woody 2.4.19 kernel
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by DavidPhillips


update your /etc/fstab file to mount the partition at boot..
/dev/hdb1 /usr ext3 defaults 1 2


note: you can delete the files in /usr to reclaim disk space in /
do it like this..
umount /usr
rm -rf /usr
mkdir /usr
mount /usr
Everything done almost as you had instructed.
/dev/hda5 is a 3.5G ext3 partition, created through the install of Mandrake. Mandrake was later killed (didn't have time to mess with it), leaving an empty 3.5G partition.

mount /dev/hda5 /h

cd /usr
cp -r * /h
umount /h
mount /dev/hda5 /usr

Then... Here comes the problem:
cd /
umount /usr
rm -rf /usr
mkdir usr
mount /dev/hda5 /usr

Space not reclaimed. /dev/hda3 is still at 100% full.

I've updated /etc/fstab, so the next thing I'll be trying is a reboot...

Suggestions? Corrections?
 
Old 08-18-2003, 09:31 PM   #5
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
are you sure /usr was on hda5 to start with?

I don't see how it could still be using space if you actually deleted it.

try du -c /usr to see what space would be saved
 
Old 09-07-2003, 07:30 PM   #6
invictus
Member
 
Registered: Jun 2003
Location: Waterloo, ON, Canada
Distribution: Debian/Woody 2.4.19 kernel
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by DavidPhillips
are you sure /usr was on hda5 to start with?

I don't see how it could still be using space if you actually deleted it.

try du -c /usr to see what space would be saved
Once again, thank you for the help. It worked flawlessly, except for the BKAC error. I backed up the original /usr before starting, and then totally forgot about it. No wonder the space didn't get freed up!
 
Old 09-08-2003, 04:13 PM   #7
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create new partition from existing free space distortedstar Linux - General 4 06-07-2005 09:47 PM
Reallocating space pulisubs Linux - Newbie 2 09-16-2004 12:29 PM
add unallocated free space to existing disk drives!! ajaymyeg Linux - Networking 1 07-21-2004 08:17 PM
Mounting new HD space into existing mount points? GT_Onizuka Linux - Hardware 4 05-26-2004 05:15 AM
Reallocating free Space stratos Linux - Newbie 2 08-15-2002 11:34 AM


All times are GMT -5. The time now is 06:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration