From: "Brian J. Murrell" <brian@interlinx.bc.ca>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Raid or backups
Date: Mon Nov 24 08:04:04 2003 [thread overview]
Message-ID: <1069452145.20763.160.camel@pc> (raw)
In-Reply-To: <20031121172915.GN10912@riseup.net>
[-- Attachment #1: Type: text/plain, Size: 2588 bytes --]
On Fri, 2003-11-21 at 12:29, Micah Anderson wrote:
>
> I don't like a machine that is dependant on one disk any more than the
> next guy, so I put another 120gig disk in the machine, thinking I
> would raid the two together. After reading months of list archives, I
> am seeing that building a raid array on the system at this point is
> not going to be straightforward, especially since the machine is in
> production. It seems the best method for doing this would be to build
> up md raid devices, layer LVM on top of the md's and then create
> filesystems, this isn't easy if you already have things up and running
> (although I am interested to hear if people have done this, and if so,
> how).
Debian Woody's installer has no concept whatsoever of raid and lvm, I
build all my systems with mirrored LVs anyhow. Here is how I do it:
1. Start Debian install
2. Create 20MB /boot filesystem/partition at the start of the disk
3. Then create a "temporary" root filesystem/partition the size
that you want swap to eventually be (minimum 200MB or so to get
minimal debian install onto it)
4. Then create one partition for all remaining space
5. Do not specify to mount /boot partition during installation so
that /boot files are put on "temporary" root filesystem
6. Do minimal Debian install (no to tasksel and dselect) into 250MB
partition, specify no swap partition
7. When all done installing truly minimal install, put second disk
into machine
8. Use sfdisk to duplicate partition table to second disk
9. Create raidtab mapping partition(s) 1, 2 and 3 to md0, md1 and
md2 respectively
10. mkraid /dev/md0
11. Mount /dev/md0 on /mnt and copy /boot to it, remove /boot/* and
mount /dev/md0 on /boot
12. mkraid /dev/md2
13. pvcreate /dev/md2
14. vgcreate /dev/md2
15. lvcreate root, mkfs ... /dev/.../root
16. lvcreate usr, mkfs ... /dev/.../root
17. lvcreate ...
18. mount /dev/.../root /mnt, /dev/.../usr /usr, ...
19. copy -rax / /mnt, cp -rax /usr /mnt, ...
20. Create initrd to reflect above -- I use Adrian Bunk's
initrd-tools
21. Edit /etc/lilo.conf to reflect /dev/md0 is boot partition and
lvm lv as root partition
22. edit fstab to reflect above changes
23. reboot
24. mkraid /dev/md1
25. add /dev/md1 to fstab as swap partition and swapon -a
Have fun.
b.
--
My other computer is your Microsoft Windows server.
Brian J. Murrell
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2003-11-24 8:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-21 11:31 [linux-lvm] Raid or backups Micah Anderson
2003-11-21 15:13 ` jon
2003-11-24 8:04 ` Brian J. Murrell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1069452145.20763.160.camel@pc \
--to=brian@interlinx.bc.ca \
--cc=linux-lvm@sistina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox