Matthew Rosewarne on 16 May 2008 14:19:51 -0700


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

Re: [PLUG] Ubuntu Alternate installer, RAID1 & LVM


On Friday 16 May 2008, JP Vossen wrote:
> How do I hijack /etc/apt/sources.list if using the Ubuntu Alternate CD?
>   I ALT-F2'd but there's no apt/ in /etc/.  I know it gives you a box to
> specify a proxy, but I'm using a local approx and I don't think that
> works like the proxy that box is expecting.  (I didn't actually try it
> though.)
>
> I'm goofing around in VMware to figure out how to do LVM (for snapshots)
> on top of RAID1 software mirroring, and I don't want to keep downloading
> all the stuff it wants over the WAN when I can cache it locally.

The installer does not use APT to install the base system, but rather 
debootstrap.  You can enter a mirror to use as a boot parameter.

> As for RAID1 + LVM, this is what I came up with, any comments?
>
>       Partition Method: manual
> 	Create 256M /boot  (label boot0) on first  disk
> 	Create 256M /boot1 (label boot1) on second disk
> 	Use the rest of each disk for "physical volume for RAID"
> 	Configure Software Raid
> 		Yes, then "Create MD devices"
> 		RAID1, then follow prompts
> 	RAID1 device
> 		Use all space as "physical volume for LVM"
> 	Configure the LVM
> 		Create volume group, name = hostname
> 		Create logical volume
> 			swap_1	512M
> 			root	rest of space - e.g., 2G
> 			(to leave some space free for snapshots!)
> 	LVM VG hostname, LV root
> 		Mount as ext3 /root, label = root
> 	LVM VG hostname, LV swap_1
> 		Use as swap area

Do you mean "/root" or "/" ?  I don't see a "/" partition here.

> 256M for /boot is way overkill, but since it's non-LVM and disk is cheap...

Keep a "live" image in there for rescue purposes, also useful for making 
changes to the root fs.

> I'm still pretty sure you need to leave /boot out of the LVM and mirror,
> can anyone prove me wrong?  So if I do that, I also need to manually
> keep /boot in sync on the 2 disks, later manually install grub on the
> second disk, and if the first disk dies, I'd need to edit something in
> the grub config while attempting to boot from the second disk.  Correct?
>   Per above I'd label the second disk's /boot as boot1 so in theory if
> grub is using labels, a tweak from ""boot" to "boot1" should do it?

While I don't know if it's available on Ubuntu, GRUB2 *should* allow you to 
have "/" on LVM without a separate "/boot".

Otherwise, make the two different boot partitions into another RAID1 device, 
but remember to install the MBR to _BOTH_ drives!

> I see the Alternate CD also allows you to trivially set encryption.
> Very cool.  Can you use RAID1 + LVM + Encryption?  Just wondering.  Wow,
> that's a lot of moving parts.

Yes, you can.  For a completely-encrypted disk, I would recommend setting that 
up with RAID1 first, encryption on top of the RAID1, and LVM on top of the 
encryption.

Attachment: signature.asc
Description: This is a digitally signed message part.

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug