Link to home
Start Free TrialLog in
Avatar of jdm4tdx1
jdm4tdx1Flag for United States of America

asked on

Settiing up raid 1 and raid 5 for database on RHEL 5.3 on Dell 2850

Hello,

I am trying to set up a RHEL server to hold a database (SAP MaxDB). I have already set up hardware raid two disks on raid 1 and 4 disks on raid 5. The hardware set up the raids and show two arrays when booting up. I installed the OS only on the smaller 36g raid 1 array. I need to setup a mount point for /sapmnt on the raid 5 array, which will hold my data for the db. When I run command fdisk -l,     I see /dev/sda 36g and I also /dev/sdb 219g.  What do I do so I can place mountpoint? I have not formatted sdb at all and when I run fdisk /dev/sdb it says I already have a partition on the LVM. When I am all done would like to have db log files with os on raid 1 and db data on raid 5.  

Thank you,

Jeff
ASKER CERTIFIED SOLUTION
Avatar of medvedd
medvedd

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
Avatar of jar3817
jar3817

If you don't have a partition, use fdisk to create a primary partition on that drive:

# fdisk /dev/sdb

Also, not to start a flamewar, but I'm part of the subculture that thinks RAID5 was invented by the devil. Perhaps you might want to think about a more resilient drive structure for your database. RAID1 and RAID10 are excellent choices.
not starting a flamewar either - as much as I prefer raid 1/10, raid 5 has its places too, mostly in disk space requirements.  

if you can only fit six disks in this chassis, that leaves you four disks .. if they are 300gig disks, that is 600gigs in a raid 1, 900gigs in a raid5.  

If the database is going to be 700gig to 800gig and you are confined to the disk in your chassis, mirroring is not an option.

Avatar of jdm4tdx1

ASKER

Thank Medvedd,

unfortunately when I run mkfs command I get error that "/dev/sdb1 is apparently in use by system; will not make a filesystem here!"

 When I installed OS I only checked sda on where to install partition. When I looked in on config the sdb was listed and had a LVM PV setting. Should I have installed os on both logical disks?

As to raid this is a test system for distributed SAP setup. Specs are raid 1 for log files raid 5 for data. Can not change that so lets let that rest.

Jar when i fdisk I am told there is a partition already.

Thanks,

Jeff
Can you show output of command 'mount'?
[root@sapdb ~]# mount
/dev/mapper/VolGroup01-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpots (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

[root@sapdb ~]# fdisk -l

Disk /dev/sda: 36.2 GB, 36364615680 bytes
255 heads, 63 sectors/track, 4421 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           4421    35407260     83    Linux LVM

Disk /dev/sdb: 219.8 GB, 219823472640 bytes
255 heads, 63 sectors/track, 26725 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

        Device        Boot      Start         End             Blocks      Id    System
/dev/sdb1              *            1          26725    214668531      8e    Linux LVM



I have include mount and fdisk -l so you can see the VolGroup00 is the larger raid 5 but I do not see it listed in mount information.

Thank you,

Jeff
can you do output of "df -k"

it looks like your sdb is part of lvm which is mounted as "/"
SOLUTION
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
In more detail:

this line here from "mount"

/dev/mapper/VolGroup01-LogVol00 on / type ext3 (rw)

looks like you have it mounted as "/"  ...  and that when you installed you only mirrored the "/boot" partition on /dev/sda

Please output "df -k" so we can see the size of the partitions mounted and what is mounted where.  thanks!

also if you can, lvdisplay -v /dev/mapper/VolGroup01-LogVol00
Sorry guys had to get something to eat.

[root@sapdb ~]# df -k
Filesystem                                             1K-blocks           Used   Available   Use% Mounted on
/dev/mapper/VolGroup01-LogVol00    24377724        3227224 19892212  14%       /
/dev/sda1                                              101086               19035     76832     20%      /boot
tmpfs                                                     2539792                   0     2539792     0%      /dev/shm


as to the lvdisplay request

[root@sapdb ~]# lvdisplay -v /dev/mapper/VolGroup01-LogVol00
            Using logical volume(s) on command line
/dev/hda: open failed: No medium found
--- Logical volume ---
LV Name                    /dev/VolGroup01/LogVol00
VG Name                   VolGroup01
LV UUID                     XDZrxD-TXJm-j4Xf-PRh6-L6UU-YhYX-5pHoWw
LV Write Access        read/write
LV Status                   available
# open                        1
LV Size                       24.00 GB
Current LE                  768
Segments                   1
Allocation                    inherit
Read ahead sectors  auto
- currently set to        256
Block device              253:0

Thanks,

jeff
lvdisplay -v  /dev/VolGroup01/LogVol00
vgdisplay -v  /dev/VolGroup01

medvedd is right, the easiest thing to do is reinstall.   However it would be nice to know what you did with /dev/sdb to make sure you don't do the same thing on the reinstall.   Either
1) your /dev/sda is not part of your LV and you simply instlaled / on the wrong disk (the LV instead of /dev/sda2)

or

2) your /dev/sda is part of yourLV, which means you mirrored /boot properly on your /dev/sda1 but then you forgot to create a "/" partition on your /dev/sda2 and instead created it on your LV

you want to make sure that no /dev/sda partitions show up in your LV

Avatar of arnold
My guess is that during install both drives were selected for the inclusion and auto partitioning.
I think RHEL defaults to /boot and everything else is added into / LVM volume group.

make sure during the reinstall to only work on /dev/sda

The other part you may wish to plan out is whether you want different mount points for /var/log etc.

If your RAID 5 can be further expanded, you may want to use LVM on the RAID 5 so that when you expand the RAID 5 array by adding another drive, you will be able to expand the LVM volume accordingly.  Using a raw partition such as /dev/sdb1 will require a more elaborate mechanism to expand involves copying the data to a different location, and then repartitioning /dev/sdb anew.
Learned valuble lesson. Even though I choose to remove all partitions Linux didn't. So initial install had second disk(array) connected to first still. Thank you all for your suggestions. Arnold I will go back and change my Linux partition to Linux LVM. Thanks for that suggestion.

Jeff