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 05-18-2012, 04:30 AM   #1
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
How to extend root partition in linux


Hi everyone,
Can anyone help me how can i increase my /root FROM 17G to 50G partition in centos 5.4.
[root@localhost ~]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 131 1052226 83 Linux
/dev/sda2 132 2803 21462840 83 Linux
/dev/sda3 2804 3325 4192965 82 Linux swap / Solaris
/dev/sda4 3326 60801 461675970 5 Extended
/dev/sda5 3326 60801 461675938+ 8e Linux LVM
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 20G 2.6G 17G 14% /
/dev/sda1 996M 39M 905M 5% /boot
tmpfs 1009M 0 1009M 0% /dev/shm
[root@localhost ~]#
 
Old 05-18-2012, 07:30 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
You might want to think about moving /home, /opt, /usr/local or whatever is using lots of space to a separate partition rather than trying to extend. If you have an open partition (or separate drive), you can do that quickly and easily; you don't want to move /usr but those are good candidates for relocation (and it's a simply entry in /etc/fstab).

[EDIT]
Forgot to include a link to an explanation of how to actually extend using LVM: http://www.linuxhomenetworking.com/w..._Disk_Capacity. Not easy.
[/EDIT]

Hope this helps some.

Last edited by tronayne; 05-18-2012 at 07:49 AM.
 
Old 05-18-2012, 04:31 PM   #3
ratotopi
Member
 
Registered: Dec 2011
Posts: 114

Rep: Reputation: 6
You can do as tronayne has written, installed new HDD and move most of the folder like /home /var /opt and make change in /etc/fstab or you can install new HDD with LVM and then move the folders so that you don't run out of space in future.
 
  


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 extend root partition on SuSE enterprise Server 11.1 PSP Linux - Enterprise 3 04-18-2012 10:43 AM
How to extend root partition? pinga123 Linux - Newbie 1 06-01-2011 12:08 AM
how to extend linux partition? hariharan.83 Linux - Newbie 3 05-05-2009 11:58 AM
Extend Linux partition sanjee Linux - Server 1 11-17-2008 04:05 AM

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

All times are GMT -5. The time now is 02:17 PM.

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