Solved

RAID setup, first time

Posted on 2006-11-02
38
1,838 Views
Last Modified: 2013-12-15
I am a newbie and I need to setup my server, it has SATA RAID 0,1.
I have followed the instructions that I was given, they are very limited.
I went into BIOS and set to optimized and then installed FC5.  FC5 formats and sets up the partitions and installs the software.
I reboot and nothing cant find the boot disk.  No drives appear in the POST test, I dont think they have, I see the RAID settings, IRQ, etc.  So I go back in and the install process say there is already a FC5 instance on here.

HELP!!!!!!!!!  The server manufacture is going to take a long time in getting back.
0
Comment
Question by:iceman19330
  • 26
  • 12
38 Comments
 
LVL 14

Accepted Solution

by:
ygoutham earned 500 total points
Comment Utility
my feel is that the boot sequence is still stuck with the CD option and has not been changed.  MAKE SURE YOU CHECK THAT FIRST.

i am presuming that you have changed the boot devicce priority and changed it from CD to hard disk on the BIOS screen.  and if the problem still persists, then

try booting with the setup CD 1.  type on the first area where the system stops and type "linux rescue" or you can press F2 for more options and press F5 for linux rescue.

walk through the screens and finally when presented with a bash shell (read command line interface), just enter

chroot /mnt/sysimage

this should detect the hard disk fedora. and can install grub with

grub-install /dev/sda.

goutham
0
 

Author Comment

by:iceman19330
Comment Utility
I checked the boot sequence when this first started and set HD to first in the sequence, as I wanted to make sure that there was no doubt.  Didnt work.  I also see where in the CMOS setup that the HDs are not being recognized, well its the IDE HD doesnt come up.
0
 

Author Comment

by:iceman19330
Comment Utility
/dev/sda doesnt have any corresponding BIOS drive.
0
 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
if my understanding is correct, you are saying that you have 2 SATA disks and also an IDE disk on the system.  the SATA are recognised by the system but the IDE disk is not.

if you have enabled the HARDWARE raid and have also given the software raid option in FC5 then there have been known cases where it has not worked properly.

pls clarify...
0
 

Author Comment

by:iceman19330
Comment Utility
I have no IDE on the system, the HD SATA is hardware RAID 0,1.
I think when I was writting down I gave too much information. :)  Sorry about that.

When I go into the boot disk it find the FC5 install.  It loads the via_RAID driver.
On the POST test I see the RAID and its information.  But I dont seem to get any information for the HDD themselves.
0
 

Author Comment

by:iceman19330
Comment Utility
Thank you.

I finally got through to the hardware people and what had happened was the SATA was set to RAID as I saw, however the onboard RAID BIOS setup was disabled, which mean while the hardware knew there was a RAID setup the BIOS did not.  He did say however that I should not use the hardware RAID, but instead turn off the hardware RAID and let Fedora do its thing as Linux doesnt like the onboard RAID controllers.
0
 

Author Comment

by:iceman19330
Comment Utility
Actually now I need to know how to properly setup the software RAID.  Do you mind helping me with that?
0
 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
sure
0
 

Author Comment

by:iceman19330
Comment Utility
how do you want me to proceed.  I'm at the RAID options popup with the question "What do you want to do now?"
One option is Create a software RAID partition.
0
 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
http://www.experts-exchange.com/Operating_Systems/Linux/Q_22041025.html
*****************

Set up the /etc/raidtab file like this:

raiddev /dev/md0
        raid-level      1
        nr-raid-disks   2
        nr-spare-disks  0
        persistent-superblock 1
        device          /dev/sda1
        raid-disk       0
        device          /dev/sdb1
        raid-disk       1


Ok, now we're all set to start initializing the RAID. The mirror must be constructed, eg. the contents (however unimportant now, since the device is still not formatted) of the two devices must be synchronized.

Issue the

  mkraid /dev/md0

command to begin the mirror initialization.

Check out the /proc/mdstat file. It should tell you that the /dev/md0 device has been started, that the mirror is being reconstructed, and an ETA of the completion of the reconstruction.
**************

change the /etc/raidtab to raid-level 0 if you want for 0.

g
0
 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
0
 

Author Comment

