Operating System - Linux
1825771 Members
2154 Online
109687 Solutions
New Discussion

Re: hardware raid mirroring in linux

 
SOLVED
Go to solution
surendranath
Advisor

hardware raid mirroring in linux

Could someone please tell me how create a hardware raid mirror for root disk in Linux.

[root@hqm4cbl1 root]# fdisk -l

Disk /dev/cciss/c0d0: 36.4 GB, 36406394880 bytes
255 heads, 32 sectors/track, 8714 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 25 101984 83 Linux
/dev/cciss/c0d0p2 26 8714 35451120 8e Linux LVM

Disk /dev/cciss/c0d1: 18.2 GB, 18203197440 bytes
255 heads, 32 sectors/track, 4357 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d1p1 1 4357 17776544 8e Linux LVM

Disk /dev/cciss/c0d2: 36.4 GB, 36406394880 bytes
255 heads, 32 sectors/track, 8714 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d2p1 1 25 101984 83 Linux
/dev/cciss/c0d2p2 26 8714 35451120 8e Linux LVM

Disk /dev/cciss/c0d3: 18.1 GB, 18107105280 bytes
255 heads, 32 sectors/track, 4334 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Disk /dev/cciss/c0d3 doesn't contain a valid partition table
7 REPLIES 7
Ivan Ferreira
Honored Contributor

Re: hardware raid mirroring in linux

It depends of the server hardware and utilities. If you use a proliant server, you may use Array Configuration Utility. You probably will loose all your operating system data.

It looks like you have 2 36 GB disks and 2 18 GB disks, but from that output, it's impossible to know if is using hardware RAID.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
surendranath
Advisor

Re: hardware raid mirroring in linux

Server is a proliant DL 380 G3 server. It has 6*18Gig disks. Two disks (2*18) are partitioned as Raid 0 and allocated for Root disk. Partitioning was done on all these disks at CMOS level(I believe it to be hard Raid partioning)?.
Robert Walker_8
Valued Contributor

Re: hardware raid mirroring in linux

Gday,

Well if your running RAID0 only not RAID1+0 as proliants say then your in strife! RAID0 is dangerous unless your happy to lose all data on that LUN (drive).

The Proliant Smart Start CD - going to Maintenance and then ACU (Array Configuration Utility) is best bet. You will have to rebuild server - so best to back it up as your disk storage will be lost!!!!!!

Select the two 18GB drives and join as RAID1 (or RAID1+0 it may say). You can then if you wish partition that drive to any size you like, but Linux allows for 14 soft partitions so shouldnt be a problem there. Select save.

Also you should select controller, set rebuild priority to high, you may wish to modify cache memory depending upon whether system is high reading or writing (but 50/50 is probably all thats needed), then select Save.

You may want a hot spare. We tend to buy equip say 2x18s, 4x72 and RAID5 3x72s with the 72 as a hotspare for the RAID5 set and also for the 2x18gb RAID1 set. This will mean that the space isnt used for the 18 if its temporarily used but the chances of the 72GB drive failing and a 18GB at the same time is low and thus saves a bit of $$$$.

Robert.


Robert.
Rob Leadbeater
Honored Contributor
Solution

Re: hardware raid mirroring in linux

Hi,

You should be able to check how the drives are configured at the hardware level by using the following command:

# cat /proc/driver/cciss/cciss0

If you need to configure them, without restarting the server, then you'll need to look for the HP Array Configuration Utility, which may be installed, although Linux admins tend not to, in my experience... Search for "hpacucli"

Hope this helps,

Regards,

Rob
surendranath
Advisor

Re: hardware raid mirroring in linux

Hi Rob,

Could you please give the steps for raid hardware mirroring.


[root@hqm4cbl1 ~]# cat /proc/driver/cciss/cciss0
cciss0: HP Smart Array 5i Controller
Board ID: 0x40800e11
Firmware Version: 2.56
IRQ: 185
Logical drives: 5
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 4
Max # commands on controller since init: 384
Max SG entries since init: 31
Sequential access devices: 0

cciss/c0d0: 36.40GB RAID 0
cciss/c0d1: 18.20GB RAID 0
cciss/c0d2: 18.20GB RAID 0
cciss/c0d3: 18.20GB RAID 0
cciss/c0d4: 18.10GB RAID 0
[root@hqm4cbl1 ~]#


[root@hqm4cbl1 ~]# hpacucli
HP Array Configuration Utility CLI 7.15.19.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.

=> help

To enter the ACU CLI console type:
hpacucli

Commands can also be executed from outside the
ACU CLI console using the syntax:
hpacucli [param[=value]]

[param[=value]]
is of format:
[controller all|slot=#|wwn=#|chassisname="AAA"] [array all|]
[physicaldrive all|#:#|allunassigned] [logicaldrive all|#]
Example targets:
controller all
controller slot=5
controller chassisname="Lab C"
controller serialnumber=P21DA2322S
controller wwn=500308B300701011
controller slot=1 array all
controller slot=7 array A
ctrl slot=1 pd allunassigned
controller slot=2 logicaldrive all
controller slot=5 ld 5
controller slot=5 physicaldrive 0:5

can be "create","delete","modify","show","rescan"
For detailed command information type any of the following:
help add
help create
help delete
help modify
help remove
help shorthand
help show
help target
help rescan

=> [root@hqm4cbl1 ~]#

Rob Leadbeater
Honored Contributor

Re: hardware raid mirroring in linux

Hi,

If I were you I would start from scratch with this system, as you currently have no resilience.

Is there anything on the system that you need to keep ?

Cheers,

Rob
Steven E. Protter
Exalted Contributor

Re: hardware raid mirroring in linux

Shalom,

Hardware raid varies from system vendor to system vendor.

This appears to be HP hardware, so you can install PSP and it has web based monitoring of hardware raid state.

If you are brave and want to write a script, you can even use wget and parse the results with a cron job.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com