HowTo Backup and Restore RAID 1, HP ML110 G5 Onboard RAID

Hardware RAID - HP Proliant ML110 G5,

Say, I need this for Linux Centos 5.4 system.
I have an external USB drive available.
I suspect I need to load the raid driver - but how?
Raid Manual:
http://bizsupport.austin.hp.com/bc/docs/support/SupportManual/c00771065/c00771065.pdf
shaunwinginAsked:
Who is Participating?
 
gheistCommented:
Most likely it is /dev/hdc then

If you use Ubuntu your USB is mounted on /

dd if=/dev/hdc bs=32768 of=/image.img
resulting img file will contain everything on your disk.
if it is mostly empty you can save lots of space by introducing compression:
dd if=/dev/hdc bs=32768 | gzip -1 | dd bs=32768 of=/image.img.gz

(and gunzip in same place when restoring)

If you mess everything up you will in worst case rewrite your USB on new machine, and will have to make image on USB again.


for dmesg type
 dmesg|less

then use up/down arrows to spot which drive is USB and which drive is your CentOS disk (e.g. by size)
then check both devices with fdisk to make extra asurance.
Actually CentOS can emit slipstream file, so that you can install same system on slightly different hardware.
0
 
rindiCommented:
First of all I'd just try booting the CentOS install CD, chances are the driver is already recognized. If it isn't look on the HP site, there are Red-Hat drivers available from there. Also check the HP Server CD's you got with the server (they used to be called smart-start CD in the days that those servers were still made by Compaq, maybe the tool is called differently now). These CD's usually have installation routines for the different OS's, including Red-Hat. These routines should help you build the array, start the installation and include the drivers.
0
 
gheistCommented:
If you have system installed there is no problem backing up filesystems (use tar or pax)
"Onboard RAID" is SATA AHCI, which means it is of "Software RAID" shame.
If you see it as two disks - they are same, just use one for backup.
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

 
shaunwinginAuthor Commented:
Thanx gheist.
I need more specific backup and restore instructions please.
It has two drives that are seen as one as using RAID1
I have the external usb drive which is bigger than the RAID.
0
 
gheistCommented:
# tar cfz archive.tgz file1 ...fileN... dir ...dirN
0
 
shaunwinginAuthor Commented:
Tx, but this is just too brief and how do I restore it?
0
 
gheistCommented:
$man tar

$ tar xf archive.tgz (optional filespec)

0
 
shaunwinginAuthor Commented:
Tx, but I need very explicit and detailed instructions.
The restored drive has to be bootable too as it must restore to a new set of hard drives initialised as RAID 1.
0
 
gheistCommented:
There is no way to save BIOS settings in ML110 for recovery on OTHER system.
Just enjoy a file backop restorable on BOOTABLE system (like systemstate)
0
 
shaunwinginAuthor Commented:
I don't need to save BIOS settings, but rather to simply copy one RAID set to another.

However see this link as far as saving BIOS settings  -I believe its possible. NB I wish to restore to a 2nd ML110

http://bizsupport.austin.hp.com/bc/docs/support/SupportManual/c00771065/c00771065.pdf

Can you tell me more about "systemstate"
0
 
gheistCommented:
SYSTEMSTATE is a backup set in Windows system you just love to use.
If you look to CLONE server - there is DD command
dd if=/dev/sda0 of=/mnt/image
and reverse for restore.
0
 
shaunwinginAuthor Commented:
Tx.
Can you tell me how to use SYSTEMSTATE as would like to clone an identical windows raid too.
How would I use dd to copy to a usb hard disk and then restore?
I'm not sure how to mount the usb and find its name etc.
0
 
gheistCommented:
You should have started with that ;)
In two hours I will get home.
By that time try to use "unetbootin" to transfer bootable recent ubuntu onto your USB drive (it takes 1/2GB, rest is available for disk image)
Rest of how-to to follow after.

"systemstate" is from windows world, no such thing in Linux.

Remember - we do not do backup and restore, we do clone the disks (correct name for what you need)
0
 
shaunwinginAuthor Commented:
Apologies for confusion.
Its not Ubuntu, but CentOS5.4
"unetbootin" --> command not found
0
 
gheistCommented:
unetbootin is a program that makes bootable cd from ISO
it does not matter which live-cd you install - mandriva one, netbsd, or centos

it needs to transfer image (usb devices listed in usbdevs and dmesg)
to a file on mounted usb filesystem.

it can be fat32 if you use unetbootin.
0
 
