Operating System - Linux
1829816 Members
1665 Online
109993 Solutions
New Discussion

Re: how to increase / in Linux RH ENT 4.0

 
SOLVED
Go to solution
kenken_3
Regular Advisor

how to increase / in Linux RH ENT 4.0

Hello,

currently I need to increase the space for my / mount point which is /dev/rootvg/lvol00. the file system is ext3 and I have LVM.

Could I have the safer way to do this?

thanks
wang & wang
10 REPLIES 10
kenken_3
Regular Advisor

Re: how to increase / in Linux RH ENT 4.0

it looks it is not possible without third party tools to increase / (root) mount point.

how about /usr?

thanks
wang & wang
Steven E. Protter
Exalted Contributor

Re: how to increase / in Linux RH ENT 4.0

Shalom,

You could use http://www.acronis.com to back up the system to image and try the resize option when restoring it.

You are right about root.

For /usr

lets say /usr is lvol2

Lets say the new disk device, set up in fdisk is /dev/sdb2

pvcreate /dev/sdb2
# may need -f or -ff
vgextend vg_name /dev/sdb2
lvextend -L 6000M /dev/vg_name/lvol2 /dev/sdb2
ext2online /dev/vg_name/lvol2

The lvextend extends to 6000M. You can also specify in GB.

ext2online was deprecated and removed from FC6 and Red Hat 5. resize2fs does the same job with the same command syntax in those releases. I've personally confirmed this fact.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: how to increase / in Linux RH ENT 4.0

>> It looks it is not possible without third party tools to increase / (root) mount point.

Not true. I did increase the root paritition without any problems more than one time.

If you have free space in your volume group, you can do it by extending the logical volume using lvextend and then extending the filesystem with ext2online.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Court Campbell
Honored Contributor
Solution

Re: how to increase / in Linux RH ENT 4.0

# lvextend -l + /dev/rootvg/lvol00

# ext2online /

ex. add 1G to /

# lvexnted -L +1G /dev/rootvg/lvol00
# ext2online /

I do not believe that / on linux has to be in a contiguous space like on HP-UX.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: how to increase / in Linux RH ENT 4.0

Typo.

this

# lvextend -l + /dev/rootvg/lvol00

should be this

# lvextend -L + /dev/rootvg/lvol00
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: how to increase / in Linux RH ENT 4.0

It was already mentioned, but you need to make sure you have free extents in the volume group before you extend the logical volume.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
dirk dierickx
Honored Contributor

Re: how to increase / in Linux RH ENT 4.0

Indeed, there should be no problem extending / on linux if you're using LVM.

Unless, / contains /boot. that could be a problem then.
kenken_3
Regular Advisor

Re: how to increase / in Linux RH ENT 4.0

Court,

Thank you for your response.

Have you tried it for the / (root) mount point. I tried other mount points without any problem.

As for this /, I am not very sure. want to ask it before I tried it out.

if it is safe to do it, I will try it.

thanks
wang & wang
Ivan Ferreira
Honored Contributor

Re: how to increase / in Linux RH ENT 4.0

>>> As for this /, I am not very sure. want to ask it before I tried it out.


As I say it before, I did it more then one time. It works and it's safe.

If you are unsure, install a test machine and try it first. You can install on a virtual machine like vmware.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Court Campbell
Honored Contributor

Re: how to increase / in Linux RH ENT 4.0

Yes, it works fine.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"