Ackim Chisha
asked on
Extend a linux Volume
I have two main partitions as below;
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-Log Vol00
100G 94G 1009M 99% /
/dev/cciss/c0d0p1 99M 13M 82M 14% /boot
tmpfs 16G 0 16G 0% /dev/shm
/dev/cciss/c0d1 404G 236G 149G 62% /DataDrive
I need to extend the size of the root partition "/" by about 60Gb to accommodate the DB size. Am not sure how to do this without losing or corrupting the data. I have seen some documentation that show with LVM, this is easy to do. But I need a step by step process with no risk.
Please help.
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-Log
100G 94G 1009M 99% /
/dev/cciss/c0d0p1 99M 13M 82M 14% /boot
tmpfs 16G 0 16G 0% /dev/shm
/dev/cciss/c0d1 404G 236G 149G 62% /DataDrive
I need to extend the size of the root partition "/" by about 60Gb to accommodate the DB size. Am not sure how to do this without losing or corrupting the data. I have seen some documentation that show with LVM, this is easy to do. But I need a step by step process with no risk.
Please help.
For future reference, putting your entire disk in the root partition is bad practice, and is just asking for trouble... especially if you have a database running on that machine.
Could you please send me output of below given commands.
pvscan
fdisk -l
and also let me know if you can put a new disk into the system or you want to use the existing disks to extented the / partision.
Regards
Umesh Panwar
pvscan
fdisk -l
and also let me know if you can put a new disk into the system or you want to use the existing disks to extented the / partision.
Regards
Umesh Panwar
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I would avoid increasing the size of the root partition and do as arnold says and follow arnolds instructions to create a separate partition for the db data, you can use the du command to give you an idea of how large the partition needs to be.
eg/
du -sm /var
J
eg/
du -sm /var
J
It is easy:
- Just create another disk over your RAID (say /dev/cciss/c0d0p4)
- Execute pvcreate : pvcreate /dev/cciss/c0d0p4
- Execute vgextend :vgextend /dev/VolGroup00 /dev/cciss/c0d0p4
- Execute lvextend (assuming the new volume is 200Gig) : lvextend +L200G /dev/VolGroup00/LogVol00
- Now you can extend the filesystem using resize2fs : resize2fs /dev/VolGroup00/LogVol00
Here are some documentation:
http://www.turnkeylinux.org/blog/extending-lvm
http://www.redhat.com/magazine/009jul05/features/lvm2/
Cheers,
K.