Solved

having trouble with RAID and FC5

Posted on 2006-11-02
51
765 Views
Last Modified: 2013-12-15
Okay I am trying to setup RAID on FC5, almost all the examples that I have found are for raidtools2, however FC5 does not have raidtools2.  so i have been trying to use mdadm to do it, but I keep getting errors.

So anyway I need some help in setting up RAID to work on my system.  Here is some preliminary information.

##################################################

fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        6540    52428127+  83  Linux
/dev/sda3            6541       13067    52428127+  83  Linux
/dev/sda4           13068       19457    51327675    5  Extended
/dev/sda5           13068       13328     2096451   82  Linux swap / Solaris
/dev/sda6           13329       19457    49231161   83  Linux

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   83  Linux
/dev/sdb2              14        6540    52428127+  83  Linux
/dev/sdb3            6541       13067    52428127+  83  Linux
/dev/sdb4           13068       19457    51327675    5  Extended
/dev/sdb5           13068       13328     2096451   82  Linux swap / Solaris
/dev/sdb6           13329       19457    49231161   83  Linux

##################################################

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/dm-6              46G  1.6G   42G   4% /
/dev/dm-1              99M  9.2M   85M  10% /boot
tmpfs                 473M     0  473M   0% /dev/shm
/dev/dm-3              49G  181M   46G   1% /home
/dev/dm-2              49G  233M   46G   1% /var

any other questions please ask away.

I had been told to use fdisk to change the ID of the drive and to make it a "Linux raid auto detect" and then do that on the other disk.  That seemed to be okay, but then that was some instructions for raidtools2.  mdadm I couldn't even get past the first one as it couldn't find sda5 or sdb5, it told me to use the swap partition is there is an increased chance of data loss with RAID 0, to use a partition that does hold any important data.  so as you can see I am right now floating along and I need some help.  If you have a better way I am all ears.

0
Comment
Question by:iceman19330
  • 32
  • 19
51 Comments
 

Author Comment

by:iceman19330
ID: 17863895
Okay so here is where I am at, besides frustrated to no end.

[root@mail1 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): t
Partition number (1-6): 5
Hex code (type L to list codes): fd
Changed system type of partition 5 to fd (Linux raid autodetect)

Command (m for help): p

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        6540    52428127+  83  Linux
/dev/sda3            6541       13067    52428127+  83  Linux
/dev/sda4           13068       19457    51327675    5  Extended
/dev/sda5           13068       13328     2096451   fd  Linux raid autodetect
/dev/sda6           13329       19457    49231161   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

... did it over to
[root@mail1 ~]# fdisk /dev/sdb

so I think I am in like flynn.

[root@mail1 ~]# mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda5 /dev/sdb5

mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda5 /dev/sdb5
mdadm: chunk size defaults to 64K
mdadm: Cannot open /dev/sda5: Device or resource busy
mdadm: Cannot open /dev/sdb5: Device or resource busy
mdadm: create aborted
[root@mail1 ~]# umount /dev/sda5
umount: /dev/sda5: not mounted

???? What!  I am getting so frustrated.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17864618
/dev/sda5 (sdb5) were signed swap before. they are propably used as swap then(verify in file /proc/swaps). Try tunrning off the swap then.
swapoff /dev/sda5 /dev/sdb5; mdadm -v -C /dev/md0 ...
0
 

Author Comment

by:iceman19330
ID: 17865889
Filename                                Type            Size    Used    Priority
/dev/dm-5                               partition       2096440 0       -1
0
 

Author Comment

by:iceman19330
ID: 17865966
I turned on the display that is connected to the server and there is a bunch of output on the screen because I am back in the cage.