by:iceman19330
Comment Utility
Drive is /dev/mapper/via_bfdbedhhe 152625MB

LVM Volume Groups
     VolGroup00             - 152384
          LogVol01 - swap - 1920
          LogVol00 - ext3 - 150464

Hard Drives
     /dev/mapper/via_bfdbedhhe
          /dev/mapper/via_bfdbedhhep1 - /boot - ext3 - 102
          /dev/mapper/via_bfdbedhhep2 - softwareRAID - 102
          /dev/mapper/via_bfdbedhhep3 - LVM PV - 152421
     
     
0
 

Author Comment

by:iceman19330
Comment Utility
So basically I dont do it in the installer.  I let it go?
0
 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
what are the size of the individual disk.  i think it must be something like 2 x 73 GB SATA disks which have already been merged as a LVM during install process.  am i right?
0
 

Author Comment

by:iceman19330
Comment Utility
2 x 160GB
0
 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
http://unthought.net/Software-RAID.HOWTO/Software-RAID.HOWTO-11.html

http://www.midhgard.it/docs/lvm/html/index.html

I have personally not done a LVM with a raid combo.  as you have only 2 disks, would it be alright if you want a non-LVM based option. or do you want it only with LVM and RAID?

LVM offers the funcatioanlity to increase the hard disk capacity in future dynamically at run time. and a raid for that would mean that you would have to add 2 disks for every 1 disk that you want added.

Is the LVM by choice or by clicking on default options in FC5 install process?

goutham
0
 

Author Comment

by:iceman19330
Comment Utility
LVM was FC5 setting that up, I usually ldo partitioning myself but I never found a good partition map to follow for mail server with some http stuff and a RAID setup, so I though it would be better to let FC5 do it.

If you have a better idea I am all ears.  :)
0
 

Author Comment

by:iceman19330
Comment Utility
And I dont mean that in a sarcastic or mean way :)
0
 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
postfix and sendmail uses the /var/spool/mail as default directory for spooled mails and the webmail can either store it in users home directory or wherever depending on what you are going to use.  

assuming that your mail server is not going to be a mysql backend

answer these:

how many end users would be there
how much traffic envisaged per day (1000 emails a day??? or more if so what number)
would users store / leave a copy on the mail server?
antivirus / spam options?

what is "http stuff"

with that said, since /var would need max space, you can consider using that as a separate partition, so number of partitions would be something like this

/boot = 100 M
/swap = twice actual memory (cap it at 2 GB)
/home = 50 GB
/var = 50 GB
/ = all remaining free space

( the above is assuming that you want a "amavisd-new" antivirus, clamav, etc and a spam quarantine which would also sit in the /var directory, virus repository / quarantine in /var )

/home is being that big thinking that all users would want to leav a copy of message on the server after reading on webmail or any other method.  if most of the users are going to use a MTA (read outlook / thunderbird / evolution / anyting of their choice), then there would not be too much usage on /home directory.  these are subjective calls that you will have to take on the spot.  probably you might want to keep some space on a /backup or some direcotry where you might consider storing some of the logs auto generated on the system. so that the auto-rotate log function does not truncate any critical info.

0
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.

 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
hey it is 9 Pm here.  am leaving for the day. pls go ahead and post. i have it on my watch list and would post my morn time. am in the asian timezone. so sorry  ...

good luck
0
 

Author Comment

by:iceman19330
Comment Utility
how many end users would be there: between 50 - 100
how much traffic envisaged per day (1000 emails a day??? or more if so what number): between 3,000 and 3,200 a day inbound and outbound
would users store / leave a copy on the mail server? we have a few users who have some emails stored but its maybe 100-200MB total.
antivirus / spam options? we will be running spamassassin, amavisd and Maia Mailguard, an adminstration frontend for spamassassin and amavisd.

http stuff, would be web mail client, admin clients internal.  MySQL would be for Mailguard.
0
 

Author Comment

by:iceman19330
Comment Utility
I should note that around 40% - 42% of the incoming emails are send to spam quaranteen, while 15% gets rejected due to spoofing or other similar email issues.
0
 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
