LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 09-22-2006, 12:15 PM   #1
mr_mightyman
LQ Newbie
 
Registered: May 2006
Location: Chi-Town, IL
Distribution: CentOS, Debian
Posts: 7

Rep: Reputation: 0
LVM or FDISK???


Hello LQ'ers,

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."

http://kbase.redhat.com/faq/FAQ_79_3879.shtm

Thanks.
 
Old 09-22-2006, 01:26 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
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.
 
Old 09-22-2006, 02:40 PM   #3
mr_mightyman
LQ Newbie
 
Registered: May 2006
Location: Chi-Town, IL
Distribution: CentOS, Debian
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks JL,

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?

Thanks again.
 
Old 09-29-2006, 04:17 PM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Sorry missed your reply until today.

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.
 
Old 10-02-2006, 11:23 AM   #5
mr_mightyman
LQ Newbie
 
Registered: May 2006
Location: Chi-Town, IL
Distribution: CentOS, Debian
Posts: 7

Original Poster
Rep: Reputation: 0
LVM or FDISK

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.
 
  


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
Possible to change non-LVM to LVM? darthfoolish Linux - Software 2 08-01-2008 03:47 AM
weird fdisk problem (Fdisk unable to see winxp partitions) khidot Slackware - Installation 5 04-07-2007 09:26 PM
Shrinking and moving an lvm partition. (and random fdisk help) pardasaniman Linux - Software 2 08-02-2006 08:11 AM
Help on LVM! sti2envy Linux - Newbie 1 10-04-2004 06:44 AM
RH9 lvm and fdisk forgetting about hdb partitions davel75 Linux - Software 0 10-27-2003 09:59 AM


All times are GMT -5. The time now is 05:33 PM.

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