First of all, my apologies for hijacking a thread belonging to another subject. Thanks to Patrick Shanahan for point that out. After searching through the archives and on google, I cannot find any clear cut answer to my questions below. Many thanks in advance to anyone on here who can help answer. Sorry if the questions seem naive, but I rather new overall to Linux, and the SUSE distribution in particular. I have been running RH for some time now and am now thinking of moving to SUSE. I bought the SUSE 9.0 boxed set but have some questions before I start building and moving my production boxes over to SUSE from RH. Here is my current RH setup. 2 IDE disks 3 partitions on each disk. Each partition on one disk is mirrored to the corresponding partition on the other disk using software raid (/dev/mdxx). /dev/md0 is / /dev/md1 is /boot /dev/md2 is swap Also, on RH, I use GRUB to boot. My question is can I do the same on SUSE 9.0? From what I have been able to gather, GRUB cannot be used on SUSE if the root filesystem is on a software raid partition. The documentation is not very clear on this. The documentation states that SUSE setup installs LILO by default if the root is on software RAID, but does not state whether GRUB cannot be used at all or not. The archives all talk about previous versions of SUSE, so I am not sure whether one can boot with GRUB with the root on software RAID with SUSE 9.0. If I cannot use GRUB, I am willing (really have no choice!) to use LILO. My next question is can the above mentioned disk layout be achieved during the initial SUSE setup? Does their installation routine provide the capability to have all file systems and swap on software raid? -- --Moby They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin First they came for the Jews and I did not speak out because I was not a Jew. Then they came for the Communists and I did not speak out because I was not a Communist. Then they came for the trade unionists and I did not speak out because I was not a trade unionist. Then they came for me and there was no one left to speak out for me. -- Pastor Martin Niemöller
The Tuesday 2003-12-23 at 10:54 -0600, Mobeen Azhar wrote:
First of all, my apologies for hijacking a thread belonging to another subject. Thanks to Patrick Shanahan for point that out.
After searching through the archives and on google, I cannot find any clear cut answer to my questions below. Many thanks in advance to anyone on here who can help answer. Sorry if the questions seem naive, but I rather new overall to Linux, and the SUSE distribution in particular.
I have been running RH for some time now and am now thinking of moving to SUSE. I bought the SUSE 9.0 boxed set but have some questions before I start building and moving my production boxes over to SUSE from RH.
Here is my current RH setup.
2 IDE disks
3 partitions on each disk. Each partition on one disk is mirrored to the corresponding partition on the other disk using software raid (/dev/mdxx).
/dev/md0 is / /dev/md1 is /boot /dev/md2 is swap
Also, on RH, I use GRUB to boot.
My question is can I do the same on SUSE 9.0? From what I have been able to gather, GRUB cannot be used on SUSE if the root filesystem is on a software raid partition. The documentation is not very clear on this. The documentation states that SUSE setup installs LILO by default if the root is on software RAID, but does not state whether GRUB cannot be used at all or not. The archives all talk about previous versions of SUSE, so I am not sure whether one can boot with GRUB with the root on software RAID with SUSE 9.0.
If I cannot use GRUB, I am willing (really have no choice!) to use LILO. My next question is can the above mentioned disk layout be achieved during the initial SUSE setup? Does their installation routine provide the capability to have all file systems and swap on software raid?
I suppose it is possible, but I haven't personally tried. However, from what I read, it may not be necessary to place swap on raid, because the kernel can achieve a similar behavior on its own. The Software-RAID HOWTO Jakob Østergaard (jakob@unthought.net) v0.90.8, 2002-08-05 ... 2.5. Swapping on RAID There's no reason to use RAID for swap performance reasons. The kernel itself can stripe swapping on several devices, if you just give them the same priority in the fstab file. A nice fstab looks like: /dev/sda2 swap swap defaults,pri=1 0 0 /dev/sdb2 swap swap defaults,pri=1 0 0 ... Another thing is reliability, of course. The howto explains it. About grub, the howto says: Newer LILO distributions can handle RAID-1 devices, and thus the kernel can be loaded at boot-time from a RAID device. LILO will correctly write boot-records on all disks in the array, to allow booting even if the primary disk fails. The author does not yet know of any easy method for making the Grub boot-loader write the boot-records on all disks of a RAID-1. Please share your wisdom if you know how to do this. And of course, there is a chapter on the SuSE manual about raid. -- Cheers, Carlos Robinson
Thanks for your response Carlos. I guess the only way to find out is to try it. I am not placing swap on RAID for performance, but rather for fault tolerance. The bit about the kernel handling swap on multiple devices and increasing performance is correct as far as performance improvement is concerned, but my reason for putting swap on raid is to protect the system from crashing in case of drive failure. --Moby Carlos E. R. wrote:
The Tuesday 2003-12-23 at 10:54 -0600, Mobeen Azhar wrote:
First of all, my apologies for hijacking a thread belonging to another subject. Thanks to Patrick Shanahan for point that out.
After searching through the archives and on google, I cannot find any clear cut answer to my questions below. Many thanks in advance to anyone on here who can help answer. Sorry if the questions seem naive, but I rather new overall to Linux, and the SUSE distribution in particular.
I have been running RH for some time now and am now thinking of moving to SUSE. I bought the SUSE 9.0 boxed set but have some questions before I start building and moving my production boxes over to SUSE from RH.
Here is my current RH setup.
2 IDE disks
3 partitions on each disk. Each partition on one disk is mirrored to the corresponding partition on the other disk using software raid (/dev/mdxx).
/dev/md0 is / /dev/md1 is /boot /dev/md2 is swap
Also, on RH, I use GRUB to boot.
My question is can I do the same on SUSE 9.0? From what I have been able to gather, GRUB cannot be used on SUSE if the root filesystem is on a software raid partition. The documentation is not very clear on this. The documentation states that SUSE setup installs LILO by default if the root is on software RAID, but does not state whether GRUB cannot be used at all or not. The archives all talk about previous versions of SUSE, so I am not sure whether one can boot with GRUB with the root on software RAID with SUSE 9.0.
If I cannot use GRUB, I am willing (really have no choice!) to use LILO. My next question is can the above mentioned disk layout be achieved during the initial SUSE setup? Does their installation routine provide the capability to have all file systems and swap on software raid?
I suppose it is possible, but I haven't personally tried. However, from what I read, it may not be necessary to place swap on raid, because the kernel can achieve a similar behavior on its own.
The Software-RAID HOWTO Jakob Østergaard (jakob@unthought.net) v0.90.8, 2002-08-05 ... 2.5. Swapping on RAID
There's no reason to use RAID for swap performance reasons. The kernel itself can stripe swapping on several devices, if you just give them the same priority in the fstab file.
A nice fstab looks like:
/dev/sda2 swap swap defaults,pri=1 0 0 /dev/sdb2 swap swap defaults,pri=1 0 0 ... Another thing is reliability, of course. The howto explains it.
About grub, the howto says:
Newer LILO distributions can handle RAID-1 devices, and thus the kernel can be loaded at boot-time from a RAID device. LILO will correctly write boot-records on all disks in the array, to allow booting even if the primary disk fails.
The author does not yet know of any easy method for making the Grub boot-loader write the boot-records on all disks of a RAID-1. Please share your wisdom if you know how to do this.
And of course, there is a chapter on the SuSE manual about raid.
-- --Moby They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin First they came for the Jews and I did not speak out because I was not a Jew. Then they came for the Communists and I did not speak out because I was not a Communist. Then they came for the trade unionists and I did not speak out because I was not a trade unionist. Then they came for me and there was no one left to speak out for me. -- Pastor Martin Niemöller
The Tuesday 2003-12-23 at 21:12 -0600, Mobeen Azhar wrote:
Thanks for your response Carlos. I guess the only way to find out is to try it.
As we say here, test it with soda water - meaning, don't try it on a production machine. :-)
I am not placing swap on RAID for performance, but rather for fault tolerance. The bit about the kernel handling swap on multiple devices and increasing performance is correct as far as performance improvement is concerned, but my reason for putting swap on raid is to protect the system from crashing in case of drive failure.
I know, the howto says so as well. Assuming, of course, the HD doesn't crash too hard, but in any case, you increase your survival chances :-)
--Moby Carlos E. R. wrote:
The Tuesday 2003-12-23 at 10:54 -0600, Mobeen Azhar wrote:
Er... no need to repost the full quoted text, please. -- Cheers, Carlos Robinson
I have been running RH for some time now and am now thinking of moving to SUSE. I bought the SUSE 9.0 boxed set but have some questions before I start building and moving my production boxes over to SUSE from RH.
Here is my current RH setup.
2 IDE disks
3 partitions on each disk. Each partition on one disk is mirrored to the corresponding partition on the other disk using software raid (/dev/mdxx).
/dev/md0 is / /dev/md1 is /boot /dev/md2 is swap Ditch the /dev/md2 as swap setup, it only complicates things. IMO just make
On Tuesday 23 December 2003 10:54 am, Mobeen Azhar wrote: them swap partitions on hda and hdb and have two fstab entries with the same priority, you will gain a small speed beinifit as there shouldnt be any great need to mirror swap data. The kernel will natrually stripe it for performance.
Also, on RH, I use GRUB to boot.
My question is can I do the same on SUSE 9.0? Yes. You can do this. GRUB cannot be used on SUSE if the root filesystem is on a software raid partition. I dont know about grub, but I know for a fact that LILO support it. My setup is 3x9.4GB scsi disks. 2 partitions. /dev/md0 RAID 5, root /dev/md1 RAID 0,boot The archives all talk about previous versions of SUSE, so I am not sure whether one can boot with GRUB with the root on software RAID with SUSE 9.0. Is there a specific NEED to use GRUB? Just use lilo and I can whip you up a conig by hand, lol. GRUB is strange and confusing to me. LILO by contrast seems so much simpler. Although I believe GRUB is more powerful and flexible. If I cannot use GRUB, I am willing (really have no choice!) to use LILO. My next question is can the above mentioned disk layout be achieved during the initial SUSE setup? Does their installation routine provide the capability to have all file systems and swap on software raid? The swap question has been answered. I dont know about the install routine, but you definatly can do it after install. Since you are doing mirroring it will be a very simple setup. My setup is more complicated with raid 5, but it should be a breeze for you. Here is a sample of my lilo file.
boot = /dev/md1 #<---this is my /boot drive. This ABSOLUTELY MUST BE A RAID #MIRROR OR A SINGLE DRIVE, NO STRIPES ALLOWED. compact lba32 vga=normal #message=/boot/message menu-scheme=Wg:kw:Wg:Wg read-only prompt timeout=80 raid-extra-boot="/dev/sda,/dev/sdb,/dev/sdc" #<--- This will write the lilo #MBR to each disk so if one fails it can boot from another. disk=/dev/sda bios=0x81 disk=/dev/hdc bios=0x80 # You will not need the above disk mappings. Ignore them. image= /boot/bzImage-2.4.23-SMP root = /dev/md0 #<------ my / filesystem on RAID5 label = Linux append = "mem=nopentium hda=ide-scsi init=/sbin/minit md=0,/dev/sda1,/dev/sdb1,/dev/sdc1 acpi=off" #The md=0 option above may be needed so the kernel can figure out how the #disks are ordered and mount is properly. YOu may not need this for a mirror #but im pretty sure its neccesary for striping Below is an approxomation of what your lilo.conf file should look like. Check it over though, im guessing at your setup. boot = /dev/md1 compact lba32 vga=normal read-only prompt timeout=80 raid-extra-boot="/dev/hda,/dev/hdb" image= /boot/bzImage root = /dev/md0 label = Linux append = "md=0,/dev/hda1,/dev/hdb1" HTH! And good luck. If you have any more questions just ask, because I am using almost the same setup you require. Yours is just a bit simpler ;) CC me in your reply, ill get back to you faster. ------------------------- Eric Bambach Eric at cisu dot net -------------------------
Thanks for your response Eric. The only reason I am putting swap on RAID is for software tolerance, not for performance. I do not want any of the drives holding parts of swap to crash the system if they go bad. I do realize that the kernel can handle swap efficiently if I put it on multiple devices and set all to the same priority. It looks like I will have to go with LILO instead of GRUB. No biggie, I have no serious qualms about giving up on GRUB. The only questions I have remaining after your response is the fact that I might have to establish the RAID after the initial setup. As far as I understand this process, I will basically partition and setup the system on hda, then create the corresponding partitions on hdb, create an appropriate raiddtab file, run the raid tools to create the mirror, update my fstab and lilo.conf and reboot. Is this it or am I missing some glaring piece if I have to create the mirror after I setup the initial system? Thanks again Eric, --Moby Eric wrote:
On Tuesday 23 December 2003 10:54 am, Mobeen Azhar wrote:
I have been running RH for some time now and am now thinking of moving to SUSE. I bought the SUSE 9.0 boxed set but have some questions before I start building and moving my production boxes over to SUSE from RH.
Here is my current RH setup.
2 IDE disks
3 partitions on each disk. Each partition on one disk is mirrored to the corresponding partition on the other disk using software raid (/dev/mdxx).
/dev/md0 is / /dev/md1 is /boot /dev/md2 is swap
Ditch the /dev/md2 as swap setup, it only complicates things. IMO just make them swap partitions on hda and hdb and have two fstab entries with the same priority, you will gain a small speed beinifit as there shouldnt be any great need to mirror swap data. The kernel will natrually stripe it for performance.
Also, on RH, I use GRUB to boot.
My question is can I do the same on SUSE 9.0?
Yes. You can do this.
GRUB cannot be used on SUSE if the root filesystem is on a software raid partition.
I dont know about grub, but I know for a fact that LILO support it. My setup is 3x9.4GB scsi disks. 2 partitions. /dev/md0 RAID 5, root /dev/md1 RAID 0,boot
The archives all talk about previous versions of SUSE, so I am not sure whether one can boot with GRUB with the root on software RAID with SUSE 9.0.
Is there a specific NEED to use GRUB? Just use lilo and I can whip you up a conig by hand, lol. GRUB is strange and confusing to me. LILO by contrast seems so much simpler. Although I believe GRUB is more powerful and flexible.
If I cannot use GRUB, I am willing (really have no choice!) to use LILO. My next question is can the above mentioned disk layout be achieved during the initial SUSE setup? Does their installation routine provide the capability to have all file systems and swap on software raid?
The swap question has been answered. I dont know about the install routine, but you definatly can do it after install. Since you are doing mirroring it will be a very simple setup. My setup is more complicated with raid 5, but it should be a breeze for you. Here is a sample of my lilo file.
boot = /dev/md1 #<---this is my /boot drive. This ABSOLUTELY MUST BE A RAID #MIRROR OR A SINGLE DRIVE, NO STRIPES ALLOWED. compact lba32 vga=normal #message=/boot/message menu-scheme=Wg:kw:Wg:Wg read-only prompt timeout=80 raid-extra-boot="/dev/sda,/dev/sdb,/dev/sdc" #<--- This will write the lilo #MBR to each disk so if one fails it can boot from another. disk=/dev/sda bios=0x81 disk=/dev/hdc bios=0x80 # You will not need the above disk mappings. Ignore them. image= /boot/bzImage-2.4.23-SMP root = /dev/md0 #<------ my / filesystem on RAID5 label = Linux append = "mem=nopentium hda=ide-scsi init=/sbin/minit md=0,/dev/sda1,/dev/sdb1,/dev/sdc1 acpi=off" #The md=0 option above may be needed so the kernel can figure out how the #disks are ordered and mount is properly. YOu may not need this for a mirror #but im pretty sure its neccesary for striping
Below is an approxomation of what your lilo.conf file should look like. Check it over though, im guessing at your setup.
boot = /dev/md1 compact lba32 vga=normal read-only prompt timeout=80 raid-extra-boot="/dev/hda,/dev/hdb" image= /boot/bzImage root = /dev/md0 label = Linux append = "md=0,/dev/hda1,/dev/hdb1"
HTH! And good luck. If you have any more questions just ask, because I am using almost the same setup you require. Yours is just a bit simpler ;) CC me in your reply, ill get back to you faster. ------------------------- Eric Bambach Eric at cisu dot net -------------------------
-- --Moby They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin First they came for the Jews and I did not speak out because I was not a Jew. Then they came for the Communists and I did not speak out because I was not a Communist. Then they came for the trade unionists and I did not speak out because I was not a trade unionist. Then they came for me and there was no one left to speak out for me. -- Pastor Martin Niemöller
The Wednesday 2003-12-24 at 12:46 -0600, Mobeen Azhar wrote:
The only questions I have remaining after your response is the fact that I might have to establish the RAID after the initial setup. As far as I understand this process, I will basically partition and setup the system on hda, then create the corresponding partitions on hdb, create an appropriate raiddtab file, run the raid tools to create the mirror, update my fstab and lilo.conf and reboot. Is this it or am I missing some glaring piece if I have to create the mirror after I setup the initial system?
There is some mention on the SuSE manuals (printed or electronic) on setting up raid from the install point, so check it. It might work. I suppose it means going to expert mode in yast, create custom partitions, and use them. If they already exist (as autoraid), I suppose you can simply select them). -- Cheers, Carlos Robinson
Thanks for your response Eric.
The only reason I am putting swap on RAID is for software tolerance, not for performance. I do not want any of the drives holding parts of swap to crash the system if they go bad. I do realize that the kernel can handle swap efficiently if I put it on multiple devices and set all to the same priority. Ok, thats a valid reason.... just remember that writes will be slighty slower with RAID mirroring because it has to deal with two drives. Other than that have fun! It looks like I will have to go with LILO instead of GRUB. No biggie, I have no serious qualms about giving up on GRUB. Yea, again I KNOW it can be done with lilo, but I have no experience with grub. The only questions I have remaining after your response is the fact that I might have to establish the RAID after the initial setup. As far as I understand this process, I will basically partition and setup the system on hda, then create the corresponding partitions on hdb, create an appropriate raiddtab file, run the raid tools to create the mirror, update my fstab and lilo.conf and reboot. Is this it or am I missing some glaring piece if I have to create the mirror after I setup the initial system? Hmmm...this is a bit tricky. My guess is that installing the system, and then creating the raid superblock using raidtools will destroy any data you currently had on the drive. Hmmm..... with a mirror setup though it might be
On Wednesday 24 December 2003 12:46 pm, Mobeen Azhar wrote: possible, because the drives are simply copes of each other. Just make sure each drive has a raid superblock and has been partitioned as part of a raid device before you install on it. (I believe you already have this kind of setup) Then, when you get into the SuSE installation, just have it format hda1 hda2 hda3 etc. Later you might be able to add this drive to a RAID mirroralong with a blank hdb1 hdb2 hdb3. SuSE lately has been real great at audodetecting RAID setups so it might show up as /dev/md0 and /dev/md1and /dev/md2 and you will be able to specify them as / and /boot and swap. Lets hope for that! The rescue disks always detect my raid setups flawlessly, I don't see why the install wouldn't. Try to stay away from installing on a drive then using it as part of a mirror though, I don't have enough experience to say it will or wont work, but it sounds very dangerous and time consuming if it doesn't work. Hopefully someone with more definate info can comment on above as say it is/isn't possible. Heres an excerpt from the mkraid manual -Note that initializing RAID devices destroys all of the data on the consituent devices. Hopefully you wont have to mkraid though. If you kept the raid superblocks and partition types set it might init the array for you and start rebuilding when you first boot the system. Maybe it will decide that the one you installed onto is newer and do the mirror properly, however it mgiht destroy the contents of both. What I would do is use a 3rd disk temporarily and install to that. It might be a slight hassle, but this is guaranteed to work if you have the knowledge and the time. Hdc or something. Some 4-6GB disk, anything you have laying around, and then when you have the system installed, boot to a rescue system. Mount hdc as /mnt1 and /dev/md0 as /mnt2 and /dev/md1 and /mnt3. (I assume you've already created the raid sytstems. If not the SuSE rescue disks have raidtools on them and the mkfs tools.) Then just copy over the filesystem structure making sure to preserve permissions and such. I love linux so much because upgrading HD's requires such a simple cp -pavx and an fstab/lilo..conf update. So just copy over the directories as required using cp -pavx So with all that rambling heres my final suggestion. Boot into the SuSE install and see if it autodetects your arrays. If not, and you have no problems possibly losing some time, try to install like you suggested. However, be prepared to have it try to blank your disk and lose the install in the process. Then, lastly go the safe route and use a 3rd disk.
Thanks again Eric, --Moby
------------------------- Eric Bambach Eric at cisu dot net -------------------------
participants (3)
-
Carlos E. R.
-
Eric
-
Mobeen Azhar