Red HatThis forum is for the discussion of Red Hat Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I manage several RHEL 3 & 4 servers that were already in production when I got here. There are 3 filesystems that are now at approximately 80% capacity each totaling 350GB. The problem is, is that the filesystems were not created using LVM. What is my best option in extending these filesystems? I found this article on Redhat's KB but, as my manager puts it, that's like doing "Disk Surgery."
I guess the question you need to answer first is do you actually have any room that ISN'T already in a partition on the disk? If not then neither fdisk nor LVM is going to help. That is to say if you used up all the partition space on the disk during the original load (e.g. made one huge root filesystem, one boot and one swap device) then your expansion would require adding a new disk.
You can then use either LVM or fdisk partitioning to layout the new disk the way you want it.
If you DO have space not already in a partition on the disk then you would need to do what the link says if you want it to remain that way. Another option would be to create a new partition using the remaining space then putting that partition and the original partition into an LVM Volume Group (VG) and make a single logical volume (LV) out of that space which you mkfs and mount. Of course before doing that you would need to back up what is on the existing partition and restore it afterwards so you really wouldn't be saving much. Also it would add another bit of complexity to your system.
I forgot to mention that the current filesystems are fibre attached to our EMC Clariion SAN, therefore space is not an issue. Should I then, just back everything up, remove the current filesystem layout, and then create the VG? Or is FDISK still an option?
It depends on how you present the storage to the host. For example on our Clariion on SAN to our RHEL 3 we present several LUNs (from the Clariion's perspective) which are seen as "disks" from the RHEL perspective (e.g. /dev/sdb, /dev/sdc, /dev/sdd etc...). You can do different partitions of each of these "disks". You can combine each of these "disks" (or even partitions thereof) into a single volume group.
One thing I'm hearing is that when you delete a path (LUN or real disk) that Linux will actually reorder them in the next boot so that if you had say sda, sdb, sdc, sdd and sde then removed sdb on the next boot sdc would become sdb, sdd would become sdc, sde would become sdd. We're actually in the middle of a project with EMC because we're using an Oracle RAC environment and need to know how to deal with this when we migrate from one CX700 to another. (We're concerned about world wide names as well.)
So long as you don't actually remove any of the LUNs presented to the host the above shouldn't be an issue for you. One would hope it wouldn't reorder newly presented LUNs but rather add them after the ones already there. Given that I would probaly make a VG and LV using currently unallocated partions or "disks" (LUNs) and copy the data there. I'd then just change fstab to mount that new LV with the same mountpoint as the original partition or LV had used. I would NOT delete the LUN that the original was on except from /etc/fstab.
After you've verified the new mount is working you can reclaim the original space by adding it to your new VG with vgextend (removing it from old VG if it was in one.
Ok, here's a better example. Our filesystem layout is as follows:
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p1 9.9G 5.5G 3.9G 59% /
none 2.4G 0 2.4G 0% /dev/shm
/dev/cciss/c0d0p3 5.0G 148M 4.6G 4% /var
/dev/emcpowerc1 9.9G 77M 9.3G 1% /var/whatever
/dev/emcpowerf1 9.9G 2.9G 6.6G 31% /log
/dev/emcpowerd1 99G 79G 16G 84% /data/(filesystem to be extended)
/dev/emcpowerb1 20G 524M 19G 3% /data/
/dev/emcpowera1 99G 77G 18G 82% /data/(filesystem to be extended#2)
/dev/emcpowere1 148G 126G 16G 90% /data/(filesystem to be extended#2)
/dev/emcpowerg 9.9G 354M 9.0G 4% /applications
I need to extend the filesystems that are highlighted. What is the more effective way of doing it? Should I destroy the current filesystem layout and re-create using LVM and do a restore or is there an easier way of doing this that I don't know about. The 3 new LUNs have already been presented to the server. Thanks again.