INIT version 2.86 reloading
SCSI device sda:  312581808 512-byte hdwr sectors (160042 MB)
sda: Write protect is off
SCSI device sda:  drive cache: write back
SCSI device sda:  312581808 512-byte hdwr sectors (160042 MB)
sda: Write protect is off
SCSI device sda:  drive cache: write back
SCSI device sdb:  312581808 512-byte hdwr sectors (160042 MB)
sdb: Write protect is off
SCSI device sdb:  drive cache: write back
SCSI device sdb:  312581808 512-byte hdwr sectors (160042 MB)
sdb: Write protect is off
SCSI device sdb:  drive cache: write back
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17866210
That's it /dev/dm-5 is used as swap (and have /dev/sda5/b5). Remove the swap(from the /etc/fstab as well), unconfigure device-mapper, try again.
0
 

Author Comment

by:iceman19330
ID: 17866247
Okay how do I remove the swap, I'm sorry I am a bit slow.
I understand that I can delete it from /etc/fstab, but would I remove the swap using fdisk.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17866352
remove the proper line from /etc/fstab
swapoff /dev/dm-5
dmsetup remove /dev/dm-5 #or dmsetup remove dm-5
0
 

Author Comment

by:iceman19330
ID: 17866390
So I am to remove from /etc/fstab this, LABEL=SWAP-via_bfdbed   swap                    swap    defaults        0 0

I'm sorry for being so slow with this but I just want to make sure.

/etc/fstab
LABEL=/1                /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
LABEL=/home1            /home                   ext3    defaults        1 2
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=/var1             /var                    ext3    defaults        1 2
LABEL=SWAP-via_bfdbed   swap                    swap    defaults        0 0
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17866461
Yes You have to remove this line, as You will change it to raid.
But as a result You will have no swap at all in Your system. You should consider another device (or file) to use as swap!
0
 

Author Comment

by:iceman19330
ID: 17866589
[root@mail1 ~]# swapoff /dev/dm-5
[root@mail1 ~]# dmsetup remove /dev/dm-5
dm_task_set_name: Device /dev/dm-5 not found
Command failed
[root@mail1 ~]# dmsetup remove dm-5
device-mapper: remove ioctl failed: No such device or address
Command failed
[root@mail1 ~]#
0
 

Author Comment

by:iceman19330
ID: 17866594
that was after I removed it from the file.
0
 

Author Comment

by:iceman19330
ID: 17866671
so if you were doing the setup what would you do?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17866794
dmsetup info # what it shows? maybe the name is something different?
0
 

Author Comment

by:iceman19330
ID: 17866802
[root@mail1 ~]# dmsetup info
Name:              via_bfdbedhhhep4
State:             ACTIVE
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      253, 4
Number of targets: 1

Name:              via_bfdbedhhhep3
State:             ACTIVE
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 3
Number of targets: 1

Name:              via_bfdbedhhhep2
State:             ACTIVE
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 2
Number of targets: 1

Name:              via_bfdbedhhhep1
State:             ACTIVE
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 1
Number of targets: 1

Name:              via_bfdbedhhhe
State:             ACTIVE
Tables present:    LIVE
Open count:        6
Event number:      0
Major, minor:      253, 0
Number of targets: 1

Name:              via_bfdbedhhhep6
State:             ACTIVE
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 6
Number of targets: 1

Name:              via_bfdbedhhhep5
State:             ACTIVE
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      253, 5
Number of targets: 1
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17866855
OK, for each name (those via_bs....) run
dmsetup -r deps via_b.........
find one which contains "(8, 5), (8, 21)" - it Your device - this device You have to remove
0
 

Author Comment

by:iceman19330
ID: 17866937
[root@mail1 ~]# dmsetup -r deps via_bfdbedhhhep5
1 dependencies  : (253, 0)
[root@mail1 ~]# dmsetup -r deps via_bfdbedhhhep6
1 dependencies  : (253, 0)
[root@mail1 ~]# dmsetup -r deps via_bfdbedhhhe
2 dependencies  : (8, 16) (8, 0)
[root@mail1 ~]# dmsetup -r deps via_bfdbedhhhep1
1 dependencies  : (253, 0)
[root@mail1 ~]# dmsetup -r deps via_bfdbedhhhep2
1 dependencies  : (253, 0)
[root@mail1 ~]# dmsetup -r deps via_bfdbedhhhep3
1 dependencies  : (253, 0)
[root@mail1 ~]# dmsetup -r deps via_bfdbedhhhep4
1 dependencies  : (253, 0)

