[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 787
  • Last Modified:

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.

0
iceman19330
Asked:
iceman19330
  • 32
  • 19
1 Solution
 
iceman19330Author Commented:
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
 
ravenplCommented:
/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
 
iceman19330Author Commented:
Filename                                Type            Size    Used    Priority
/dev/dm-5                               partition       2096440 0       -1
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
iceman19330Author Commented:
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
 
ravenplCommented:
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
 
iceman19330Author Commented:
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
 
ravenplCommented:
remove the proper line from /etc/fstab
swapoff /dev/dm-5
dmsetup remove /dev/dm-5 #or dmsetup remove dm-5
0
 
iceman19330Author Commented:
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
 
ravenplCommented:
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
 
iceman19330Author Commented:
[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
 
iceman19330Author Commented:
that was after I removed it from the file.
0
 
iceman19330Author Commented:
so if you were doing the setup what would you do?
0
 
ravenplCommented:
dmsetup info # what it shows? maybe the name is something different?
0
 
iceman19330Author Commented:
[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
 
ravenplCommented:
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
 
iceman19330Author Commented:
[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
 
ravenplCommented:
No - in fact not I'm stumped now.
And I'm afraid can't help You. I'll browse internet.
Meanwhile - other experts?
0
 
iceman19330Author Commented:
Should I wipe and start over?
And then have you tell me what I should be inputting?
0
 
ravenplCommented:
MAybe try makeing pointer question at Linux TA.
0
 
iceman19330Author Commented:
whats Linux TA?
0
 
ravenplCommented:
0
 
iceman19330Author Commented:
Done!
0
 
iceman19330Author Commented:
Not seeing much interest.  LOL!
If you have any other suggestions I am all ears.
0
 
ravenplCommented:
> [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
 
iceman19330Author Commented:
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
 
ravenplCommented:
Without data loose - backup, repartition from liveCD, restore&update fstab. Ask some friend.
0
 
iceman19330Author Commented:
I dont have any data on there to loose.  This was a fresh install.
0
 
ravenplCommented:
Oh - then simply reinstall from scratch - avoid using dmraid device-mapper. Use just softwareRaid during installation.
0
 
iceman19330Author Commented:
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
 
iceman19330Author Commented:
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
 
ravenplCommented:
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
 
iceman19330Author Commented:
Okay so I have to create another RAID partition?  Is 2Gb big enough?
0
 
ravenplCommented:
> Okay so I have to create another RAID partition?  Is 2Gb big enough?
What is the purpose of the partition?
0
 
iceman19330Author Commented:
I sent you an email I hope that is okay.
0
 
iceman19330Author Commented:
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
 
ravenplCommented:
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
 
iceman19330Author Commented:
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
 
iceman19330Author Commented:
I mean maybe I have just made this way too complicated, which is what I normally do.
0
 
iceman19330Author Commented:
Is it normal for only one Allowable Drives to be listed?
0
 
iceman19330Author Commented:
The email: Been trying that all day, its like its a holiday or something.
0
 
ravenplCommented:
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
 
iceman19330Author Commented:
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
 
iceman19330Author Commented:
I know there are 2 drives.  BIOS list them.  The HD utilities list them.
0
 
ravenplCommented:
Can You remove it as well? Do You have raid onfiguren in bios? Is so - unconfigure.
0
 
iceman19330Author Commented:
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
 
iceman19330Author Commented:
Oh and no I can not remove that drive, the section there is un-selectable.  If that is a word.
0
 
iceman19330Author Commented:
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
 
ravenplCommented:
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
 
iceman19330Author Commented:
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
 
iceman19330Author Commented:
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
 
ravenplCommented:
No - delete it.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 32
  • 19
Tackle projects and never again get stuck behind a technical roadblock.
Join Now