gheistCommented:
Recipe:

$ sudo bash
# dmesg|less
/mass storage
(guess the full disk name)
q
# dd if=/dev/xda of=/media/disk/dumpfile bs=4096
(takes some time to make a copy)
# poweroff

now you have raw disk image on your USB stick
0
 
shaunwinginAuthor Commented:
Tx and how do I restore it to a new raid hard disk?
0
 
shaunwinginAuthor Commented:
Please can you also elaborate on these commands. I have tried them but without success:
# dmesg|less
/mass storage
(guess the full disk name)

0
 
Davis McCarnOwnerCommented:
I'll bet this will make it much easier: http://www.gparted.org/
Get the Live CD which will let you easily copy partitions to and from just about anything.
0
 
shaunwinginAuthor Commented:
I've tried gparted - it doesn't allow copying of the RAID, when I tried. Any suggestions?
0
 
shaunwinginAuthor Commented:
0
 
shaunwinginAuthor Commented:
Gheist: When I tried copying with:" dd if=/dev/xda of=/media/disk/dumpfile bs=4096 " to the usb device (formatted in Win98) it returns error: Directory doesn't exist...
0
 
gheistCommented:
you have not mounted your USB drive. "Formated in win98" means 2GB file size limit.
"xda" disk name is WRONG, used as placeholder. You have to find yours from dmesg output.
0
 
shaunwinginAuthor Commented:
How do I mount the usb?
I repalced xda with the result of fdisk - l which was /dev/hdc1
I don't know how to use dmesg output....?
0
 
shaunwinginAuthor Commented:
Tx, this helps a lot. OS is CENTOS 5.4. What instructions would I use to restore it from the USB to the new hardware?
How would I omit slipstream?
0
 
shaunwinginAuthor Commented:
This is fdisk -l without the usb drive. There is an sda1 and 2 - do I back up both? How do I restore?
[root@localhost ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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       30377   243898830   8e  Linux LVM

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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       30377   243898830   8e  Linux LVM
[root@localhost ~]#
0
 
gheistCommented:
Actually your "RAID" controller is not a raid controller, just a space for config data for software RAID.
You back up one, then restore to both disks in new system.
0
 
shaunwinginAuthor Commented:
Ok, but still what exact commands are needed as per above fdisk -l
0
 
bouguiCommented:
Hi,

Maybe this will help you

First if you want to duplicate linux and windows server then this product will save you a lot of trouble Acronis true image http://www.acronis.com/backup-recovery/

If you cant buy the soft here is a litle how to

Source server

1) Find you usb drive id ( fdisk -l will help you find out the device name probably /dev/sdc1 )

2) make a linux FS on your usb drive mkfs.ext2  /dev/sdc1

3) boot with a live CD one from Centos should be fine

4) go into a shell ( root )

5) find your usb drvie ( fdisk -l )

6) mkdir /mnt/usb

7) mount your drive mount /dev/sdc1 /mnt/usb    ( replace c with the real id )

8) copy your 2 disks like this
dd if=/dev/sda of=/mnt/usb/sda.dd.out bs=1024k
dd if=/dev/sdb of=/mnt/usb/sdb.dd.out bs=1024k

your done on youre source server

Then boot your target server with you live cd

9) go into a shell ( root )

10) find your usb drvie ( fdisk -l )

11) mkdir /mnt/usb

12) mount your drive mount /dev/sdc1 /mnt/usb    ( replace c with the real id )

13) copy your 2 disks like this
dd if=/mnt/usb/sda.dd.out of=/dev/sda bs=1024k
dd if=/mnt/usb/sdb.dd.out of=/dev/sdb bs=1024k

This will copy all source server da ta to your target, It should also create the correct disk partition on the target

Note: If partition dont get created by the dd copy use http://www.gparted.org/ before step 13 to create those partitions

Also,  when all is done reformat to a dos format your usb drive mkfs.vfat /dev/sdc1 if you want to use it on windows machine.

you can look at http://www.partimage.org/Main_Page but it does not support software raid partition but could be use to copy your 4 partions but never try it

Good luck !

first I would format your usb drive to ext2
0
 
shaunwinginAuthor Commented:
Tx. Looks G8.
2) make a linux FS on your usb drive mkfs.ext2  /dev/sdc1
Will this format the usb. its god win98 partition on it already.
0
 
bouguiCommented:
YES step #2 will DESTROY any valid data on your USB drive so make sure you DON'T have anything that you want to keep there.

At the end don't forget to reformat to a windows format if you want to reused it for windows like said in my post.
0
 
gheistCommented:
you can use "split" command to write multiple 2GB files on FAT32
also if you have gigabit network g4u and good ftp server (like filezilla) you can distribute image via network.
0
 
shaunwinginAuthor Commented:
Tx.Please can you repeat the script above with the "split" command.
0
 
gheistCommented:
dd if=/dev/rawdisk bs=4096(or more) | gzip -1 | dd bs=4096 | split -b 1073741824(one gig pieces)  - /mnt/usbstick/
0
 
shaunwinginAuthor Commented:
Thank you  - hope to test soon....
0
 
shaunwinginAuthor Commented:
I've tried this split command by get an error. I was trying to copy image to a file. The idea is to restore it from the image. Please see my attempts:
Please see below."File size limit exceeded". I have tried :
dd if=/dev/sdb bs=4096 | gzip -1 | dd bs=4096 | split -b 1073741824 of=/mnt/myusb/DiskDump.bin
But see error below:
Tx
________________

[root@localhost /]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                     234222232   3911792 218220688   2% /
/dev/mapper/ddf1_250GMirrorp1
                        101086     19716     76151  21% /boot
tmpfs                   516832         0    516832   0% /dev/shm
/dev/sdc1            488263744 145548448 342715296  30% /mnt/myusb
[root@localhost /]#  dd if=/dev/sdb of=/mnt/myusb/DiskDump.bin bs=64k
File size limit exceeded
[root@localhost /]#
________________
[root@localhost /]# ls /mnt/myusb -sh
total 4.1G
4.0G DiskDump.binbs=64k
________________
[root@localhost /]# dd if=/dev/sdb bs=4096 | gzip -1 | dd bs=4096 | split -b 1073741824 of=/mnt/myusb/DiskDump.bin
split: 1073741824 of=/mnt/myusb/DiskDump.bin: invalid number of bytes
Try `split --help' for more information.
0
 
shaunwinginAuthor Commented:
Still not 100% solved but a long way.
0
 
gheistCommented:
Best you can do is to clone disk (Norton Ghost is not a valid cloning solution) and restore to same size disk setup
0
 
shaunwinginAuthor Commented:
Tx, but what software can one use for that. This is the results of my manual clone but its not working and rather complicated...

I've tried this split command by get an error. I was trying to copy image to a file. The idea is to restore it from the image. Please see my attempts:
Please see below."File size limit exceeded". I have tried :
dd if=/dev/sdb bs=4096 | gzip -1 | dd bs=4096 | split -b 1073741824 of=/mnt/myusb/DiskDump.bin
But see error below:
Tx
________________

[root@localhost /]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                     234222232   3911792 218220688   2% /
/dev/mapper/ddf1_250GMirrorp1
                        101086     19716     76151  21% /boot
tmpfs                   516832         0    516832   0% /dev/shm
/dev/sdc1            488263744 145548448 342715296  30% /mnt/myusb
[root@localhost /]#  dd if=/dev/sdb of=/mnt/myusb/DiskDump.bin bs=64k
File size limit exceeded
[root@localhost /]#
________________
[root@localhost /]# ls /mnt/myusb -sh
total 4.1G
4.0G DiskDump.binbs=64k
________________
[root@localhost /]# dd if=/dev/sdb bs=4096 | gzip -1 | dd bs=4096 | split -b 1073741824 of=/mnt/myusb/DiskDump.bin
split: 1073741824 of=/mnt/myusb/DiskDump.bin: invalid number of bytes
Try `split --help' for more information.
0
 
gheistCommented:
last command needs pure file name as last parameter (omit of=)
command before hits 4GB file size limit of FAT32
0
 
shaunwinginAuthor Commented:
Tx, but I'm confused as the is an sda and sdb. Must I backup both? How do I restore?

This is fdisk -l without the usb drive. There is an sda1 and 2 - do I back up both? How do I restore?
[root@localhost ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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       30377   243898830   8e  Linux LVM

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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       30377   243898830   8e  Linux LVM
[root@localhost ~]#
0
 
bouguiCommented:
Hi

I have provided a simpler solution which implied formating the usb drive and I think that formating a drive is a lot simpler than using the split command ....Also the price of the usb drive worth a lot less than the time that you took to try to resolve this don't you think ?

Just my 2 ¢
0
 
shaunwinginAuthor Commented:
Will have to study.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.