so I would say that it is via_bfdbedhhhe?  Is that correct?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17867081
No - in fact not I'm stumped now.
And I'm afraid can't help You. I'll browse internet.
Meanwhile - other experts?
0
 

Author Comment

by:iceman19330
ID: 17867092
Should I wipe and start over?
And then have you tell me what I should be inputting?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17867130
MAybe try makeing pointer question at Linux TA.
0
 

Author Comment

by:iceman19330
ID: 17867160
whats Linux TA?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17867170
0
 

Author Comment

by:iceman19330
ID: 17867553
Done!
0
 

Author Comment

by:iceman19330
ID: 17867654
Not seeing much interest.  LOL!
If you have any other suggestions I am all ears.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17867999
> [root@mail1 ~]# dmsetup -r deps via_bfdbedhhhe
> 2 dependencies  : (8, 16) (8, 0)
OK. it says that this device-mapper uses whole disks! So basically You can't use particular partitions to another purpose.
Sorry. I thought You have device-mappers on pairs of partitions - but I was wrong.
0
 

Author Comment

by:iceman19330
ID: 17868010
Thats okay, I havent been right yet and I'm 34.  :)
So do you have any thoughts about getting around the issue, plowing through or wiping and redoing completely.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 43

Expert Comment

by:ravenpl
ID: 17868338
Without data loose - backup, repartition from liveCD, restore&update fstab. Ask some friend.
0
 

Author Comment

by:iceman19330
ID: 17868383
I dont have any data on there to loose.  This was a fresh install.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17868419
Oh - then simply reinstall from scratch - avoid using dmraid device-mapper. Use just softwareRaid during installation.
0
 

Author Comment

by:iceman19330
ID: 17868448
I dont know how that came up, i pretty much did everything default.
Now when I do software raid should I set a RAID partition?  if so what size should it be?
0
 

Author Comment

by:iceman19330
ID: 17868864
Okay here is what setup screen looks like with my selections.

/dev/mapper/via_bfdbedhhhe

/dev/mapper/via_bfdbedhhhep1 /boot - 100M
/dev/mapper/via_bfdbedhhhep2 /var - 50GB
/dev/mapper/via_bfdbedhhhep3 /home - 50GB
/dev/mapper/via_bfdbedhhhep4 Extended
/dev/mapper/via_bfdbedhhhep5 softwareRAID - 2GB
/dev/mapper/via_bfdbedhhhep6 swap - 2GB
/dev/mapper/via_bfdbedhhhep7 / - <all available>

other then the softwareRAID this is exactly what I had before, I dont see anywhere where I can change the device-mapper.
will/should I be okay with this.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17868991
How have You went to such config. You selected default disk layout? To have custom layout You have to choose custom disk layout.
Then You can plan partitions as You want. To create softwareMirror, create two same size partitions - one on firt drive, second on second - with type of softwareRAID. Then press RAID button to create the real raid(/dev/md0), choose mount point, raid type and created partitions. Voila.

0
 

Author Comment

by:iceman19330
ID: 17869126
Okay so I have to create another RAID partition?  Is 2Gb big enough?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17869224
> Okay so I have to create another RAID partition?  Is 2Gb big enough?
What is the purpose of the partition?
0
 

Author Comment

by:iceman19330
ID: 17869240
I sent you an email I hope that is okay.
0
 

Author Comment

by:iceman19330
ID: 17869276
The purpose was software RAID in order to do that needs two RAID partitions, according to the FC5 install.
So I was going to set another RAID partition and then do what you said.  However now I think I am unclear on what you are saying.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17869436
The email: No - better ask someone local.
To create raid array (mirror or stripe) You need two raw partitions(like /dev/sda1 /dev/sdb1).
If You will go with custom disk layout, prior to creating the raid You need to create two disk partitions.

