Gentoo Archives: gentoo-amd64

From: Richard Freeman <rich@××××××××××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] conversion sda to lvm2 questions
Date: Sat, 13 Oct 2007 15:38:46
Message-Id: 4710E3A9.5050104@thefreemanclan.net
In Reply to: Re: [gentoo-amd64] conversion sda to lvm2 questions by Beso
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Beso wrote:
5 >> can i use raid even if i got a single hd and a non raid board?! i think
6 >> i missed this thing. i knew that i could use raid on 2 separate disks of
7 >> the same ammount and only if i had a raid compatible board (with
8 >> hardware or software) but i didn't know that you could use it also on a
9 >> single disk.
10 >
11
12 The simple answer is no - you can't use raid with one hard drive. The
13 whole point of raid is to provide increased transfer rate and/or
14 redundancy (emphasis on the latter) by combining multiple drives together.
15
16 You do not need any special hardware to make raid work on linux (this is
17 software raid). In fact, unless it is a $1000 adaptec raid controller
18 with battery backup that you're using I'd AVOID using any special
19 hardware. My motherboard has "built-in raid support" and I don't use it
20 for my two raid-5 arrays or any of my raid-1s. The cheap hardware
21 support provides little benefit and can cause problems (and these
22 solutions are almost always inflexible).
23
24 If you have only one hard drive just set up a boot partition (small), a
25 root partition (bigger - mine is 1GB, but you could go a little smaller
26 or larger), and then have one big partition assigned to lvm and then
27 split that up to handle everything else.
28
29 If at a later date you decide to install more hard drives and go with
30 raid the lvm partitions will be trivial to migrate. Your boot will also
31 be easy - it isn't in use while the system is up. The only pain will be
32 your root partition, and that will be mitigated by the fact that there
33 will be next to nothing on it.
34
35 >
36 >> i tried to copy the system some time ago and found out that there are
37 >> files in /dev and /tmp or /var/tmp that have an enormous dimension. i
38 >> have left them behind and then got an unusable system for some reason.
39 >> the copy i had was from a livecd with the cp -p to preserve ownership
40 >> and permission.
41 >> for what i know from /dev i have only to get /dev/null and /dev/console
42 >> and let all others devices be created by udev. from /tmp instead i
43 >> should not copy anything and from /var/tmp i should copy only the
44 >> ccache. are my suppositions correct?
45 >
46
47 If you copy files with cp - use the -a flag to make it not dereference
48 links/devices/etc. "cp -a /dev/zero /tmp/zero" works just fine.
49
50 I would recommend making /tmp and /var/tmp tmpfs filesystems. It
51 greatly improves performance and you shouldn't be storing anything in
52 these directories for longer than a reboot. I also make myself another
53 tmp directory on a regular hard drive for "junk" and have tmpreaper keep
54 it clean - but it gets rare use. In any case, even if you don't use
55 tmpfs I wouldn't bother copying them - losing your ccache isn't that big
56 a deal.
57
58 As somebody else pointed out, udev can take care of most of /dev, but
59 you do need at least a few devices there for bootup. I don't know which
60 ones offhand, but you could just extract a stage 1 tarball someplace and
61 copy it's device directory for a core set of files.
62 -----BEGIN PGP SIGNATURE-----
63 Version: GnuPG v1.4.7 (GNU/Linux)
64 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
65
66 iD8DBQFHEOOjG4/rWKZmVWkRAlIvAJ0T4ZNKy2BovkbyzSLAigdYq3/EQQCeNygd
67 1HGLnNxkh6RkmWaKa7KT07g=
68 =Dd3P
69 -----END PGP SIGNATURE-----

Attachments

File name MIME type
smime.p7s application/x-pkcs7-signature