- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: software raid 1 (mirroring)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2006 07:11 AM
тАО01-30-2006 07:11 AM
software raid 1 (mirroring)
I currently have a RedHat AS 2.1 system set up with the following partitions on 1 scsi disk:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/ida/c0d0p5 3.9G 3.1G 660M 83% /
/dev/ida/c0d0p1 50M 18M 29M 38% /boot
/dev/ida/c0d0p2 14G 8.0G 4.9G 62% /home
none 1.8G 0 1.8G 0% /dev/shm
/dev/ida/c0d0p6 3.9G 2.6G 1.1G 69% /usr
$
I have installed the raidtools rpm and would like to set up software raid 1 (mirroring) to another scsi disk (c1d0). I have used mirroring in HPUX in the past, but am some problems with linux. I have tried a few sets of procedures that I have found online but have had troubles. Does anyone have a tested method that I can use?
Thank you in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2006 07:27 AM
тАО01-30-2006 07:27 AM
Re: software raid 1 (mirroring)
First use fdisk -l to list the partitions on the original disk.
Then use fdisk to carefully set up partitions on the secondary disk.
http://www.linuxjournal.com/article/5653
The article above is useful for completing the task. The hairy part is properly partitioning the second disk. There will probably be some wasted disk, which you might want to set up for some unprotected scratch space.
In the above article are good links to more resources on raid 1.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2006 07:29 AM
тАО01-30-2006 07:29 AM
Re: software raid 1 (mirroring)
You should use your raid controller features to enable hardware raid.
There are chances that you can do a hardware raid without loosing the data. Check your controller model and documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2006 11:58 AM
тАО01-30-2006 11:58 AM
Re: software raid 1 (mirroring)
Since you are on RH 2.1 you will need to use the "raidtab" functions and not "mdadm". The differences in these two should be clear in the howto. I didn't check to see that mdadm is there but I did see some of the raidtab documentation.
BTW - for RH 2.1 I believe it is difficult to set up /boot on raid. It may be documented in the howto.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2006 11:33 PM
тАО01-30-2006 11:33 PM
Re: software raid 1 (mirroring)
http://fy.chalmers.se/~appro/linux/HOWTO-mirror-root.html
The trick is to create the raid specifying your current "used" partition as failed, otherwise you will loose all data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2006 06:53 AM
тАО02-09-2006 06:53 AM
Re: software raid 1 (mirroring)
However I am not able to mirror the / (root) filesystem. I also need some advice on setting up the boot loader. Has anyone done this before? Can I set up the raidtab file for / as md0 and run raidstart while the filesystem is mounted - or will that corrupt my root fs?? If tried to boot in recovery mode to mirror the root fs and still had issues.
If anybody has a cookbook on how to set up a mirror of all of my filesystems including / and /boot I would appreciate that.
The filesystems that I have are:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/ida/c0d0p5 3.9G 3.1G 660M 83% /
/dev/ida/c0d0p1 50M 18M 29M 38% /boot
/dev/ida/c0d0p2 14G 8.0G 4.9G 62% /home
none 1.8G 0 1.8G 0% /dev/shm
/dev/ida/c0d0p6 3.9G 2.6G 1.1G 69% /usr
$
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2006 07:26 AM
тАО02-09-2006 07:26 AM
Re: software raid 1 (mirroring)
http://trinityhome.org/misc/bootable-raid1.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2006 11:16 PM
тАО02-12-2006 11:16 PM
Re: software raid 1 (mirroring)
Just in case you don't realize, and as Ivan said, I saw that your scsi controler seems to be a Raid one.
/dev/ida is the linux device for Compaq/HP smart array raid controler.
Then, I don't really understand why you're trying to use software raid instead of hardware raid, even if soft raid works well.
Regards,
Lionel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2006 04:25 AM
тАО02-13-2006 04:25 AM
Re: software raid 1 (mirroring)
The scsi controller can handle raid 1, but I believe its set up as raid 0 now. This is how it was installed. If I went ahead to change to raid 1 the disk would get reformatted.
Thanks,
Vanja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2006 04:30 AM
тАО02-13-2006 04:30 AM
Re: software raid 1 (mirroring)
If its not a boot disk, all data will be lost.
You need to back up the data prior to trying this.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2006 04:42 AM
тАО02-17-2006 04:42 AM
Re: software raid 1 (mirroring)
[root@linux22 root]# cat /etc/fstab
/dev/cciss/c0d1p5 / ext3 defaults
1 1
/dev/cciss/c0d1p1 /boot ext3 defaults
1 2
none /dev/pts devpts gid=5,mode=620 0 0
/dev/cciss/c0d1p2 /home ext3 defaults
1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cciss/c0d1p3 /usr ext3 defaults
1 2
/dev/cciss/c0d1p6 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0
0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
[root@linux22 root]# cat /etc/raidtab
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 4
persistent-superblock 1
device /dev/cciss/c0d0p5
raid-disk 0
device /dev/cciss/c0d1p5
raid-disk 1
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
chunk-size 4
persistent-superblock 1
device /dev/cciss/c0d0p1
raid-disk 0
device /dev/cciss/c0d1p1
raid-disk 1
raiddev /dev/md2
raid-level 1
nr-raid-disks 2
chunk-size 4
persistent-superblock 1
device /dev/cciss/c0d0p2
raid-disk 0
device /dev/cciss/c0d1p2
raid-disk 1
raiddev /dev/md3
raid-level 1
nr-raid-disks 2
chunk-size 4
persistent-superblock 1
device /dev/cciss/c0d0p3
raid-disk 0
device /dev/cciss/c0d1p3
raid-disk 1
[root@linux22 root]#
This is my lilo.conf file:
[root@linux22 root]# more /etc/lilo.conf
prompt
timeout=50
default=linux
boot=/dev/cciss/c0d1
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
image=/boot/vmlinuz-2.4.9-e.3smp
label=linux
initrd=/boot/initrd-2.4.9-e.3smp.img
read-only
root=/dev/cciss/c0d1p5
image=/boot/vmlinuz-2.4.9-e.3
label=linux-up
initrd=/boot/initrd-2.4.9-e.3.img
read-only
root=/dev/cciss/c0d1p5
[root@linux22 root]#
I can change the c0d1 and c0d1p5 to c0d0 and c0d0p5 to boot from the other root disk. However I'm not able to boot from the /dev/md0 device when I set "root=/dev/md0"
[root@linux22 root]# lilo -V
LILO version 21.4-4
[root@linux22 root]#
Also if my system is set up to boot using lilo.conf - how can I change it to boot using grub.conf.
The grub.conf reads:
[root@linux22 root]# more /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/cciss/c0d0p5
# initrd /initrd-version.img
#boot=/dev/cciss/c0d0
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux Advanced Server (2.4.9-e.3smp)
root (hd0,0)
kernel /vmlinuz-2.4.9-e.3smp ro root=/dev/cciss/c0d0p5
initrd /initrd-2.4.9-e.3smp.img
title Red Hat Linux Advanced Server-up (2.4.9-e.3)
root (hd0,0)
kernel /vmlinuz-2.4.9-e.3 ro root=/dev/cciss/c0d0p5
initrd /initrd-2.4.9-e.3.img
[root@linux22 root]#
And also how would I need to modify the grub.conf to be able to boot from /dev/md0?
Any help appreciated.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2006 05:16 AM
тАО02-17-2006 05:16 AM
Re: software raid 1 (mirroring)
Try something like this:
# mkinitrd --preload raid1 /boot/initrd-`uname -r`.img `uname -r`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2006 05:18 AM
тАО02-17-2006 05:18 AM
Re: software raid 1 (mirroring)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2006 05:55 AM
тАО02-17-2006 05:55 AM
Re: software raid 1 (mirroring)
Thanks again for the follow up. I've already tried that route. I thnik I'm gonna give up on the sw raid - trying to boot from /dev/md0 anyway.
Since I have a DL760 I'm gonna try to reinstall the OS with the same partition sizes as the original on a HW raid 1 device (comprised of 2 x 36GB disks) and then copy the OS from the original install filesystems to the new raid 1 devices.
Since the OS/kernel level will be the same on the new image as on the old would it be safe to do a "cp -a" for all of the old filesystems - ie. /, /boot, /usr, and /home? Should I omit any files when doing this copy. I assume to omit /etc/fstab and /etc/lilo.conf - is there anything else that I should omit with the copy or anything else to watch out for since I've never done this before.
Thanks,
Vanja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2006 06:19 AM
тАО02-17-2006 06:19 AM
Re: software raid 1 (mirroring)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2006 06:52 AM
тАО02-17-2006 06:52 AM
Re: software raid 1 (mirroring)
Here's the content of the grub.conf:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux Advanced Server (2.4.9-e.3smp)
root (hd0,0)
kernel /vmlinuz-2.4.9-e.3smp ro root=/dev/cciss/c0d0p5
initrd /initrd-2.4.9-e.3smp.img
title Red Hat Linux Advanced Server-up (2.4.9-e.3)
root (hd0,0)
kernel /vmlinuz-2.4.9-e.3 ro root=/dev/cciss/c0d0p5
initrd /initrd-2.4.9-e.3.img
Thanks,
Vanja