In fact 2GB is not really usefull. What You want fit to such volume?
Why You need raid anyway? You want to put whole system on mirror(safe)? Or maybe on stripe(fast)? Or maybe only some part of the system?
0
 

Author Comment

by:iceman19330
ID: 17869482
Mirror the mail and other important data.  We lose email we are in big trouble.
Should I just create a /, /boot and swap and then mirror the /?
0
 

Author Comment

by:iceman19330
ID: 17869510
I mean maybe I have just made this way too complicated, which is what I normally do.
0
 

Author Comment

by:iceman19330
ID: 17869569
Is it normal for only one Allowable Drives to be listed?
0
 

Author Comment

by:iceman19330
ID: 17869600
The email: Been trying that all day, its like its a holiday or something.
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 17869643
Then I suggest You to put whole system on mirror - 160G should be enought?
Go to 'create custom layout', remove any existing LVM volume groups and partition. You should see just two drives: /dev/sda /dev/sdb
create New partition(on sda, ixed size=100M, file system type=softwareRaid) create same partition on sdb. Press Raid, mark create raid device (like /dev/md0), OK, mountpoint=/boot, fs=ext3, raidDevice=md0, raid level=1, raid members=sda1 sda2 -> OK
create next two partitions with same parameters but larger sizes (almost all space that left - leave 2GB on each disk), create raid device (md1) with same options except mountpoint=/
create next two partitions with filesystemtype=swap and size=2GB(or what's left)- don't raid them.
Continue with installation...
0
 

Author Comment

by:iceman19330
ID: 17869738
Okay I have done create custom layout and remove any existing LVM volume groups and partition.  However I only see one drive.  /dev/mapper/via_bfdbedhhhe and I can not delete any further, when I am in the screen before that I see "select the drives to use for this installation" yet it is unselected able and and there is only one listed /dev/mapper/via_bfdbedhhhe.
0
 

Author Comment

by:iceman19330
ID: 17869764
I know there are 2 drives.  BIOS list them.  The HD utilities list them.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17869809
Can You remove it as well? Do You have raid onfiguren in bios? Is so - unconfigure.
0
 

Author Comment

by:iceman19330
ID: 17869871
When I got it RAID was set on for the HDD but not BIOS, I was told to set the BIOS for on, restarted.  Then they remembered that I was installing Linux and told me to undo the changes and set SATA to IDE instead of RAID in BIOS.  I did that.  Could the RAID array be in memory or something so that now Fedora really is just reading the array information.  And if so is there a way to wipe it.  Remember I have undone the BIOS setting that it is a RAID drive.
0
 

Author Comment

by:iceman19330
ID: 17869881
Oh and no I can not remove that drive, the section there is un-selectable.  If that is a word.
0
 

Author Comment

by:iceman19330
ID: 17870014
I think I need to call the server company something is not right, I save BIOS with RAID turned off I come back in and its still turned on.

0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17870028
You don't need to configure RAID in bios, unless it's real hardware raid. Is it?
Linux will remember raid settings on the partitions itself - will work across hdd controllers as well.
So You saying, that under 'Hard Drives' section in the lower window no /dev/sda /dev/sdb - only /dev/mapper/via_....
If so - then I'm in dead end again. But let's wipe those disks. press Ctrl+Alt+F2, then issue those commands
dd if=/dev/zero of=/dev/sda count=10
dd if=/dev/zero of=/dev/sdb count=10
poweroff # or just reset the hardware
start installing again(it will create fresh partition tables) - hope the mapper is gone.
0
 

Author Comment

by:iceman19330
ID: 17870149
ARGGGGGG!  Got that one problem fixed.
BIOS had another item enabled that was causing the whole <BLEEPING> issue, and they forgot to tell me to turn that one off.
0
 

Author Comment

by:iceman19330
ID: 17870278
I would give you a AAA score if I could.
If you go post in the other one I will accept the answer there as well.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17870546
No - delete it.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now