Talk:HOWTO Install Gentoo Linux: Partitioning
From Gentoo Linux Wiki
I have good experience with the following set up:
partition mount point size use /dev/hda1 /boot 128MB boot partition /dev/hda2 / 1GB normal operation /dev/hda3 / 1GB rescue /dev/hda4 LVM2
To fill the recue partition you can either install a fresh basic system, or you mount both /dev/hda2 and /dev/hda3 on an empty mount point, and then cp -rp all files from hda2 to hda3.
dd if=/dev/hda2 of=/dev/hda3 bs=1M # this command will corrupt the file system, or at least ReiserFS for some reason I don't know. Then edit /etc/fstab and /boot/grub/grub.conf.
It is important to find out which file systems you want to have in LVM2. I've tried to capture the large ones and the ones that potentially grow the most, but I realize it is a litte overdone for normal use:
Filesystem 1k-blks Mounted /dev/vg_hostname/home-username-thunderbird 2097084 /home/username/.thunderbird /dev/vg_hostname/home-username-photos 1048540 /home/username/photos /dev/vg_hostname/tmp 5242716 /tmp /dev/hda3 1000348 / /dev/hda1 125432 /boot /dev/vg_hostname/thumbnails 524268 /home/username/.thumbnails /dev/vg_hostname/var-cache 131064 /var/cache /dev/vg_hostname/opt 786404 /opt /dev/vg_hostname/root-ccache 2097084 /root/.ccache /dev/vg_hostname/home-username 524268 /home/username /dev/vg_hostname/root-media 786404 /root/media /dev/vg_hostname/var-db 131064 /var/db /dev/vg_hostname/usr-kde 262132 /usr/kde /dev/vg_hostname/jokes 131064 /home/username/jokes /dev/vg_hostname/usr-portage 2097084 /usr/portage /dev/vg_hostname/klibido 2097084 /home/username/klibido /dev/vg_hostname/gaim 262132 /home/username/.gaim /dev/vg_hostname/usr-lib 1048540 /usr/lib /dev/vg_hostname/usr-src 1535948 /usr/src /dev/vg_hostname/home 36856 /home /dev/vg_hostname/usr-share 524268 /usr/share /dev/vg_hostname/music 20970876 /home/username/music
On the other hand LVM2 is a breeze at creating file systems, so why shouldn't you ;o)
I guess normally you'd choose for the top level mount points only, /usr, /lib, / var, /bin, ... but at the time I was building my system there was a tiny little bug in gentoo that prevented this (something to do with dynamically linked binaries being used at boottime). The idea is to get as little files in root fs as possible, hopefully LVM2 will soon be supported in the kernel.
The advantage for many separate file systems is simply that one single application cannot fill up all disc space being used by different applications, hence separate file systems for gaim, thunderbird, music, klibido, ...
Also I find it a good idea to create *all* mount points with 000 root:root permission. That way they can easily be identified, and noone can accidentally write to them as long as there is no file system mounted on them. (especially usefull for file systems in the user's homedir. Once mounted the permissions can easily be set and will only affect the file system, not the mount point.
swap can also be created as an LV, though some systems have so much RAM on board that you may consider not using swap at all (I have 1.25GB RAM of which 600MB used for cache and buffers, 1GB swap of which 3736kB in use). on the other side discs are so large nowadays that you won't notice a GB more or less ...
to save disk space i created a large /tmp (3GB i believe) and i created a symlink /var/tmp => /tmp. For home use this is no problem.
hope this helps ;o)
--Jhendrix 22:31, 19 December 2005 (GMT)
