-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tate Johnson wrote: > RedShift wrote: >> Ehlo >> >> Usually I don't really care about hard disk partitioning, because most >> of my computers are just workstations. One big /, a swap partition and >> sometimes a small /boot partition. However, now I want to install a >> server and I'm not quite sure my partition scheme is chosen wisely: >> >> /boot <- 25 mb >> swap <- 1 GB (server has 1 gb ram) >> / <- 2 GB >> /usr/local <- 500 MB >> /home <- The rest >> >> Point of /usr/local is for all custom compiled software (not the >> packages from the repositories). Now this all looks good, but there are >> 2 problems with this setup: >> >> 1) /var is on the root volume (/), which is 2 GB in size. Ofcourse, when >> the system is under attack or some other reason /var fills up, my / is >> full and this could lead to a dangerous situation (not being able to log >> in anymore). Also the logs are on the same volume. Would it be wise to >> create under /home for example /home/system/logs and let /var/log be a >> symlink to that? >> >> 2) /tmp can fill up too. I would consider mounting /tmp with tmpfs, 512 >> MB in size, is that enough for server purposes? (Web/mail/general purpose) >> >> Thanks for your advice. >> >> Glenn >> >> >> >> _______________________________________________ >> arch mailing list >> arch@archlinux.org >> http://www.archlinux.org/mailman/listinfo/arch >> > Have you considered using LVM2? It really *does* provide you with that > extra flexibility. You can shrink or grow partitions on the fly > (Provided your FS supports resizing) allowing you to adjust your > partitioning scheme whenever you feel it's necessary. There's a guide on > the wiki called "Installing software RAID or LVM" which could easily > start you off. > > http://wiki.archlinux.org/index.php/Installing_with_Software_RAID_or_LVM > > I'd recommend following something similar to this. > > /boot (25MB) > swap (1024MB) > LVM2 Volume (Rest of the disk) > /home (10GB - I'm not sure what you're planning to store here) > /var (5GB - it's a server, if you have the space, why not?) > /tmp (512MB) > > Of course, you could easily add whatever other partition you wanted to > and observe how they start filling up. If they require more space, grow > them. In addition, don't feel like you "have" to partition the entire > disk initially, you can always grow partitions later. This adds to the > flexibility of LVM2. Even on my desktop I use LVM2, just so I never have > to worry about partition sizes again. > > NOTE: If you do decide to take the LVM2 route, ensure that you have > "lvm2" in your /etc/mkinitcpio.conf, especially if the root partition is > on LVM2 (Such as in the partitioning scheme above). Furthermore, Ext3 > and ReiserFS both support resizing. XFS only supports growing. > > Cheers, > Tate
I too have a server running with a LVM2 setup. My advice is put a 2G / on a real partition not an LVM2 partition. It makes maintenance and recovery much easier in case of trouble. Everything else can go onto an LVM2 volume such as /var /user /home /tmp /mnt/vmware swap ( mostly because my server almost never has to swap ) I can then resize and reallocate space. The file systems are all reiserfs. (I am unlucky when it comes to XFS and ext3, but they should work too.) I am not sure if XFS has an online resizer. If you can, use evms as as an admin tool for your volumes. It has a very user-friendly interface in "evmsn" A couple of months down the road you can look at your diskspace utilization and resize or shrink a few partitions. The only fixed partitions would be / and maybe a separate /boot -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEVAwUBRUmrxMvODX+91FTAAQLsCgf9EELhR7PfGGevMOnldi70TVsYNtPdmxQd RTGpuBVgUqZuNXoRSIhBb3MgWIMglpSkOG7RCMrcGIHeHXlkogwF7RDIvX7Q3n/a gjwRrRHUX+6DSeAaX627xt7PFcLu/hwLFfOh01czvaQy3sbTwj5lLkD7TBnvGfKm ePKP0ACuCM/CNBApt0eQasb9X2wtJOHQ7oKnYqUZHpLi368vBOzVEE8JTV+gmiOL RzmdqBJFCtoTP9WZJhMjq+CsOYAfOUUCLxoON+8JK0AJ5l2RUez+QXmVGNA7rWcq 2hSJ3MvOs8lc4C+KLtMfLNtNvKgAz8mrNc3GlRCM0HvfhA65aAg6ig== =KCO5 -----END PGP SIGNATURE----- _______________________________________________ arch mailing list arch@archlinux.org http://www.archlinux.org/mailman/listinfo/arch