LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-21-2012, 03:09 AM   #1
LittleMaster
Member
 
Registered: Jun 2012
Posts: 98
Blog Entries: 1

Rep: Reputation: Disabled
How to extend /root filesystem


Hi
My /root filesystem get fulled up .I want to extend root partition using extended secondary harddisk

pvcreate /dev/sdb1

lvextend /dev/mapper/rootvg-rootVol00 /dev/sdb1
resize2fs /dev/mapper/rootvg-rootVol00.

whethere these command help me to increase /root filesystem
 
Old 11-21-2012, 03:36 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,220

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
My /root filesystem get fulled up .I want to extend root partition using extended secondary harddisk
I assume your root / partition is sitting on one of the primary partitions: the first three (3) partitions, usually sda1, sda2, and sda3.

You may extend root partition provided these requisites are met under assumed case:

--that there are LESS than Four (4) primary partitions existing including the extended partition.

--else, if there are Four (4) primary partitions, STILL there is remaining space to accommodate expansion of one partition;


Other than that you have to kill (delete) one primary partition to accommodate expansion, or shrink the extended partition (counted as primary) to open up a space.

If your root partition is a logical partition in the extended, you only need to shrink some logical partitions to accommodate needed space.

If possible do not use console disk shrinker you can easily mistake and lose important data: use gparted or any other graphic shrinker.

In all things: BACK UP FIRST.

Hope that helps.

Good luck.
 
Old 11-23-2012, 05:35 AM   #3
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 602

Rep: Reputation: 49
Quote:
Originally Posted by LittleMaster View Post
Hi
My /root filesystem get fulled up .I want to extend root partition using extended secondary harddisk

pvcreate /dev/sdb1

lvextend /dev/mapper/rootvg-rootVol00 /dev/sdb1
resize2fs /dev/mapper/rootvg-rootVol00.

whethere these command help me to increase /root filesystem
You are on the right track with the above commands. But not quite there:

1. pvcreate is OK, it would set up your new partition as a physical volume (PV) for LVM
2. PVs are not added directly to logical volumes (LVs) but rather to Volume Groups (VG). So, your next command will need to be "vgextend /dev/mapper/rootvg /dev/sdb1"
3. Then you can extend your LV by required size, such as "lvextend /dev/mapper/rootvg-rootVol00 -L+10G"
4. Last step is OK - you extend the filesystem with resize2fs to span to the new LV size
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto: Extend filesystem on root clov3rN Linux - Newbie 2 07-09-2012 08:13 AM
can i extend filesystem module in runing RHEL bharatlalgupta Red Hat 1 01-05-2010 05:04 AM
Extend filesystem in solaris thatishari Solaris / OpenSolaris 3 09-17-2009 06:23 AM
extend a logical voule with ext3 filesystem jhnsegers Red Hat 0 10-04-2004 03:56 AM
extend /home filesystem size rtmisa Linux - Newbie 6 10-10-2003 09:36 AM


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