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

Re: LVM root?



On Fri, Oct 13, 2006 at 08:36:17AM -0400, dtutty@porchlight.ca wrote:
> In Debian, is it only the loss of / that requires a reinstall?  What
> happens if /var (especially /var/lib) or /usr get corrupted?  Doesn't
> that also make the system extremely difficult/time-consuming to restore?

What would cause such corruption?  I have a machine running the same
debian install I did on it in 1998, and it has simply upgraded ever
since.  Still runs perfectly.  Corruption simply doesn't seem to happen
if you stick with debian packages for everything (or keep other stuff in
/usr/local where it belongs) with no exceptions.

> If I were to get a second 80 GB SATA drive so that I could raid1 /,
> might I just as well have the whole base system on raid1?  

I raid1 everything.  Why make exceptions unless you really happen to be
working with large temporary data files that would be trivial to
regenerate, and for which you would rather have the speed of raid0 (in
which case make a raid0 fast data drive, and raid1 everything else)

> I would then have something like this:
> 
> Disk a:
> Part:	Size:	
> 1	64MB	
> 5	remainder
> 
> Disk b:
> Part:	Size:
> 1	64 MB
> 5	remainder
> 
> a1 and b1 raid1 to make md0 and mounted as /boot
> 	since can't resize md0, can anyone imagine /boot ever needing 
> 	more than 64 MB to hold 2 kernels (old and new)?

Or 3 or 4 for that matter.  No I can't imagine it needing to be bigger.

> 	Boot will be via grub installed on both drive's mbrs for
> 	auto-failover booting.

Remember to grub-install /dev/sda and /dev/sdb (or whatever your two
drives are).  The install only does the first one for you.

> a5 and b5 raid1 to make md0 which becomes pv0 of vg0
> lvs made for rest of base system including /
> This also ends up with swap in a lv on raid1 so drive crash shouldn't
> crash the system.

Why not just a2 and b2.  Logical partitions are a pain in the ass to
restore if you ever have to replace a disk.  If you just have primary
partitions, then simply dd'ing the first 512byte sector gives you the
boot sector and the partition table all at once.  If you have any
logical paritions you have to start doing the primary partitions, then
reread, then do the first 512bytes of the extended partition, and then
reread and than any further extended partitions inside those, and it
just becomes a mess.  Two primaries with the two raids are much simpler,
and even gains you a few MB of disk space since you don't have waste a
track for the extended partition table.  Logical partitions are a rather
wasteful design.

> If this looks good, do the d-i menus let me start out with a degraded
> raid1 with only one drive, and add the second drive later?

Don't know.  Never tried.

> Thanks to your patient help, I'm gradually getting my head around this
> new world.  Thank you.

--
Len Sorensen



Reply to: