How can I use fdisk to partition when installing CentOS4 instead of using 'auto' or disk-druid I want to make RAID 'fd' type partitions for hda and hdc
I tried every ctrl-alt Fx and can't get to a shell
TIA Gerald
Gerald Waugh wrote:
How can I use fdisk to partition when installing CentOS4 instead of using 'auto' or disk-druid I want to make RAID 'fd' type partitions for hda and hdc
I tried every ctrl-alt Fx and can't get to a shell
You can make RAID partitions with disk druid just fine. I did it just yesterday on a vanilla Intel 845 board with a couple of 400gig seagates.
Cheers,
C
On Mon, 2005-04-11 at 17:03 -0400, Chris Mauritz wrote:
Gerald Waugh wrote:
How can I use fdisk to partition when installing CentOS4 instead of using 'auto' or disk-druid I want to make RAID 'fd' type partitions for hda and hdc
You can make RAID partitions with disk druid just fine. I did it just yesterday on a vanilla Intel 845 board with a couple of 400gig seagates.
I was not able to make swap a raid partition And it is a little tricky, just making RAID partitions. Lets say make all partitions Software Raid on both disk Then use the RAID button to create the md devices and mount points.
But thanks for the help and answering my question ;)
Gerald
Gerald Waugh wrote:
I was not able to make swap a raid partition
Why would you want to do that? I generally create my partitions like this:
disk 1
swap 1024mb /boot 128mb / raid partition (all remaining space)
disk 2
swap 1024mb /backupboot 128mb / raid partition (all remaining space)
Then I either create a RAID 1 or RAID 0 (and sometimes even RAID 5) on the raid partitions depending on the level of redundancy/speed I want or need. This can all be done easily with disk druid during setup of CentOS 4.
cheers,
C
On Mon, 2005-04-11 at 16:42, Chris Mauritz wrote:
I was not able to make swap a raid partition
Why would you want to do that? I generally create my partitions like this:
disk 1 swap 1024mb /boot 128mb / raid partition (all remaining space)
disk 2 swap 1024mb /backupboot 128mb / raid partition (all remaining space)
Then I either create a RAID 1 or RAID 0 (and sometimes even RAID 5) on the raid partitions depending on the level of redundancy/speed I want or need. This can all be done easily with disk druid during setup of CentOS 4.
Won't such a machine crash when one of the drives containing swapped-out data dies?
On Mon, 2005-04-11 at 17:20 -0500, Les Mikesell wrote:
Won't such a machine crash when one of the drives containing swapped-out data dies?
Yep! swap must be mirrored.
For the life of me I can't get disk druid to create RAID partitions properly
Could someone give me a step-by-step ;) Please!
Gerald
Hello, Gerald.
This is my personnal step by step documentation about how to install software RAID with CentOS 3 or 4.
---------------------------
The easiest way to setup a software RAID filesystem is to create it at install time, when you install your RHEL with the CDs. When you come to the partitionning section of the installation at the beginning, you will be able to choose 'Disk Druid' to partition your disks. Choose this one and follow these steps:
1. Create your partitions as you normally do on the first disk. However, use the 'Software RAID' filesystem type instead of ext3. It's at the RAID level that you will specify the ext3 filesystem later. For the /boot partition, put it first and choose 'set as primary', because else disk druid will change it's order.
2. Once /boot, / and a swap partition (minimum) have been created, you must copy this partition information on the second drive, because the two disks must be identical. To do that, click on the 'RAID' button and choose 'clone drive'. Else you can just do exactly the same things that you did on the first drive to the second drive, it works fine also. I suggest you put 100Mb for /boot, and twice the RAM memory you have for the swap partition.
3. Create the software raid partitions, by clicking on 'RAID' and then 'create a RAID device like /dev/md0'. Once there, you have to choose which partitions to include to the mount point that you will specify. Here is the recommended method: - /boot = /dev/md0 (always 100Mb) - swap = /dev/md1 (between 1 to 4 Gb) - / = /dev/md2 (rest of the disk)
Also, choose the 'ext3' filesystem instead of 'ext2', which is much more reliable even if a little bit slower. Put the swap partition just after the boot partition, because then you should theoretically win some speed performance because it will be a short way between the swap and the RHEL root files installation (if you have hundreds of Gb on the root partition and you put the swap partition after that, then you might loose each time the whole length of the disk to seek the datas and this might be much longer..). Choose the RAID level you wish for each partition. RAID 0 is striped (doubles volume but no redundancy). RAID 1 is mirroring. It has redudancy and accelerates the read time. This is a very good level. RAID 5 needs at least 3 disks. Also, choose the RAID members for this RAID partition. You should put the correspondig partition for each disk hda and hdb only. This means that you will check only two partitions, one for each drive.
Once this is done, you can continue with the installation process. At the end, you will still have to make your second disk be bootable and save the partitions (see further on).
---------------------------
As for how to make both boot partitions boot so that if one of both disks fails the system would still boot up, this is my note about it, but works only for CentOS 3. On CentOS 4 I have no idea:
raidstop /dev/md0 fdisk /dev/hda type 't' and then '1' for boot partition, and then 'fd' for the Linux raid autodetect filesystem, and finally 'w' to save changes to the disk and quit. Do the same with the second disk of the array.
Hope this helps.
Daniel
----- Original Message ----- From: Gerald Waugh To: CentOS mailing list Sent: Tuesday, April 12, 2005 12:34 AM Subject: Re: [CentOS] Manual Paritioning with fdisk
On Mon, 2005-04-11 at 17:20 -0500, Les Mikesell wrote:
Won't such a machine crash when one of the drives containing swapped-out data dies?
Yep! swap must be mirrored.
For the life of me I can't get disk druid to create RAID partitions properly
Could someone give me a step-by-step ;) Please!
Gerald
_______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Tue, 2005-04-12 at 06:19 +0200, dan1 wrote:
Hello, Gerald.
This is my personnal step by step documentation about how to install software RAID with CentOS 3 or 4.
Dan,
Thanks for the info... Disk Druid was always a pain to me. I did get all the partitions into RAID1, except for /boot seems like when /boot is a raid array, the installer never ask where you want to put the mbr. Thus when you reboot, it can't boot up.
I also never seen that 'clone drive option' I'll try again tomorrow. Thanks again for a good write up.
Gerald
On Tue, 12 Apr 2005 at 1:34am, Gerald Waugh wrote
On Tue, 2005-04-12 at 06:19 +0200, dan1 wrote:
Hello, Gerald.
This is my personnal step by step documentation about how to install software RAID with CentOS 3 or 4.
Dan,
Thanks for the info... Disk Druid was always a pain to me. I did get all the partitions into RAID1, except for /boot seems like when /boot is a raid array, the installer never ask where you want to put the mbr. Thus when you reboot, it can't boot up.
A couple of quick notes:
1) Setting up software RAIDs is really easy if you kickstart. This is the partitioning section from one of my ks.cfg files that sets up a fully mirrored system on a box with 2 IDE drives (hda and hdc):
clearpart --all
part raid.01 --size=6144 --ondisk=hda --asprimary part raid.11 --size=6144 --ondisk=hdc --asprimary part raid.02 --size=4096 --ondisk=hda part raid.12 --size=4096 --ondisk=hdc part raid.03 --size=8192 --ondisk=hda part raid.13 --size=8192 --ondisk=hdc part raid.04 --size=1024 --ondisk=hda part raid.14 --size=1024 --ondisk=hdc part raid.05 --size=1024 --ondisk=hda part raid.15 --size=1024 --ondisk=hdc part raid.06 --size=1024 --grow --ondisk=hda part raid.16 --size=1024 --grow --ondisk=hdc
raid / --level=1 --device=md0 raid.01 raid.11 raid /usr/local --level=1 --device=md1 raid.02 raid.12 raid /home --level=1 --device=md2 raid.03 raid.13 raid /tmp --level=1 --device=md3 raid.04 raid.14 raid swap --level=1 --device=md4 raid.05 raid.15 raid /var --level=1 --device=md5 raid.06 raid.16
2) If you use grub, by default a system missing the non-primary boot drive (i.e., if hda in the above system died) won't boot. There are tricks out there to get a boot sector on the secondary boot drive. *However*, if you use LILO, you can tell it that 'boot=/dev/md0' and it will automatically make both drives bootable.
On Tue, 2005-04-12 at 07:00 -0400, Joshua Baker-LePain wrote:
- Setting up software RAIDs is really easy if you kickstart. This is the
partitioning section from one of my ks.cfg files that sets up a fully mirrored system on a box with 2 IDE drives (hda and hdc):
clearpart --all
part raid.01 --size=6144 --ondisk=hda --asprimary part raid.11 --size=6144 --ondisk=hdc --asprimary part raid.02 --size=4096 --ondisk=hda part raid.12 --size=4096 --ondisk=hdc part raid.03 --size=8192 --ondisk=hda part raid.13 --size=8192 --ondisk=hdc part raid.04 --size=1024 --ondisk=hda part raid.14 --size=1024 --ondisk=hdc part raid.05 --size=1024 --ondisk=hda part raid.15 --size=1024 --ondisk=hdc part raid.06 --size=1024 --grow --ondisk=hda part raid.16 --size=1024 --grow --ondisk=hdc
raid / --level=1 --device=md0 raid.01 raid.11 raid /usr/local --level=1 --device=md1 raid.02 raid.12 raid /home --level=1 --device=md2 raid.03 raid.13 raid /tmp --level=1 --device=md3 raid.04 raid.14 raid swap --level=1 --device=md4 raid.05 raid.15 raid /var --level=1 --device=md5 raid.06 raid.16
- If you use grub, by default a system missing the non-primary boot drive
(i.e., if hda in the above system died) won't boot. There are tricks out there to get a boot sector on the secondary boot drive. *However*, if you use LILO, you can tell it that 'boot=/dev/md0' and it will automatically make both drives bootable.
I see, never used kickstart, I did see anaconda.ks.cfg in root when an install is completed. So I guess one could edit anaconda.ks.cfg as one sees fit.
Not sure how to use it though. I suspect at the install 'boot' prompt I should enter some command.
Gerald
On Tue, 12 Apr 2005 08:12:43 -0400 Gerald Waugh gwaugh@frontstreetnetworks.com disait:
On Tue, 2005-04-12 at 07:00 -0400, Joshua Baker-LePain wrote:
- Setting up software RAIDs is really easy if you kickstart. This
is the partitioning section from one of my ks.cfg files that sets up a fully mirrored system on a box with 2 IDE drives (hda and hdc):
clearpart --all
part raid.01 --size=6144 --ondisk=hda --asprimary part raid.11 --size=6144 --ondisk=hdc --asprimary part raid.02 --size=4096 --ondisk=hda part raid.12 --size=4096 --ondisk=hdc part raid.03 --size=8192 --ondisk=hda part raid.13 --size=8192 --ondisk=hdc part raid.04 --size=1024 --ondisk=hda part raid.14 --size=1024 --ondisk=hdc part raid.05 --size=1024 --ondisk=hda part raid.15 --size=1024 --ondisk=hdc part raid.06 --size=1024 --grow --ondisk=hda part raid.16 --size=1024 --grow --ondisk=hdc
raid / --level=1 --device=md0 raid.01 raid.11 raid /usr/local --level=1 --device=md1 raid.02 raid.12 raid /home --level=1 --device=md2 raid.03 raid.13 raid /tmp --level=1 --device=md3 raid.04 raid.14 raid swap --level=1 --device=md4 raid.05 raid.15 raid /var --level=1 --device=md5 raid.06 raid.16
- If you use grub, by default a system missing the non-primary boot
drive (i.e., if hda in the above system died) won't boot. There are tricks out there to get a boot sector on the secondary boot drive. *However*, if you use LILO, you can tell it that 'boot=/dev/md0' and it will automatically make both drives bootable.
I see, never used kickstart, I did see anaconda.ks.cfg in root when an install is completed. So I guess one could edit anaconda.ks.cfg as one sees fit.
Not sure how to use it though. I suspect at the install 'boot' prompt I should enter some command.
Hello Gerald,
Look at "kickstart" section on the RHEL documentation ! http://www.centos.org/docs/4/html/rhel-sag-en-4/
On Tue, 2005-04-12 at 14:21 +0200, Martin Hamant wrote:
Look at "kickstart" section on the RHEL documentation ! http://www.centos.org/docs/4/html/rhel-sag-en-4/
Thanks, I found another reference; http://www.linux.duke.edu/dist/centos-4/install.ptml must be Joshua Baker-LePain?
Excuse my asking before searching...
Gerald
On Tue, 12 Apr 2005 at 8:30am, Gerald Waugh wrote
On Tue, 2005-04-12 at 14:21 +0200, Martin Hamant wrote:
Look at "kickstart" section on the RHEL documentation ! http://www.centos.org/docs/4/html/rhel-sag-en-4/
Thanks, I found another reference; http://www.linux.duke.edu/dist/centos-4/install.ptml must be Joshua Baker-LePain?
Oh no, that's not me. I'm just YALA here at Duke, not part of the Linux@Duke team. See http://www.linux.duke.edu/people.ptml for a list of those responsible.
Hello, Gerald.
You are welcome. The boot should occur if you stated that the boot partition is 'set as primary', for both disk drives individually ! To be clearer, you should do one partitionning on one disk and then redo exactly the same operations (including the 'set as primary' for the /boot partition) on the other disks. Then only you should go and create your RAID arrays. Then it should boot normally. I did it successfully with CentOS 3 and 4 so I might give you some more hints if you wish. But it's alwas easier when we know that it's possible. Just carefully follow the steps I indicated and it shold work fine.
The clone drive option might have disappeared but I did it by redoing the same thing manually for the second disk on CentOS 4. It takes you between 5 to 20 minutes to do it but you normally just do it once so it's worth the work.
Best regards,
Daniel
----- Original Message ----- From: Gerald Waugh To: CentOS mailing list Sent: Tuesday, April 12, 2005 7:34 AM Subject: Re: [CentOS] Manual Paritioning with fdisk
On Tue, 2005-04-12 at 06:19 +0200, dan1 wrote:
Hello, Gerald.
This is my personnal step by step documentation about how to install software RAID with CentOS 3 or 4.
Dan,
Thanks for the info... Disk Druid was always a pain to me. I did get all the partitions into RAID1, except for /boot seems like when /boot is a raid array, the installer never ask where you want to put the mbr. Thus when you reboot, it can't boot up.
I also never seen that 'clone drive option' I'll try again tomorrow. Thanks again for a good write up.
Gerald
_______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Les Mikesell wrote:
Won't such a machine crash when one of the drives containing swapped-out data dies?
I suppose that is a risk, but these machines all have 2-4gb of physical RAM. Perhaps it's a bad choice, but I've chosen to ignore this risk for the time being.
Cheers,
C
I have done Raid5 and Raid0 without any problems using DiskDruid.
jer
Gerald Waugh wrote:
How can I use fdisk to partition when installing CentOS4 instead of using 'auto' or disk-druid I want to make RAID 'fd' type partitions for hda and hdc
I tried every ctrl-alt Fx and can't get to a shell
TIA Gerald
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Mon, 2005-04-11 at 14:21 -0700, Jerry57 wrote:
I have done Raid5 and Raid0 without any problems using DiskDruid.
OK, tell me what I am doing wrong...
I make hda1 software raid and hdc1 software raid then use the RAID button, make RAID1 hda1 hdc1 OK I end up with hda1 hda2 as md1
Gerald
I make hda1 software raid and hdc1 software raid then use the RAID button, make RAID1 hda1 hdc1 OK I end up with hda1 hda2 as md1
Did you *only* create hda1 and hdc1? I vaguely remember a similar problem. And my workaround was to do only those two, then immediately use the RAID button to make md0. After md0 is created, create hda2 and hdc2, then RAID again to make md1.
And you should have no problem making any of the md devices a swap partition (just choose swap instead of ext2/ext3/reiserfs/LVM/etc.).
johnn
On Mon, 2005-04-11 at 15:56 -0700, Johnn Tan wrote:
I make hda1 software raid and hdc1 software raid then use the RAID button, make RAID1 hda1 hdc1 OK I end up with hda1 hda2 as md1
Did you *only* create hda1 and hdc1? I vaguely remember a similar problem. And my workaround was to do only those two, then immediately use the RAID button to make md0. After md0 is created, create hda2 and hdc2, then RAID again to make md1.
And you should have no problem making any of the md devices a swap partition (just choose swap instead of ext2/ext3/reiserfs/LVM/etc.).
Yes, I create hda1 and hdc1 as "Software Raid" then hit the RAID button. It says md0 and the partitions are hda1 and hdc1 I select RAID1, but when I hit OK and look at the display of partitions it indicates hda1 and hda2 and hdc reads unused.
Crazy I know!
Greald
On Mon, 2005-04-11 at 19:49 -0400, Gerald Waugh wrote:
Yes, I create hda1 and hdc1 as "Software Raid" then hit the RAID button. It says md0 and the partitions are hda1 and hdc1 I select RAID1, but when I hit OK and look at the display of partitions it indicates hda1 and hda2 and hdc reads unused.
Ok, I finally worked my way through the partitioning. I believe it may be because I didn't explicitly select the drive when I created the partitions (both were selected) A guess!
I have md0 as '/' md1 as swap and md2 as /home I then go through the install; it ask to install on the md0 partition. But I never see where it ask to put the mbr record.. Then when it finishes the install and reboot.. I get a screen with "GRUB" at the top and nothing else.
I have installed many times, without using RAID1 and all went well. Where am I going wrong? Gerald
On Mon, 2005-04-11 at 21:18 -0400, Gerald Waugh wrote:
Ok, I finally worked my way through the partitioning. I believe it may be because I didn't explicitly select the drive when I created the partitions (both were selected) A guess!
I have md0 as '/' md1 as swap and md2 as /home I then go through the install; it ask to install on the md0 partition. But I never see where it ask to put the mbr record.. Then when it finishes the install and reboot.. I get a screen with "GRUB" at the top and nothing else.
I read while searching for this problem that RHEL3 won't boot from a RAID partition, is that true of RHEL4 / CentOS4?
Gerald
On Mon, 2005-04-11 at 22:00 -0400, Gerald Waugh wrote:
On Mon, 2005-04-11 at 21:18 -0400, Gerald Waugh wrote:
Ok, I finally worked my way through the partitioning. I believe it may be because I didn't explicitly select the drive when I created the partitions (both were selected) A guess!
I have md0 as '/' md1 as swap and md2 as /home I then go through the install; it ask to install on the md0 partition. But I never see where it ask to put the mbr record.. Then when it finishes the install and reboot.. I get a screen with "GRUB" at the top and nothing else.
I read while searching for this problem that RHEL3 won't boot from a RAID partition, is that true of RHEL4 / CentOS4?
I believe so ... I usually make a 100MB /boot partition on the first drive and a similar sized /boot2 partition on the second drive and once things are up & running and use dd to copy the boot loader on the second drive and copy the files from /boot to /boot2 every time I update the kernel.
I have not had need to actually see if this will work and let me boot off a failed primary drive by swapping them yet.
Regards. Paul Berger
On Mon, 2005-04-11 at 21:14 -0500, Paul wrote:
I read while searching for this problem that RHEL3 won't boot from a RAID partition, is that true of RHEL4 / CentOS4?
I believe so ... I usually make a 100MB /boot partition on the first drive and a similar sized /boot2 partition on the second drive and once things are up & running and use dd to copy the boot loader on the second drive and copy the files from /boot to /boot2 every time I update the kernel.
Looks like your correct, if I make a small partition on each drive and format it ext3, then make the rest of the partitions RAID it works OK.
That disk druid is a mess, when trying to partition two drives. It keeps moving the dam partitions around. for example I partition hda like I want then make hdc1 to match hda1, then try to make another partition to match hda2, it will change the first partition to hdc2 and make the new one hdc1...
Gerald
On Mon, 2005-04-11 at 23:19 -0400, Gerald Waugh wrote:
On Mon, 2005-04-11 at 21:14 -0500, Paul wrote:
I read while searching for this problem that RHEL3 won't boot from a RAID partition, is that true of RHEL4 / CentOS4?
I believe so ... I usually make a 100MB /boot partition on the first drive and a similar sized /boot2 partition on the second drive and once things are up & running and use dd to copy the boot loader on the second drive and copy the files from /boot to /boot2 every time I update the kernel.
Looks like your correct, if I make a small partition on each drive and format it ext3, then make the rest of the partitions RAID it works OK.
That disk druid is a mess, when trying to partition two drives. It keeps moving the dam partitions around. for example I partition hda like I want then make hdc1 to match hda1, then try to make another partition to match hda2, it will change the first partition to hdc2 and make the new one hdc1...
That's why I tell it to put the partition on a specific drive ... it would be nice if you selected a particular drive then it would default to putting the partition on that drive.
Paul
Gerald
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Mon, 2005-04-11 at 22:34 -0500, Paul wrote:
On Mon, 2005-04-11 at 23:19 -0400, Gerald Waugh wrote:
On Mon, 2005-04-11 at 21:14 -0500, Paul wrote:
I read while searching for this problem that RHEL3 won't boot from a RAID partition, is that true of RHEL4 / CentOS4?
I believe so ... I usually make a 100MB /boot partition on the first drive and a similar sized /boot2 partition on the second drive and once things are up & running and use dd to copy the boot loader on the second drive and copy the files from /boot to /boot2 every time I update the kernel.
Looks like your correct, if I make a small partition on each drive and format it ext3, then make the rest of the partitions RAID it works OK.
That disk druid is a mess, when trying to partition two drives. It keeps moving the dam partitions around. for example I partition hda like I want then make hdc1 to match hda1, then try to make another partition to match hda2, it will change the first partition to hdc2 and make the new one hdc1...
That's why I tell it to put the partition on a specific drive ... it would be nice if you selected a particular drive then it would default to putting the partition on that drive.
I thought I did, when creating a partition there is hda and hdc, and I set the asterisk on the drive I am working on. Still does not work correctly. So I used a rescue disk, partitioned both drives as I wanted with fdisk. Then when I tried to make RAID partitions with disk druid, it would give member choices like hda2/hdc3 or hda4/hdc2, it never would let me create members like hda2/hdc2 and so forth.
Gerald
I've always created my own mirrored RAID arrays manually in the installer,
and made /boot a mirrored pair as well usually on MD0 and never had a problem with it booting from either disk.
Regards
Pete
Paul wrote:
On Mon, 2005-04-11 at 22:00 -0400, Gerald Waugh wrote:
On Mon, 2005-04-11 at 21:18 -0400, Gerald Waugh wrote:
Ok, I finally worked my way through the partitioning. I believe it may be because I didn't explicitly select the drive when I created the partitions (both were selected) A guess!
I have md0 as '/' md1 as swap and md2 as /home I then go through the install; it ask to install on the md0 partition. But I never see where it ask to put the mbr record.. Then when it finishes the install and reboot.. I get a screen with "GRUB" at the top and nothing else.
I read while searching for this problem that RHEL3 won't boot from a RAID partition, is that true of RHEL4 / CentOS4?
I believe so ... I usually make a 100MB /boot partition on the first drive and a similar sized /boot2 partition on the second drive and once things are up & running and use dd to copy the boot loader on the second drive and copy the files from /boot to /boot2 every time I update the kernel.
I have not had need to actually see if this will work and let me boot off a failed primary drive by swapping them yet.
Regards. Paul Berger
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Gerald Waugh wrote:
How can I use fdisk to partition when installing CentOS4 instead of using 'auto' or disk-druid I want to make RAID 'fd' type partitions for hda and hdc
I tried every ctrl-alt Fx and can't get to a shell
TIA Gerald
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
To answer your question,
you can use fdisk on a VT (ctrl-alt-F1 -> ctrl-alt-F6) during the install, thats what I do all the time with centos and FC3.
In anaconda, you may have to hit the 'back' button if you have already gone to the disk partitioning screen, this ensures that anaconda re-reads the partition table etc.
Cheers.