John Oliver wrote:
I have VMware Server running on my newest server, and want to create a
template VM that I can copy and use for different purposes. I want to
use a partitioning scheme that will give me the greatest flexibility to
be able to use LVM to resize partitions as needed.
Great idea! :)
What file systems should get their own partitions, and about what size?
I always make /var it's own partition. I'm sure /sbin should probably
be on it's own. /tmp? /home seems like a good idea. /root Anything
else? What do you use for partitions, and how much space do you
allocate to relatively fixed ones like /sbin?
/sbin should always be part of / (as this is where init lives).
Here are the ones I break out and give their own partition (and a
general size of each). Note the order in the list is the order in which
they lay on the disk if I'm not doing LVM:
-------- (partition 1)
0x83 /boot 128 MB
-------- (partition 2)
0x8e --- LVM PV
---- vg storage
-- lv root / 2048 MB
-- lv usr /usr 12288 MB
-- lv var /var 4096 MB
-- lv tmp /tmp 4096 MB
-- lv opt /opt 16384 MB
-- lv home /home 40960 MB
-- lv data /opt/data (depends)
-- lv scratch /scratch (depends, may not be present)
-- empty space (this is important)
-------- (partition 3)
0x82 swap (1024 MB - 4096 MB depending on application)
--------
The hex numbers at the left are the partition types.
that's it -- three partitions on any given device. They're all standard
partitions (none of this extended partition nonsense). You can, of
course, play with the size of /boot, but generally I've found 128MB to
be more than sufficient, as kernels are typically 4 MB or so.
/usr gets mounted read-only, and gets remounted rw when I have to
upgrade software packages.
/opt/data I use for things like database files, large file shares, etc.
This, on my systems, is typically where the bulk of the space goes.
/scratch is something I have left over from the oldschool days. It holds
anything you don't want to necessarily lose, but stuff you don't
necessarily care about either. I store media files, MP3s, and other such
nonsense in there. I also use it for compiling software packages, or as
a test bed for things I might later install to /opt. It is typically
also rather large.
I don't use /usr/local. That's what /opt is for (and why it's so large).
I figure 4 GB on /var for logs, spools, etc. is good enough in most
cases, unless it's a dedicated mail server (in which case I'll increase
that significantly).
4 GB on /tmp I feel is enough to download pretty much anything. If I
decide I want to keep it, I can move it somewhere else.
I always leave some empty space at the end of the VG in case I need
other filesystems not listed there, or in case I need to extend one of
the already created filesystems. Also take note that if I know a
filesystem needs to be bigger than the standard size at the time I'm
loading the OS, I'll create the LV at the appropriate size. Contiguous
disk is (marginally) faster than fragmented chunks.
1 GB swap is typically plenty. If you have an area of memory greater
than 1 GB to swap to disk, you need more RAM. The possible exception to
this is a database machine (I'm talking a real database here, NOT things
like mysql); i'll sometimes make that larger (as they really do often
have sections of memory greater than 1GB to swap out).
As far as anything else goes, experience will dictate the proper size
more than anything. Play around, see what works for you.
Cheers,
-Kelsey
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list