Gentoo Archives: gentoo-user

From: "W.Kenworthy" <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] lvm2/external partitions question
Date: Tue, 30 Aug 2005 06:53:43
Message-Id: 1125384549.20471.113.camel@localhost
In Reply to: Re: [gentoo-user] lvm2/external partitions question by Dirk Heinrichs
1 Comments inline:
2
3 moriah ~ # df -h
4 Filesystem Size Used Avail Use% Mounted on
5 /dev/hda5 3.8G 2.2G 1.6G 59% /
6 udev 252M 2.6M 249M 2% /dev
7 cachedir 3.8G 2.2G 1.6G 59% /lib/splash/cache
8 /dev/vg1/usr 32G 5.9G 27G 19% /usr
9 /dev/vg1/var 48G 2.3G 46G 5% /var
10 /dev/vg1/tmp 16G 33M 16G 1% /tmp
11 /dev/vg1/opt 4.0G 169M 3.9G 5% /opt
12 /dev/vg1/home 77G 26G 52G 34% /home
13 none 252M 0 252M 0% /dev/shm
14 /dev/hda1 92M 18M 69M 21% /boot
15 /dev/hda3 3.8G 1.7G 2.1G 46% /mnt/hda3
16
17 On Tue, 2005-08-30 at 07:49 +0200, Dirk Heinrichs wrote:
18 > Am Dienstag, 30. August 2005 06:28 schrieb ext Mark Knecht:
19 > > That's very helpful. To test my understanding
20 > >
21 > > /dev/hda1 - boot - 100M
22 >
23 > Way too much.
24 only if you are using for nothing else but kernels - as mentioned in my
25 prev. I intended using it for storage as well as booting.
26
27 > > /dev/hda2 - swap - 2G
28 >
29 > Can be on a logical volume, too.
30 >
31 I have seen warnings against doing this due to poor performance
32
33 > > /dev/hda3 - NOT CLEAR - the backup/rescue install?
34 >
35 > Why? Use the LiveCD.
36 >
37 Some machines dont have a CD. A liveCD also doesnt run squid with my
38 setup, a mailfiltering gateway or my particular firewall configuration
39 and so on so its either useless, or means extensive downtime to
40 reconfigure. For pure rescue, or a limited desktop a liveCD is fine
41 (and generally knoppix is superior anyway for a desktop)
42 only if you are using for nothing else but kernels - as mentioned in my
43 prev. I intended using it for storage as well as booting.
44
45 > > /dev/hda4 - LVM - 200G
46 >
47 > > /dev/hda5 - root - 4G
48 >
49 > Can also be on a logical volume, but needs an initrd/initramfs. 4G is too
50 > large, IMHO. Mine is 256M.
51 >
52 As you can see, I already use 2.2G of the root (and 2.9G on another
53 system), and sometimes much more - so 256M isnt going to get me far!
54 Set it to your own particular requirements. I dont use initrd's - too
55 flakey, extra work thats not needed in most cases. I decided in my
56 early experiments to limit LVM for data on the partitions that cause me
57 grief with space so most of the root partitions including /etc and /lib
58 are on a base filesystem (/) This can simplify working on the system.
59 It is possible to use LVM for nearly everything, but there's extra
60 complexity, and warnings about some configurations.
61
62 Small roots used to be the way in the old days, but the number of
63 machines that crashed due to running out of root space were legion!
64
65 > > So you've placed pretty much the bulk of the machine in LVM and it's
66 > > working well for you. That's cool.
67 >
68 > I've even placed _all_ of my machines on logical volumes (using EVMS), and
69 > it also works well.
70 >
71 > > Could you possibly share a bit from your grub.conf file as well as
72 > > your fstab file? I think with that info I'd be pretty confident when I
73 > > do the build tomorrow morning.
74 >
75 > Partition table:
76 > # fdisk -l /dev/hda
77 >
78 > Disk /dev/hda: 10.0 GB, 10005037056 bytes
79 > 240 heads, 63 sectors/track, 1292 cylinders
80 > Units = cylinders of 15120 * 512 = 7741440 bytes
81 >
82 > Device Boot Start End Blocks Id System
83 > /dev/hda1 * 1 8 60448+ 83 Linux
84 > /dev/hda2 9 1292 9707040 83 Linux
85 >
86 >
87 > Everything below resides on hda2.
88 >
89 > /etc/fstab:
90 >
91 > /dev/evms/root / reiserfs defaults,acl
92 > 0 1
93 > /dev/evms/usr /usr reiserfs defaults,acl
94 > 0 2
95 > /dev/evms/var /var reiserfs defaults,acl
96 > 0 2
97 > /dev/evms/opt /opt reiserfs defaults,acl
98 > 0 2
99 > /dev/evms/build /gentoo/build reiserfs defaults,acl
100 > 0 2
101 > /dev/evms/distfiles /gentoo/distfiles reiserfs defaults,acl
102 > 0 2
103 > /dev/evms/swap none swap sw
104 > 0 0
105 >
106 > Sizes:
107 > # df -h|grep evms
108 > /dev/evms/root 256M 132M 125M 52% /
109 > /dev/evms/usr 3.0G 2.6G 452M 86% /usr
110 > /dev/evms/var 384M 210M 174M 55% /var
111 > /dev/evms/opt 512M 497M 16M 97% /opt
112 > /dev/evms/build 2.7G 1.5G 1.2G 57% /gentoo/build
113 > /dev/evms/distfiles 1.5G 1.4G 127M 92% /gentoo/distfiles
114 >
115 > Note that this machine gets $HOME from NFS, so I don't list it here. I would
116 > usually create a separate volume for each users home dir, so that I don't
117 > have to care about quota (if needed).
118 >
119 > grub.conf:
120 > title Gentoo Linux 2.6
121 > kernel /vmlinuz-2.6.12.3 root=/dev/ram0 realroot=/dev/evms/root
122 > vga=794
123 > initrd=/initrd-2.6.12.3.gz
124 >
125 > Note that I use a self-made initrd, which activates the EVMS volumes (needed
126 > because / is an EVMS volume, too), does a pivot_root from root to realroot
127 > and then starts up the real thing.
128 >
129 > Bye...
130 >
131 > Dirk
132 --
133 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] lvm2/external partitions question Dirk Heinrichs <ext-dirk.heinrichs@×××××.com>