LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-28-2014, 06:05 AM   #1
J.L.
LQ Newbie
 
Registered: Feb 2011
Location: Nantanz
Distribution: RH
Posts: 6

Rep: Reputation: Disabled
Question RHEL 5 on Dell H/W - LVM commands, RAID 0, disk error, filesystem recreate.


A logical volume/filesystem question. I'm rather new to Linux, but know a particular UNIX rather well.


There is a volume on a RHEL 5 system consisting of a number of disk drives arranged in RAID 0 configuration.

One of the disks becomes unusable.

What is the best way of restoring filesystem functionality on the remaining drives (with reduced capacity)?

Note: Outage is (obviously!) expected. There are no data considerations to worry about.
 
Old 08-29-2014, 10:36 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by J.L. View Post
A logical volume/filesystem question. I'm rather new to Linux, but know a particular UNIX rather well.
Which one????
Quote:
There is a volume on a RHEL 5 system consisting of a number of disk drives arranged in RAID 0 configuration. One of the disks becomes unusable.

What is the best way of restoring filesystem functionality on the remaining drives (with reduced capacity)? Note: Outage is (obviously!) expected. There are no data considerations to worry about.
You back up your data, period. RAID 0 has no redundancy, so if you're getting errors, you will lose the entire array.
http://en.wikipedia.org/wiki/RAID#Standard_levels

You don't say if this is a hardware or software RAID setup, so it's hard to provide specific advice. Also, RHEL 5 is old...the last supported version is 5.9, I believe. If you're having hardware problems, now would be an EXCELLENT time to upgrade the system to the latest 7, since you've got hardware to fix, and are obviously going to have an outage anyway.
 
Old 09-02-2014, 06:26 AM   #3
J.L.
LQ Newbie
 
Registered: Feb 2011
Location: Nantanz
Distribution: RH
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Which one????

You back up your data, period. RAID 0 has no redundancy, so if you're getting errors, you will lose the entire array.
http://en.wikipedia.org/wiki/RAID#Standard_levels

You don't say if this is a hardware or software RAID setup, so it's hard to provide specific advice. Also, RHEL 5 is old...the last supported version is 5.9, I believe. If you're having hardware problems, now would be an EXCELLENT time to upgrade the system to the latest 7, since you've got hardware to fix, and are obviously going to have an outage anyway.
a) Solaris.

b) i) I don't care about the data. ii) Hardware.

It's just a question about how to resume operations using a (somewhat slower) 3-disk stripe when a failure occurs. A new disk would be ordered, of course, but it would be nice to get something working before it arrives (probably about 5 hours from time of putative failure).

Last edited by J.L.; 09-02-2014 at 06:29 AM.
 
Old 09-02-2014, 10:13 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by J.L. View Post
a) Solaris.
Then you know a 'real' unix, and not something like AIX. It should be pretty easy for you to get around in Linux.
Quote:
b) i) I don't care about the data. ii) Hardware.

It's just a question about how to resume operations using a (somewhat slower) 3-disk stripe when a failure occurs. A new disk would be ordered, of course, but it would be nice to get something working before it arrives (probably about 5 hours from time of putative failure).
You don't. As said, RAID0 provides ZERO redundancy. If you lose a disk, you lose the array, period. There is nothing that holds parity or provides a hot failover. You would resume normal operations after restoring your backup to whatever new array you build.
 
Old 09-02-2014, 08:41 PM   #5
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
Taking your question at face value, to get back up and running with the drives that are working, all you need to do is partition and format the new RAID entity. You can use parted or fdisk or cfdisk or Gnome Disks (GUI) for that, and it should just work:

1. Find the device node for the drive using dmesg.
2. Assuming the drive is at /dev/sdb, partition it:
Code:
parted /dev/sdb mklabel msdos
3. Get total size of disk:
Code:
parted /dev/sdb print | grep Disk
4. Assume the drive is 500G. Create a partition spanning entire disk:
Code:
parted /dev/sdb mkpart primary 1 500000
5. Create filesystem:
Code:
mkfs.ext4 -L my500drive /dev/sdb1
Done.

But given that you specifically state that this is an LVM question, maybe you are asking how to get LVM running, using this hardware-RAIDed array as part of the storage pool, because you intend to expand it later. In that case, do something similar, but with LVM commands so that your RAID drive becomes part of your logical volume space:

1. Mark your drive as available for inclusion into your storage pool:
Code:
pvcreate /dev/sdb1
2. Create a volume group to include your drive:
Code:
vgcreate mygroup /dev/sdb1
3. Create a logical volume within this storage pool:
Code:
lvcreate -L500G -n myfilestorage mygroup
4. Create a filesystem on it:
Code:
gfs_mkfs -plock_nolock -j 1 /dev/mygroup/myfilestorage

Hope that helps.
 
Old 09-05-2014, 07:59 AM   #6
J.L.
LQ Newbie
 
Registered: Feb 2011
Location: Nantanz
Distribution: RH
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi, thanks for that, it got me on the right track.

I removed the volume, to re-RAID the drives to use only the outer cylinders of the disks, as a test (performance etc.):

480 umount -f /fs2
482 vgdisplay
483 vgremove VolGroup02
485 pvscan
486 pvremove /dev/sdc1

The H/W RAID person did (whatever), which involved a reboot for some reason.

Unfortunately, I had forgotten to remove /fs2 from the fstab, so the system complained after booting, and I had to edit the fstab:


489 grep fs2 /etc/fstab
490 mount -o remount,rw /

vi /etc/fstab....)

The filesystem was then re-created:


491 pvscan
492 fdisk /dev/sdc
493 ls /dev/sdc1
494 pvcreate /dev/sdc1
495 vgcreate VolGroup02 /dev/sdc1
497 lvcreate -n LogVol00 -l 100%FREE VolGroup02
498 lvdisplay
499 mkfs -t ext4 /dev/VolGroup02/LogVol00


And that was that! Perhaps I'll be able to refine this and script it up, and also find out about the H/W RAIDing.
 
Old 09-05-2014, 08:02 AM   #7
J.L.
LQ Newbie
 
Registered: Feb 2011
Location: Nantanz
Distribution: RH
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
If you lose a disk, you lose the array, period.
Thank you - but I don't care about the data at all.

It looks as though I have the start of a workable procedure.

Now, if "swapoff" wasn't so very, very ss-l-o-w! But that's a topic for another time...
 
  


Reply



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
[SOLVED] Slackware 12.1 + RAID 1 + LVM: Can't boot with or without encrypted filesystem gargamel Slackware 29 08-04-2011 06:19 AM
Existing LVM filesystem to software RAID 0 (mirroring) hellowe Linux - Server 8 11-25-2009 07:28 AM
Fedora8 installed on Software Raid+lvm will not start (GRUB Hard Disk Error) nikaudio Fedora - Installation 1 07-08-2008 08:50 AM
Partitions RAID LVM Disk Druid Kryptos Linux - Newbie 2 11-17-2007 08:13 PM
Software Raid - recreate failed disk. FragInHell Red Hat 5 11-25-2004 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:53 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