LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-14-2009, 10:42 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
Is it possible to increase the size of the / partition?


Is it possible to increase the size of the / partition?

TIA
 
Old 12-14-2009, 11:01 PM   #2
bit-head
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Rep: Reputation: 0
Yes if you have another partition you can sacrifice a/o you have free space on the disk. Partitions should be contiguous so it really depends on your current situation. Its tricky and surgical. You have to know how to use fdisk but I have done it before. Its just a matter of redefining the end point. I have a default partitioning scheme on my home Centos5.4 server:

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 9729 78043770 8e Linux LVM


Theoretically you should be able to extend the "End" block by redefining the partition table by deleting the '/' partition (in my case /dev/hda2), and redefining it using the same "Start" and extending the "End". This is VERY RISKY however and I would not reccomend it. You would then write the partition table to the disk and exit WITHOUT reformatting the partition (e.g. without running mke2fs). This is all assuming the entire disk is already formatted with the same filesystem as the existing '/' partition. This is VERY RISKY and I would only reccomend that on the most dire of circumstances. I reccomend rsync'ing the root partition off to a temp space, reformatting the drive you want to change and then rsync'ing everything make, its a bit safer.

My two cents.

- Ben
 
Old 12-15-2009, 01:02 PM   #3
kschmitt
Member
 
Registered: Jul 2009
Location: Chicago Suburbs
Distribution: Crux, CentOS, RHEL, Ubuntu
Posts: 96

Rep: Reputation: 23
Quote:
Originally Posted by abefroman View Post
Is it possible to increase the size of the / partition?

TIA
If you aren't using LVM for /, you can boot into a live distro or a utility distro that contains gparted. The last time I had to do this I just booted into the live ubuntu CD, and that worked OK.

Actually, since it's the root partition, you probably need to do this from a live-distro or util-distro anyway.
 
Old 12-15-2009, 01:06 PM   #4
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by kschmitt View Post
If you aren't using LVM for /, you can boot into a live distro or a utility distro that contains gparted. The last time I had to do this I just booted into the live ubuntu CD, and that worked OK.

Actually, since it's the root partition, you probably need to do this from a live-distro or util-distro anyway.
This is an LVM (XEN)
 
Old 12-15-2009, 02:02 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
"/" is not a partition---it is a node in the filesystem tree. Block devices (either partitions or whole drives) get mounted at various places on the tree---including root.

As already stated, you can increase the size of any partition as long as there is room adjacent (or room can be created)

Run "fdisk -l" for a definitive answer.
 
Old 12-15-2009, 02:05 PM   #6
kschmitt
Member
 
Registered: Jul 2009
Location: Chicago Suburbs
Distribution: Crux, CentOS, RHEL, Ubuntu
Posts: 96

Rep: Reputation: 23
Quote:
Originally Posted by abefroman View Post
This is an LVM (XEN)
Ahh. No.

LVM as in Logical Volume Management.

Not LVM as linux virtual machine

So if it's a VM, you first need to make the file it's using as it's disc bigger, if necessary. I've got no idea how to do that with Xen, but it's usually pretty easy. Then boot the vm into some sort of live distro and expand your partitions, or logical volumes. Then expand the filesystem to the new size. If you're lucky your util-distro has a new enough gparted package that it will do all this for you. If not it's not to hard to do by hand.
 
  


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
How to increase partition size? Uday123 Linux - Software 3 01-24-2010 07:28 PM
Increase / partition size Uday123 Linux - Software 1 09-30-2009 12:58 AM
Increase Partition Size shifflav Linux - Newbie 5 02-26-2009 09:09 PM
Increase partition size bmstephan Linux - Newbie 3 01-08-2009 11:31 PM
tricky backup of Linux system to NTFS partition to increase partition size Pandarsson Linux - General 5 07-09-2008 02:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:35 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