Link to home
Start Free TrialLog in
Avatar of iceman19330
iceman19330

asked on

having trouble with RAID and FC5

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.

Avatar of iceman19330
iceman19330

ASKER

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.
/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 ...
Filename                                Type            Size    Used    Priority
/dev/dm-5                               partition       2096440 0       -1
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
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.
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.
remove the proper line from /etc/fstab
swapoff /dev/dm-5
dmsetup remove /dev/dm-5 #or dmsetup remove dm-5
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
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!
[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 ~]#
that was after I removed it from the file.
so if you were doing the setup what would you do?
dmsetup info # what it shows? maybe the name is something different?
[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
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
[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?
No - in fact not I'm stumped now.
And I'm afraid can't help You. I'll browse internet.
Meanwhile - other experts?
Should I wipe and start over?
And then have you tell me what I should be inputting?
MAybe try makeing pointer question at Linux TA.
whats Linux TA?
Done!
Not seeing much interest.  LOL!
If you have any other suggestions I am all ears.
> [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.
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.
Without data loose - backup, repartition from liveCD, restore&update fstab. Ask some friend.
I dont have any data on there to loose.  This was a fresh install.
Oh - then simply reinstall from scratch - avoid using dmraid device-mapper. Use just softwareRaid during installation.
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?
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.
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.

Okay so I have to create another RAID partition?  Is 2Gb big enough?
> Okay so I have to create another RAID partition?  Is 2Gb big enough?
What is the purpose of the partition?
I sent you an email I hope that is okay.
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.
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?
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 /?
I mean maybe I have just made this way too complicated, which is what I normally do.
Is it normal for only one Allowable Drives to be listed?
The email: Been trying that all day, its like its a holiday or something.
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
I know there are 2 drives.  BIOS list them.  The HD utilities list them.
Can You remove it as well? Do You have raid onfiguren in bios? Is so - unconfigure.
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.
Oh and no I can not remove that drive, the section there is un-selectable.  If that is a word.
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.

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.
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.
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.
No - delete it.