my last post for the day.  but still one crucial question was that you are NOT using MySQL for backend.  postfix / sendmail with a "mbox" format than a sql stuff.  if so 50 GB home is tooooooo much. can downsize and include that also in the "/" partition.  for 50 - 100 users spooled mails and quarantine (assuming that you go with amavisd default of 15 day auto-cleanup) should be ok for the 50GB /var partition that i though of.  even 50 GB is too much here.

as mysql is also in /var and so are you mail and antivirus antispam. let us be cautious and since you have the abundance of space you can have it that way.  but i would still say that the final decision on the sizes of partition is your choice. think through it carefully and choose.  i had only indicated my numbers for your reference.

with that said, why not go in for a simple partition of the /dev/sda disk alone for the time being and after you finish installation, you can follow the first post i made for creating a raid at runtime.

that should be ok for now.
0
 

Author Comment

by:iceman19330
Comment Utility
the mysql is not for postfix, it will be for the Maia Mailguard to process the emails through the virus and spam filters.
0
 

Author Comment

by:iceman19330
Comment Utility
Okay this is what I did, it was a simple partition.

Volume Groups
     VolGroup00             - 152384

Hard Drives
     /dev/mapper/via_bfdbedhhe
          /dev/mapper/via_bfdbedhhep1 - /boot - ext3
          /dev/mapper/via_bfdbedhhep1 - / - ext3 - <all>  << I read somewhere, where partitions are needed as much anymore since drives are so big, plug FC will do default /var /usr /home etc.
          /dev/mapper/via_bfdbedhhep2 - swap - 2048

I couldn't find where to change /dev/mapper/via_bfdbedhhe to /dev/sda
0
 

Author Comment

by:iceman19330
Comment Utility
never mind the above post I had to scrap it as the install faltered on the second disk.  Both times I tried to install with a simple partition of /boot and / or just / the install faltered., so I went with this install.

/boot = 100 M
/swap = twice actual memory (cap it at 2 GB)
/home = 50 GB
/var = 50 GB
/ = all remaining free space

the mysql question was not answered clearly as I was waiting for clarification from Maia.  Mysql gets used to store quarantined emails, it gets deleted manually or automatically xx days later.

again I thank you for your patience and help with this, and if I could I would double the awarded points.  if you have more to add then please do.
0
 

Author Comment

by:iceman19330
Comment Utility
This is what I have, so far none of the RAID setup instructions have worked.

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
0
 

Author Comment

by:iceman19330
Comment Utility
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 14

Expert Comment

by:ygoutham
Comment Utility
0
 
LVL 14

Expert Comment

by:ygoutham
Comment Utility
i can understand the frustration.  sda5 was originally the swap area. why are we trying to unmount the same??? any specific reason???

all of sda would NOT be fd when you are trying to fdisk the same.  only sdb (which you are intending as raid areas to be kept as fd)

all of sdb to be fd with the same size as that of sda. so that we have a similar partition in sdb.

make /dev/sda5 back from "fd" to "82" which is the swap format.  once that is done

we can get back with

mdadm -Cv /dev/md0 --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1

and so on...

let us see if we can close this today.
0
 

Author Comment

by:iceman19330
Comment Utility
okay I will try that
0
 

Author Comment

by:iceman19330
Comment Utility
Arg!  Does look like it doesn't likes me :(
Anyway, was there a reason for /dev/sda1 as the

mdadm -Cv /dev/md0 --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1
mdadm: chunk size defaults to 64K
mdadm: Cannot open /dev/sda1: Device or resource busy
mdadm: Cannot open /dev/sdb1: Device or resource busy
mdadm: create aborted

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
 

Author Comment

by:iceman19330
Comment Utility
cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/dm-5                               partition       2096440 0       -1
0
 

Author Comment

by:iceman19330
Comment Utility
/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

I removed the SWAP from that file then did

[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
Comment Utility
[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
 

Author Comment

by:iceman19330
Comment Utility
[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)
0
 

Author Comment

by:iceman19330
Comment Utility
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
 

Author Comment

by:iceman19330
Comment Utility
Found the issue, there was two.

1.  RAID was configured at the manufacture, the array was never wiped.
2.  There was a misconfiguration in BIOS, they undid the RAID setup in a couple of areas and then forgot to reset another one in another section so the RAID array was hidden but Linux was able to see it.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

772 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

10 Experts available now in Live!

Get 1:1 Help Now