Partition soup!
March 15, 2008 11:11 AM Subscribe
Linux filter: I have a Fedora8 machine set up acting as a file server. I want to boot to software RAID5. More inside.
I have it all set up and running now, but in a sub-optimal (to me) way. It has three disks. On two, a 1gb /boot partition mirrored. On the third, a 1gb swap partition. Then the rest of the three drives are RAID5 mounted as root, containing everything else.
I know enough *nix to have done all that successfully.
What I'd like to be able to do is create a boot cd that does the job of that /boot partition, so that the three drives can be fully devoted to RAID5. The CD boots, gets the kernel loaded, mounts the RAID and the machine takes off like normal. In my mind, this would be a more "elegant" setup than the current partition soup.
In theory, I just create a cd with ISOLINUX and copy the boot partition to it. I just can't work out the step-by-step of it. My google-fu has failed me; all searches I can think of lead to livecds and rescue cds that have their own filesystems and tools installed on them.
Any ideas? Thanks in advance!
(swap would become a swap file rather than a partition- the system has enough memory that it really doesn't use swap at all, and I'm not using it as a workstation, so I don't anticipate that becoming a bottleneck. Worst case, I'd put in another drive just for swap)
I have it all set up and running now, but in a sub-optimal (to me) way. It has three disks. On two, a 1gb /boot partition mirrored. On the third, a 1gb swap partition. Then the rest of the three drives are RAID5 mounted as root, containing everything else.
I know enough *nix to have done all that successfully.
What I'd like to be able to do is create a boot cd that does the job of that /boot partition, so that the three drives can be fully devoted to RAID5. The CD boots, gets the kernel loaded, mounts the RAID and the machine takes off like normal. In my mind, this would be a more "elegant" setup than the current partition soup.
In theory, I just create a cd with ISOLINUX and copy the boot partition to it. I just can't work out the step-by-step of it. My google-fu has failed me; all searches I can think of lead to livecds and rescue cds that have their own filesystems and tools installed on them.
Any ideas? Thanks in advance!
(swap would become a swap file rather than a partition- the system has enough memory that it really doesn't use swap at all, and I'm not using it as a workstation, so I don't anticipate that becoming a bottleneck. Worst case, I'd put in another drive just for swap)
Response by poster: Thanks skatz, if I can't get the CD thing to work, I'll do that. I want to avoid adding that fourth drive if possible though.
You've set me on the right path I think.
I think I'll try to move /boot to a separate drive first.
If that works, try to move it to a USB key.
If that works, try to move it to a CD.
I think my problem is figuring out how to actually do options 2 and 3. I will google further. Anybody have further answers?
posted by gjc at 1:07 PM on March 15, 2008
You've set me on the right path I think.
I think I'll try to move /boot to a separate drive first.
If that works, try to move it to a USB key.
If that works, try to move it to a CD.
I think my problem is figuring out how to actually do options 2 and 3. I will google further. Anybody have further answers?
posted by gjc at 1:07 PM on March 15, 2008
If you have enough RAM, a swap partition is unnecessary. (There are some who would argue this, but I've run boxes successfully without swap.) If you do choose to omit the swap, I would set vm.swappiness = 0 in /etc/sysctl.conf
that being said, if your machine will boot off of USB, that's going to be the easiest solution.
find a small usb key (64MB should be plenty) format it and copy the contents of /boot to it.
Then, run grub-install with the correct device name. Once grub is installed on the device, reboot and try to boot from the USB key.
As long as that works, you can proceed to delete /boot from your internal disks, then use something like gparted to resize the partitions to recover the space.
posted by namewithoutwords at 1:24 PM on March 15, 2008
that being said, if your machine will boot off of USB, that's going to be the easiest solution.
find a small usb key (64MB should be plenty) format it and copy the contents of /boot to it.
Then, run grub-install with the correct device name. Once grub is installed on the device, reboot and try to boot from the USB key.
As long as that works, you can proceed to delete /boot from your internal disks, then use something like gparted to resize the partitions to recover the space.
posted by namewithoutwords at 1:24 PM on March 15, 2008
You really want to put your swap on the RAID, if you're using swap at all. Otherwise, consider what happens if the disk that fails is the disk that has swap on it.
My standard partitioning for a two-disk system is to have a /boot on disk a which gets copied after a successful boot to another unmounted partition on disk b; that way if disk a fails i've got a bootable disk b. And then the rest of the disk is a RAID 1, part swap (yes, mirrored swap, to solve the "what happens" problem) and the rest LVM.
If I were to do the same on raid 5, I'd have identical copies of boot on all the disks, and still tuck the entire running system inside the RAID.
(By the way, if you've got three disks, make sure they're all on their own controller, so one failed disk can't make another one incommunicative.)
posted by mendel at 6:18 PM on March 15, 2008
My standard partitioning for a two-disk system is to have a /boot on disk a which gets copied after a successful boot to another unmounted partition on disk b; that way if disk a fails i've got a bootable disk b. And then the rest of the disk is a RAID 1, part swap (yes, mirrored swap, to solve the "what happens" problem) and the rest LVM.
If I were to do the same on raid 5, I'd have identical copies of boot on all the disks, and still tuck the entire running system inside the RAID.
(By the way, if you've got three disks, make sure they're all on their own controller, so one failed disk can't make another one incommunicative.)
posted by mendel at 6:18 PM on March 15, 2008
for booting off a USB device, I'd recomment extlinux instead of GRUB... it's dumb as a rock, and won't give you the nice kernel package based boot options updater, but it makes USB booting Just Work without the futzing around GRUB requires...
added bonus is it uses the same config file as isolinux does, so that's one less thing to deal with for shifting to CD boot...
posted by russm at 4:08 AM on March 16, 2008
added bonus is it uses the same config file as isolinux does, so that's one less thing to deal with for shifting to CD boot...
posted by russm at 4:08 AM on March 16, 2008
This thread is closed to new comments.
that, or just boot from a usb key...
posted by skatz at 11:45 AM on March 15, 2008