LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 05-02-2005, 07:54 PM   #1
Massif
LQ Newbie
 
Registered: May 2005
Distribution: Trustix
Posts: 10

Rep: Reputation: 0
Re-partitioning problems


When I first installed Linux I started from an empty 4GB hard drive. I created 3 partitions.
hda1 - 600MB partition for linux mounted as /
hda2 - 400MB swap partition
hda3 - 3GB partition for my own files mounted as files/

I soon realized that the 600MB partition was not enough and I want to combine the linux partition with the 3GB files/ partition.

1. I unmounted files/ and deleted the directory.
2. I used fdisk to re-partition the drive and made a 3.6GB partition (hda1) and a 400MB swap partition (hda2).
3. I edited the fstab file and removed the /dev/hda3 that was mounted to files/

It seems to have worked. I rebooted and my system is fine. The only problem is when I use the "df" command it still says the old size of the hda1 partition.

Is there another file that needs to be changed to reflect the new size of the partitions?

Thanks.
 
Old 05-02-2005, 10:17 PM   #2
Massif
LQ Newbie
 
Registered: May 2005
Distribution: Trustix
Posts: 10

Original Poster
Rep: Reputation: 0
I just had an idea. Is it possible to unmount hda1 and then mount it again? Maybe that's all it needs.

If anyone knows if this is possible, please reply.
 
Old 05-03-2005, 12:35 AM   #3
Massif
LQ Newbie
 
Registered: May 2005
Distribution: Trustix
Posts: 10

Original Poster
Rep: Reputation: 0
Well I figured it out on my own. I did have to unmount the system and remount it. However, in between I had to resize the actual filesystem to match the partition size. Here's how for anyone else who is curious:

1. You have to boot from a rescue disc or a liveCD distro like knoppix
# resize2fs /dev/hda1

There are also options you can change if you don't want the filesystem to fill the whole partition. Read the manpages. Now mind you, this is AFTER I had already used fdisk to change the partition size. You can do the fdisk step after you resize the file system, but you should also do that while in the rescue or liveCD.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems Partitioning HD acidtone Slackware - Installation 9 02-20-2006 11:34 AM
Partitioning problems Oholiab Slackware - Installation 6 03-26-2005 08:04 PM
Partitioning problems...:( Slayer097 Linux - Newbie 6 12-29-2004 03:59 PM
Partitioning Problems Angryguy Linux - Software 3 09-09-2004 04:36 PM
Problems with partitioning in RH 8.0 Nevyn2 Linux - General 4 01-21-2003 06:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:36 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration