[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can squeeze boot into a LVM over RAID?



I have a few machines with Raid 5 with LVM on top.  Here is what I can share with you.  You must have grub2 installed ( I believe it is default now but I always specify when installing.)  your ARRAY info from mdadm -D --scan must be in your /etc/mdadm/mdadm.conf file and be accurate.  When I change something, I make sure /boot/grub/device.map is accurate and up to date.  I make initrd is up to date. I then run update-grub2.  then I run :
for i in a b c d e (for whatever drives you have); do
 install-grub /dev/sd$(echo $i)
done

This makes sure the grub image file is installed and updated on whatever drive is the boot drive.  I have run into problems with DOS compatible partitions.  To overcome this I don't use DOS compatibility in fdisk anymore and use sectors for partitioning.

So far works wonderfully and I don't have to have /boot separate. 

I have run into one instance where I couldn't boot that I haven't figured out yet.  It was on a 10 disk array I was hobbling together for a SAN/NAS but just gave up and put the OS on a separate disk and now it is booting.  Before I put it on the seperate disk, I did discover that some of the disk where not showing to grub from the grub emergency CL.  I think one or two of the disk controllers wasn't showing.  Oh and one instance that required a complete removal and install of grub for it to boot properly.  If you aren't hacking stuff together much and making a lot of changes, you shouldn't have a problem.

Shane

On Sat, Sep 1, 2012 at 3:58 PM, Mark Allums <mark@allums.com> wrote:
On 9/1/2012 4:46 PM, Hendrik Boom wrote:
On Sat, 01 Sep 2012 16:02:54 -0500, Mark Allums wrote:

On 9/1/2012 3:17 PM, Hendrik Boom wrote:
Can squeeze boot when / is on an LVM over RAID1?

Can it boot if /boot is on the LVM over RAID1?

Or when /boot is on a nonRAID nonLVM partition but / is on an LVM over
RAID?

Context:  I have to remove the hard drive my / is on.  The available
space to move it to is on a RAID drive.

The disks carrying the RAID also have small nonRAID nonLVM partitions
that would be big enough for /boot, but not all of /

-- hendrik


The usual practice is to put everything except /boot on LVM.  /boot can
theoretically go on LVM too, but it's simpler to leave it out/off of
LVM.  /boot can go on RAID, easily, though, and I always put it on a
RAID 1 partition.

So, yes, squeeze can boot with / on LVM, whether over RAID or otherwise.

Mark

Thanks.  Will try it in the next few days.  Will also install grub to the
MBR of all my disks, so whichever gets picked at boot time will work.

Is there an eaasy way to do this, so that they'll all get updated as
necessary when aptitude installs a new kernel?  Or it this not something
that the MBR cares about?

And is th association of, say, /dev/sdb with a particular hard drive
consistent if there's no change in hardware, or does it depend on random
boot-tine timing issues?

- hendrik



As Tom H mentioned, on standard Squeeze, not partitioned RAID.  Sorry for the confusion.

You should use UUIDs or labels if you wand to reliably always boot or mount a particular partition.  The /dev/sdx designations are subject to the winds of variability in a system, and it apparently has been deemed unnecessary to sort this out, since UUIDs and labels are available.

Some distributions are smart enough to write the MBR to all disks in a RAID 1, and others are not.  I don't recall if Squeeze will or won't, or or if Wheezy will, for that matter.  I haven't installed either recently enough to need to find out.

Anybody else know?

Mark



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] 50428500.7020903@allums.com" target="_blank">http://lists.debian.org/[🔎] 50428500.7020903@allums.com




--
Shane D. Johnson
IT Administrator
Rasmussen Equipment



Reply to: