1 |
Dirk Heinrichs wrote: |
2 |
> On Thursday 20 December 2007 10:50:33 Benjamen R. Meyer wrote: |
3 |
>> I set up a server system a little while ago, and in performing updates |
4 |
>> to portage it ran out of disk space as I didn't quite allow enough space |
5 |
>> on the root partition (3.8 GB). |
6 |
> That's way too much. 256M is enough. |
7 |
|
8 |
/ is the primary drive for the OS; I typically only off-load to other |
9 |
partitions for user stuff. On the server, I initially only offloaded |
10 |
/home and /usr/local; but in the crisis of the "out of diskspace" issue, |
11 |
I ended up also offloading /var/tmp and /usr/portage. |
12 |
|
13 |
>> As a result, I took a partition that I had cleaned up (this was from a |
14 |
>> rebuild of a system that was a different |
15 |
>> distro in the past) and moved over /usr/portage to it. It's a 47 GB |
16 |
>> partition (as reported by df -h) and the system works fine. |
17 |
>> I do realize that if the mount command got screwed up, I'd probably have |
18 |
>> issues recovering the system, but that is that system. |
19 |
>> I am now thinking of converting my desktop over to Gentoo as well, and |
20 |
>> was wondering whether what I did above on the server was wise or not. |
21 |
> I think it is not. You'll undoubtedly get different answers about this, |
22 |
> but IMHO it is best (regardless what kind of system) to use small, |
23 |
> special purpose logical volumes. This way you can add space when needed, |
24 |
> use the filesystem that fits best for the kind of data you store on this |
25 |
> volume and have a certain degree of safety against volume corruption. |
26 |
> Here is what I would recommend for a normal linux system: |
27 |
> [hs]da1: /boot, 64M, ext2 |
28 |
> [hs]da2: /, 256M, ext3 or xfs |
29 |
> [hs]da3: LVM |
30 |
> Then, create a volume group spawning [hs]da3 with name vg00 (you can |
31 |
> choose the name freely) and create logical volumes inside: |
32 |
> /dev/vg00/swap: size as needed, swapfs # can be omitted if enough RAM |
33 |
> /dev/vg00/usr: /usr, 2-5G (dep. on number of pkgs), ext3 or xfs |
34 |
> /dev/vg00/var: /var, 512M-1G, ext3 or xfs |
35 |
> For /home, I prefer to have one LV per user, like /dev/vg00/john_doe, |
36 |
> /dev/vg00/jane_doe and have the kernel automounter mount them on demand |
37 |
> (at login time). |
38 |
>> I will be using the server as the portage provider for my desktop too. |
39 |
>> Otherwise, what is the recommended space to have available for the |
40 |
>> portage tree in /usr/portage so I can have root as an appropriately |
41 |
>> sized partition? |
42 |
> Here again, I use the kernel automounter to mount three different LVs |
43 |
> under /gentoo when needed: /dev/vg00/build (5.5G to be able to build |
44 |
> OO.org), /dev/vg00/distfiles for the source packages and |
45 |
> /dev/vg00/overlays for overlays, incl. the portage tree. |
46 |
> On the desktop machine, you should be able to mount distfiles and |
47 |
> overlays from the server via NFS. The build volume I would leave locally |
48 |
> on the desktop to get faster build times (unless your network connection |
49 |
> to your server is faster than harddisc access). |
50 |
|
51 |
I don't like using NFS much...guess I'll have to change that as I would |
52 |
like to centralize my server as a one-stop shop for usernames and |
53 |
passwords for the few systems on my network - server, desktop, and a |
54 |
laptop at present, but there will also be a few others shortly too. The |
55 |
laptop runs Windows 2k, so it'll just auth against Samba...any how...to |
56 |
get back to this issue... |
57 |
|
58 |
I haven't played with LVM yet. It's been something that's intrigued me, |
59 |
but I haven't ever researched it much to play with it. What you guys |
60 |
propose above and in this thread is quite interesting, so I'll follow up |
61 |
with this question: |
62 |
|
63 |
Right now I have the server configured per drives as follows: |
64 |
|
65 |
/dev/hda1 / 3.8 GB 4096.19 MB |
66 |
/dev/hda2 /home 15.0 GB 15356.60 MB |
67 |
/dev/hda3 SWAP 2.6 GB 2665.00 MB |
68 |
/dev/hda4 /usr/local 4.9 GB 5255.96 MB |
69 |
|
70 |
/dev/hdb1 EMPTY 66.3 GB 67875.02 MB |
71 |
/dev/hdb2 /var/tmp 28.0 GB 30721.43 MB |
72 |
/dev/hdb3 /usr/portage 47.0 GB 51202.37 MB |
73 |
/dev/hdb4 SWAP 10.0 GB 10240.48 MB |
74 |
|
75 |
It's only got a 192 MB of RAM - a PII/233, so I'm giving it generous |
76 |
swap space. (My desktop is an AMD64 with a gig of RAM.) I seem to have |
77 |
a sizable partition free (hdb1), so this just might work - but how would |
78 |
you guys propose I transition from the above setup to an LVM setup? All |
79 |
partitions are currently ext3 (my preferred fs for linux). |
80 |
|
81 |
I don't think I'd be able to do that on my desktop right now...namely in |
82 |
that rebuilding it from Slackware to Gentoo is going to be trying |
83 |
enough, but I think I can manage it - namely from the side of downtime, |
84 |
but I'd also like to try to fully utilize the AMD64 in the system - |
85 |
meaning 64-bit where possible. Any how...for now, I'd like to hear about |
86 |
the LVM conversion for the server; I'll bring up the other issues later |
87 |
in different threads when I have the time to address them, but the LVM |
88 |
stuff is intriguing enough that I might be able to squeeze it in in |
89 |
short order if I can do it without risking data, or having to rebuild |
90 |
the system. |
91 |
|
92 |
Thanks, |
93 |
|
94 |
Ben |
95 |
-- |
96 |
gentoo-user@g.o mailing list |