How to RESIZE / root partition in RHEL5 (VM)?


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to RESIZE / root partition in RHEL5 (VM)?
# 1  
Old 10-18-2010
How to RESIZE / root partition in RHEL5 (VM)?

Hi Team,

Require your expertise on how to resize / partition.
This is VM.

Thank you.
Reggy

Code:
[root@pluton01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              15G   13G  556M  96% /
/dev/sda1             965M   43M  873M   5% /boot
tmpfs                 502M     0  502M   0% /dev/shm
/dev/mapper/rhelvm-home
                       30G  185M   28G   1% /vol/home
/dev/mapper/rhelvm-backup
                      9.4G  6.0G  3.0G  67% /vol/backup


[root@pluton01 ~]# fdisk -l

Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         127     1020096   83  Linux
/dev/sda2             128        2039    15358140   83  Linux
/dev/sda3            2040        2676     5116702+  82  Linux swap / Solaris
/dev/sda4            2677        7832    41415570    5  Extended
/dev/sda5            2677        7832    41415538+  8e  Linux LVM

Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2610    20964793+  8e  Linux LVM


Last edited by Scott; 10-24-2010 at 05:17 PM.. Reason: Please use code tags
# 2  
Old 10-18-2010
You have some other options:

What is your file system layout like?

Is the VM mapped to a physical block device or a file acting as one?

One thing to consider is that you can boot a recovery disk or something like a rescue CD image after presenting another disk or disk image and move /var /usr and /tmp to there. Those file systems tend to do well on their own partitions.

The way to go about this would be to present additional disk devices and then, from the system, modify the /etc/fstab file to point to the new devices. But, before you allow them to be mounted, I would suggest you rsync each directory to its new location. Once you have mounted the new location over the directory, the contents of those original directories will be inaccessible.

Last edited by mark54g; 10-18-2010 at 11:15 PM.. Reason: adding clarity
# 3  
Old 10-19-2010
Take a look at this guide:

CentOS 5 - Resizing a Partition

You may want to create an LVM though. That way you will be able to resize the partition/filesystem online next time you run out of space.
# 4  
Old 10-19-2010
You might also find it useful to check out what's eating all your space.
# 5  
Old 10-21-2010
The partition that is to be resized must be unmounted when we do the resizing; obviously this is not possible if this is the partition that holds all important system files . Therefore we download a Live Linux-CD such as Knoppix from which we boot later on (if you have physical access to the system). If it is a remote system that you don't have physical access to, you need a rescue system on that system (a lot of hosting companies offer dedicated servers with rescue systems nowadays) that you can boot into (instead of Knoppix), and this rescue system must have the following tools: fdisk, umount, fsck, tune2fs, e2fsck, resize2fs.

for more details visit : How To Resize ext3 Partitions Without Losing Data | HowtoForge - Linux Howtos and Tutorials
# 6  
Old 10-24-2010
If you kernel is newer than 2.6.10 you can online resize ext3 fs. Check man page command resize2fs.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Resize partition volume

Hello, I am running ubuntu 14.04. Have just installed torrent into home directory but /dev/md2 is almost full. Is it possible to resize md2 to get rid of any problem that may arise in the near future? Filesystem Size Used Avail Use% Mounted on udev 17G 4.1k 17G 1% /dev... (2 Replies)
Discussion started by: baris35
2 Replies

2. Red Hat

Resize Linux partition

Hello., Could any one please share the informaiton about this or please point me the reference : Assume, we have the following partition after linux machine is setup, it will mention like this : bash$ df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda2 10G... (3 Replies)
Discussion started by: alnhk
3 Replies

3. SCO

Resize root partition

I have SCO Openserver 5.0.5 Root partition is 96% full and I would like to make it bigger. How can this be done? 1) Can I use 'dd' to backup 'root' and then backup '/u' to a third hard disk, then divvy the primary hard disk to have a larger 'root' filesystem (i.e. previous root + u) 2) ... (5 Replies)
Discussion started by: grips03
5 Replies

4. Solaris

Need to partition root

Hello guys, I am using Solaris 10 x86 OS. While installing OS i have allocated entire 10 GB space to the root. Now i am not able to create new partition it says me "out of range" or "<cylinder number> not expected". Can someone please help me to allocated a default recommended space i.e 8GB or... (2 Replies)
Discussion started by: bhargav90
2 Replies

5. Red Hat

required resize /boot partition in linux

Hi, In my linux box I have installed /boot partition with 100MB. I have done compile for a newer kernel. The both kernels are required to me. Finally /boot partition has using 100%. I need to resize the /boot. Any body give the solution how to do resize the /boot partition without dusturbing the... (2 Replies)
Discussion started by: parsrigum
2 Replies

6. SCO

Partition Resize / Creation

Hello, I'm new to SCO and I require some help... I have an OLD HD which is about to die and I want to replace it with a new HD. When I clone the HD with either Acronis or Ghost it wont allow me to resize the UNIX partition and I'm stuck with 80% of the new drive as unused space. I... (7 Replies)
Discussion started by: dochost
7 Replies

7. SuSE

Resize Root Filesystem in SUSE Linux

Hello Experts, I am very new to unix environment. Root filesystem in one of our Linux boxes has almost reached 100%. is there a procedure/ way to resize the root filesystem. ****************************************************** ld8331:/ # df -h|more Filesystem Size Used... (2 Replies)
Discussion started by: ashok1784
2 Replies

8. SCO

SCO 5.0.6 how to partition resize in HTFS?

I have a 17GB SCSI disk in an SCO 5.0.6 server and it's running out of space because of a growing database on the disk. Consequently I would like to upgrade the 17GB to a 74GB disk and extend the partition. First off, is partition extension available under HTFS - I know this is an old... (1 Reply)
Discussion started by: carribey
1 Replies

9. UNIX for Dummies Questions & Answers

Resize root disk slices

I have a Sun box running Solaris 9. My root disk was slices too small when it was installed and I am now at 99% capacity for my root partition. Is it possible, and if so how?, to increase the size of slice 0 and decrease the size of slice 7?? Thanks! Current partition table... (6 Replies)
Discussion started by: FredSmith
6 Replies

10. UNIX for Advanced & Expert Users

Resize FREEBSD 5.4 partition

Experts, I am trying to repartition my FreeBSD partition to accomodate 1GB of DOS partition so that I can have the samba share support. I wanted to know the procedure to resize an exsiting FreeBSD partition. Thanks in advance for your help. Regards, Jim (1 Reply)
Discussion started by: jimmynath
1 Replies
Login or Register to Ask a Question