LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-11-2005, 07:07 AM   #1
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Rep: Reputation: 15
Question Migrating single drive to RAID / LVM?


Hi all,

Its a while since I posted to these forums, but I have been an active reader! I am now a Network Manager at a different company and can try and get the company to convert some (if not all) of their systems away from M$ ... with a little help from you guys

Anyway,

My system:
Compaq Proliant 6000
Quad 400MHz Pentiums CPUs
2Gb RAM
Compaq Array Controller 3500 (i think)
Single 9.1Gb SCSI 10,000rpm disk
SUSE 9.2 (kernel 2.6.8-24-smp)

Project:
Install a stable and resilient Linux installation to use as a platform to host VMware (and a few hosts - Linux and Windows). Its going to be a monitoring server / SNORT / IDS / Firewall etc.etc.

What I have done so far:

Phase 1:
I have (finally) successfully installed SUSE 9.2 onto the box using most of the defaults. I have added a couple of NIC cards to allow more functionality in VMware.

# Output from fdisk –l
Disk /dev/ida/c0d0: 18.1 GB, 18194841600 bytes
255 heads, 63 sectors/track, 2212 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/ida/c0d0p1 1 129 1036161 82 Linux swap / Solaris
/dev/ida/c0d0p2 130 1105 7839720 83 Linux


# Output from fstab
/dev/ida/c0d0p2 / reiserfs acl,user_xattr 1 1
/dev/ida/c0d0p1 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/cdrom /media/cdrom subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs fs=floppyfss,procuid,nodev,nosuid,sync 0 0


Phase 2:
I added a second 9.1Gb SCSI disk, ran the Compaq Smartstart Array configuration, extended the array and migrated the array to RAID 1+0 (mirror).
Rebooted and checked that SUSE was still working.


Phase 3:
I added a third 9.1Gb SCSI disk, ran the Compaq Smartstart Array configuration again, extended the array and migrated the array to RAID 5.
Rebooted and checked that SUSE was still working.
At this point I also checked the disk space and found it to still be 9.1Gb. After migrating to RAID 5 it should be 18.2Gb. However when I run YAST ~ System ~ Partitioner the extra space is recognised:

Device Size Type Mount Start End
/dev/ida/c0d0 16.9Gb SMART Array 0/0 0 4354
/dev/ida/c0d0p1 1012 Mb Linux swap swap 0 253
/dev/ida/c0d0p2 7.4Gb Linux native / 254 2174
Note: the 16.9Gb


Question/Problem:
I would like to use this extra space, and possibly add additional disks at a later date.


Solution:
1. Erase everything, and setup the partitions with the full 16.9Gb used (don’t really want to go down this route)
2. Create extended partition and mount the drive into a folder on the existing / (I don’t think this is going to use the resilience of the Compaq Raid Array)
3. Extend the initial 9.1Gb to cover the 3x 9.1Gb disks (i.e. use the RAID array as it should be. If one drive fails, the server continues. You replace the faulty drive, and the Array rebuilds the data from the other functioning drives aka RAID 5)

I have fiddled with the SUSE partitioner and LVM and RAID partitions (am I right in saying that creating a RAID partition here is a ‘software’ RAID solution?).
I ‘think’ I need to go down the route of using LVM, but am unsure if:
a) this is the correct way of doing what I want to do
b) will allow me to expand the array later if I add another disk
c) allow me to keep the existing installation and ‘migrate’ it to a LVM

Over to the experts.

Joadoor

PS. Sorry for the long post.
 
Old 10-11-2005, 07:41 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
RAID done from the OS is indeed "software RAID". If it were "hardware RAID" you'd see it as a single disk within the OS.

If your desire is to maximize the amount of space you can use LVM is a good choice for that. If however your desire is to protect the data by doing mirroring or striping with parity blocks then you need to do RAID.

LVM is not really a RAID manager. It simply concatenates drives or partitions into volume groups (VGs) which can be thought of as logical disks which can be subdivided into logical volumes (LVs) which can be thought of as logical partitions of the VG. You can make one large VG or multiple VGs and each VG can have a single LV or multiple LVs. You can not make LVs that span multiple VGs though. Also LVM can be laid out on top of RAID (this is quite common in large commercial environments.)

man lvm should give you more details of that.

I haven't setup software RAID (we do mostly hardware) here but one of my older installs does have software RAID on Linux so I'd looked at it breifly. My notes on that may help you:

Did research on /dev/md* devices seen on hosts. These are software
RAID1 (mirror) devices. fdisk doesn't work on them. Found info that
indicates they are described in /etc/raidtap. Man pages regarding
mkraid, raidstart & raidstop exist. Also found good post talking about
this:
http://www.linuxquestions.org/questi...hreadid=352756
Original question there talks about mdadm but no such command here.
Maybe it is something in newer versions of the raid stuff but it doesn't
seem necessary based on my read of the post and the man pages.
 
Old 10-11-2005, 08:01 AM   #3
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
Thanks jlightner for the quick response!

So I am not looking at doing Software RAID. That leaves me with the hardware RAID using the Compaq Smart Array and possibly LVM. Ok.

So, how do I go about expanding my current configuration:

/dev/ida/c0d0 16.9Gb SMART Array 0/0 0 4354
/dev/ida/c0d0p1 1012 Mb Linux swap swap 0 253
/dev/ida/c0d0p2 7.4Gb Linux native / 254 2174

to a desired configuration of:

/dev/ida/c0d0 16.9Gb SMART Array 0/0 0 4354
/dev/ida/c0d0p1 1012 Mb Linux swap swap 0 253
/dev/ida/c0d0p2 7.4Gb Linux native / 254 4354 <-

??

When I choose 'resize' in the partition manager, it only allows me to reduce the 7.4Gb down and not up (to 16.9Gb).

Or... is this not the correct way?

You mention 'LVM can be laid out on top of RAID (this is quite common in large commercial environments)'
I am in a commercial environment and guess this is what I want/need to do.

How do I go about converting to LVM?

Is this possible:
- create a 'LVM' in the remaining 9gb space,
- transfer the existing install to the new LVM,
- remove the old c0d0p1 and c0d0p2 partitions,
- move the LVM to the beginning of the Array,
- expand the LVM to the full 16.9Gb?

Or am I talking rubbish!

NB: what does the ida in /dev/ida/c0d0 stand for? Integrated Drive Array? <-guess
 
Old 10-14-2005, 07:01 AM   #4
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
Success! (I think)

I think I have solved my problem.

- Expanded the Hardware RAID array using the Compaq SmartStart CD
- Downloaded a Linux Rescue CD, and rebooted the server
- Used PARTED to resize the 2nd partition upto the maximum available
- Rebooted into the newly expanded SUSE installation, and tested
- It worked!

Hope this helps other people in a similar situation.

Joadoor
 
  


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
migrating windows raid to linux sigmaes Linux - Hardware 1 11-05-2005 03:45 PM
using LVM for single hard drive csfalcon Linux - Hardware 2 02-17-2005 11:17 AM
Migrating to kernel 2.6 and LVM Borelian Linux - Software 0 05-12-2004 09:43 AM
Migrating to Software RAID waster Linux - General 3 04-29-2004 09:30 AM
lvm and raid wlfdgcrkz Linux - Software 15 05-05-2003 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:22 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
Open Source Consulting | Domain Registration