Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > SuSE Linux Help > How to extend existing ext3 paritiion?

Forgot Password?
 SuSE Linux Help   For help and discussions related to SuSE Linux

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 01-29-2007   #1 (permalink)
Linux Newbie
 
Join Date: Feb 2006
Location: Slovenia
Posts: 161
How to extend existing ext3 paritiion?

Can someone tell, me how can I add some more unalocated space from disk to an existing ext3 partition. I am using suse 10.2. I tried to use Partitioner, but there is no such option available. Thanx for help.
arcull is offline  



Reply With Quote
Old 01-31-2007   #2 (permalink)
Linux Newbie
 
Join Date: May 2006
Location: Kansas
Posts: 187
You first need to extend the LV that it is sitting on. That can be done as follows:

# lvextend -L+1G /dev/testvg/testlv

"testvg" = volume group
"testlv" = logical volume

This will ADD an additional "1G" (one gig) to the "testlv" logical volume. After the LV has been extended, you have to extend the filesystem out over the new space. That can be done as follows:

# umount /dev/testvg/testlv
# resize2fs /dev/testvg/testlv
# mount /dev/testvg/testlv /home

Assuming that this LV is for your "/home" filesystem.
kahoona is offline   Reply With Quote
Old 01-31-2007   #3 (permalink)
Linux Newbie
 
Join Date: Jan 2007
Posts: 110
I would just run the Live CD of Gparted 3.3 or Parted Magic 1.4 to resize the partitions.
saikee is offline   Reply With Quote
Old 01-31-2007   #4 (permalink)
Linux Enthusiast
 
likwid's Avatar
 
Join Date: Dec 2006
Location: MA
Posts: 649
Assuming he is even using LVM...
likwid is offline   Reply With Quote
Old 01-31-2007   #5 (permalink)
Linux Newbie
 
Join Date: May 2006
Location: Kansas
Posts: 187
Quote:
Originally Posted by saikee
I would just run the Live CD of Gparted 3.3 or Parted Magic 1.4 to resize the partitions.
If you use a 3rd party "Live" CD, you would have to bring down the entire system. Doing it via LVM with the commands I mentioned above would be way faster and there would be no server downtime.
kahoona is offline   Reply With Quote
Old 01-31-2007   #6 (permalink)
Linux Enthusiast
 
likwid's Avatar
 
Join Date: Dec 2006
Location: MA
Posts: 649
Quote:
Originally Posted by kahoona
If you use a 3rd party "Live" CD, you would have to bring down the entire system. Doing it via LVM with the commands I mentioned above would be way faster and there would be no server downtime.
What makes you so sure that he's using LVM to begin with? If he's not, he needs to increase the size of the partition first, and then run resize2fs.
likwid is offline   Reply With Quote
Old 02-01-2007   #7 (permalink)
Linux Newbie
 
Join Date: Feb 2006
Location: Slovenia
Posts: 161
Thanx for replies guys. I thought noone knows the answer to this problem at first It is true, I don't use LVM, and as far as I know I can't create it once the system is installed. So I gues, I will have to use that mentioned tools. Thanx again for your time.
arcull is offline   Reply With Quote
Old 02-01-2007   #8 (permalink)
Linux Enthusiast
 
likwid's Avatar
 
Join Date: Dec 2006
Location: MA
Posts: 649
If your / already resides on regular partitioning, I know of no way to convert this to LVM short of backing up your files, wiping the drive, setting it up as LVM, and restoring your files.

If you are comfortable using command line utilities, open fdisk on the drive. Take note of where the partition you want to extend starts. Delete the partition. Recreate it at the same starting point, but extend the ending point into the free space you have. Now when you go back into your system, if you run
Code:
resize2fs /dev/xxxX
where xxxX is the drive and partition number, resize2fs will automatically extend the filesystem into the free space in the partition. This is all outlined in man pages, I believe the resize2fs man page. If you are not comfortable performing this, use the GParted bootdisk already mentioned in this thread.
likwid is offline   Reply With Quote
Old 02-02-2007   #9 (permalink)
Linux Newbie
 
Join Date: Feb 2006
Location: Slovenia
Posts: 161
Thanx again guys.
arcull is offline   Reply With Quote
Old 02-02-2007   #10 (permalink)
Linux Newbie
 
Join Date: Jan 2007
Posts: 110
likwid,

Your method of extending the partition, first by deleting it, then recreate it bigger starting at the same point of the hard disk and then using resize2fs sounds interesting.

Presumably the filing index is just being expanded using the same inode size without affecting the existing tracking system and the files inside.

Just wonder how reliable this method from your experience. I could keep on reading the man pages but it would be interesting to know the results in practice.
saikee is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 06:15 AM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1