LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 01-11-2006, 11:52 AM   #1
atman1974
LQ Newbie
 
Registered: Sep 2005
Posts: 4

Rep: Reputation: 0
RHEL 3: Steps of expanding file system (add new SCSI disks) to existing SW RAID & LVM


Hello,

I have a Linux server installed with RHEL 3, with Software RAID-1 & LVM enabled. Now I need to add new SCSI disks to increase the file system space. Here are the steps I want to follow (after checking the SW RAID howto, LVM howto & this site). But because the server is stored with important data and I want to make sure these steps are the right ones. So I post here and ask for your help to double check it.

Thanks in advance.

!!! Backup the important data in case something goes wrong.

#poweroff

Add two new (same size) SCSI disks & Power up

There should be devices /sdc /sdd

#fdisk /sdc
to create partition /sdc1 with 0xfd type
#fdisk /sdd
to create partition /sdd1 with 0xfd type

#more /etc/raidtab
There are already two RAID-1 devices, /dev/md0 & /dev/md1, in the system, so the next RAID device should be /dev/md2.

#mdadm --create --verbose /dev/md2 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1

This is the step I'm not 100% sure. Could this command destroy my original data on the other two RAID-1 devices?

#mdadm --detail /dev/md2
#mdadm -E /dev/sdc1

Do I need to restart the system here or not?

The following steps are just following the LVM howto. (RAID is my VG name, /dev/RAID/Home is the file system I want to grow.)

#/sbin/pvcreate /dev/md2

#/sbin/vgextend RAID /dev/md2

#/sbin/vgdisplay RAID

#/sbin/lvextend +150000 /dev/RAID/Home /dev/md2

#/sbin/lvdisplay /dev/RAID/Home

#umount /dev/RAID/Home

#export E2FSADM_RESIZE_CMD=ext2resize

#e2fsadm /dev/RAID/Home -L+150G

#mount /dev/RAID/Home

It should be finished here. There is one last question though. From the vgdisplay command, I found that LV has a limit of 255.9GB space. But according to the LVM howto, LV should have 2 (or 1) TB max space in one single LV (kernel 2.4). Can I change my LV max size to 2TB or not? If yes, how should I do it?

Many thanks.
 
Old 01-12-2006, 12:51 PM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
If you plan to do this from your RHEL3 installation, then you will need to reboot after creating the partitions using fdisk.

You will get a message from fdisk telling you that linux is using the old partition tables. If you try to create the raid without rebooting, then you should get an error message stating that the partitions donít exist. You should be able to complete all remaining steps without rebooting.

Since you appear to be using LVM1 (2.4 kernel) which I have not worked with, Iím not going to make any comments about your proposed LVM modifications, as my LVM2-based advice might be wrong.
 
Old 01-12-2006, 10:49 PM   #3
atman1974
LQ Newbie
 
Registered: Sep 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for reply. As a matter of fact, I had already taken my own risk and go ahead without overseeing by an expert eye, which had been proved not a good approach!

I did not have the problem you mentioned, because the two disks actually have been partitioned before (exactly the same partition I want except the type is not "0xfd" but "0x83"). I changed the type and go ahead with the creation of RAID. The system did not complain.

The RAID & LVM creation seems fine untill the last step,
Quote:
#e2fsadm /dev/RAID/Home -L +150G
It gave error message:
Quote:
# e2fsadm --size +150G LogicalVolumePath
# e2fsadm -- new size too large for "LogicalVolumePath"
# e2fsadm -- size of "LogicalVolumePath" would be invalid
I guess this is a typical newbie error who did not read the howto carefully enough. I already did the LV extention and then e2fsadm will try to do that again. By google search, I understood my mistake and everything is settled now.

Thanks anyway.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RAID/LVM setup with existing drives juu801 Linux - General 3 07-06-2005 01:35 AM
Resize existing and add another partition with LVM donv2 Linux - Newbie 3 04-27-2005 05:23 AM
Setting up RAID 0 with 3 SCSI disks forrest44 Slackware 1 03-03-2005 04:43 PM
Manage disks on an existing system with LVM doris Linux - Hardware 1 03-02-2005 03:37 PM
add software raid-1 to existing system hoover93 Linux - Hardware 1 10-07-2003 11:52 AM


All times are GMT -5. The time now is 08:42 AM.

Main Menu
Advertisement
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