Partition Scheme

Discussion in 'Installation/Configuration' started by leetcharmer, Jun 24, 2006.

  1. leetcharmer

    leetcharmer New Member

    Hello all, I'm building an Ubuntu Server box.

    It will host web/mail/file server/backup.

    I've got 3 HDD's in there:
    80GB HDD -- Main
    80GB HDD -- Backup
    250GB HDD -- Fileserver

    How should I partition / format / mount this machine?

    Thanks :D

    I'll be using the LAMP Server Install method w/ Ubuntu 6.06.
    Last edited: Jun 24, 2006
  2. falko

    falko Super Moderator ISPConfig Developer

    There are millions of possibilities...
    Maybe like this?
    /boot - 100MB
    / - the rest of the first HDD
    /backup - the second HDD
    /home - the third HDD

    You can also configure software RAID with HDD1 and 2.
  3. vlsimpson

    vlsimpson New Member

    I'd put /usr/local on a separate disk also.
    Possibly /etc too.
  4. leetcharmer

    leetcharmer New Member

    Ubuntu doesn't normally make a separate partition for /boot, what are the benefits with making one?

    Also, where would swap go? on the 1st drive?? or on my File Storage drive (250GB)?

    Also, if I am to make /etc or /usr/local or /var or any other individual partitions in drive #1, how much space should I allocate for? I want to be able to hold a fairly good amount of clients on that webspace and e-mail exchange.

    Finally, my server box has onboard Hardware IDE RAID that has the 250GB plugged into it. I don't know much about RAID outside of that, should I do anything special with that? (motherboard is MSI KT4Ultra)
  5. vlsimpson

    vlsimpson New Member

    /etc isn't going to take up much space. run 'du' in that dir if you have a setup now and see how much and give yourself a few extra bytes. If a half-meg give yourself a meg to cover anything installed later on.

    /usr/local; eh, I don't know. That depends on if you plan on compiling and installing a lot of extra software. If you're not, don't worry about it.

    The main reason I mentioned these two is if for some reason, the main install gets hosed, all your config files and extra crud you add-on doesn't get trashed along with it. I've been through it; it ain't fun replicating something you spent six months building on. :eek: (Years ago, when I was an idiot and didn't backup.)
  6. leetcharmer

    leetcharmer New Member

    lawl, but if I have 80GB #2 as a backup (I guess dd?) -- then I don't really need to worry if main gets hosed cuz' exact duplicate has been backed up as an image, roite? Then I don't really need those additional partitions, roite?

    also, check this out:

    [email protected]:/etc$ du
    4       ./mdadm
    16      ./network/if-up.d
    8       ./network/if-post-down.d
    8       ./network/if-pre-up.d
    8       ./network/if-down.d
    48      ./network
    92      ./default
    16      ./skel
    24      ./bash_completion.d
    32      ./belocs
    12      ./apt/apt.conf.d
    4       ./apt/sources.list.d
    40      ./apt
    8       ./dpkg/origins
    28      ./dpkg
    8       ./alternatives
    28      ./logrotate.d
    52      ./cron.daily
    352     ./init.d
    24      ./security
    108     ./pam.d
    4       ./lsb-base
    8       ./terminfo
    20      ./python2.4
    4       ./rc0.d
    4       ./rc1.d
    4       ./rc2.d
    4       ./rc3.d
    4       ./rc4.d
    4       ./rc5.d
    4       ./rc6.d
    8       ./rcS.d
    60      ./udev/rules.d
    68      ./udev
    4       ./opt
    8       ./console
    12      ./apm/scripts.d
    4       ./apm/resume.d
    4       ./apm/suspend.d
    12      ./apm/event.d
    36      ./apm
    8       ./modprobe.d/arch
    48      ./modprobe.d
    12      ./console-tools
    8       ./dhcp3/dhclient-enter-hooks.d
    8       ./dhcp3/dhclient-exit-hooks.d
    36      ./dhcp3
    20      ./lvm
    4       ./mkinitramfs/scripts/init-premount
    4       ./mkinitramfs/scripts/init-bottom
    4       ./mkinitramfs/scripts/local-bottom
    4       ./mkinitramfs/scripts/init-top
    4       ./mkinitramfs/scripts/local-premount
    4       ./mkinitramfs/scripts/local-top
    4       ./mkinitramfs/scripts/nfs-bottom
    4       ./mkinitramfs/scripts/nfs-premount
    4       ./mkinitramfs/scripts/nfs-top
    40      ./mkinitramfs/scripts
    4       ./mkinitramfs/hooks
    8       ./mkinitramfs/conf.d
    64      ./mkinitramfs
    24      ./iproute2
    8       ./ldap
    8       ./vim
    12      ./logcheck/ignore.d.workstation
    32      ./logcheck/ignore.d.server
    8       ./logcheck/ignore.d.paranoid
    20      ./logcheck/violations.ignore.d
    76      ./logcheck
    8       ./pcmcia
    20      ./cron.weekly
    28      ./wpa_supplicant
    12      ./devfs/conf.d
    16      ./devfs
    12      ./modutils
    16      ./cron.monthly
    8       ./calendar
    8       ./cron.hourly
    12      ./cron.d
    12      ./groff
    4       ./perl/CPAN
    4       ./perl/Net
    12      ./perl
    12      ./chatscripts
    164     ./ssh
    20      ./ppp/ip-down.d
    8       ./ppp/peers
    20      ./ppp/ip-up.d
    4       ./ppp/ipv6-up.d
    4       ./ppp/ipv6-down.d
    4       ./ppp/resolv
    108     ./ppp
    12      ./w3m
    12      ./resolvconf/update-libc.d
    16      ./resolvconf
    8       ./emacs/site-start.d
    12      ./emacs
    468     ./ssl/certs
    du: `./ssl/private': Permission denied
    484     ./ssl
    20      ./mysql
    8       ./postfix/sasl
    24      ./postfix/ssl
    124     ./postfix
    8       ./gamin
    4       ./X11/Xresources
    12      ./X11
    44      ./php5/apache2
    44      ./php5/cli
    92      ./php5
    64      ./courier
    4       ./apache2/mods-enabled
    4       ./apache2/ssl
    8       ./apache2/sites-available
    4       ./apache2/sites-enabled
    220     ./apache2/mods-available
    12      ./apache2/conf.d
    4       ./apache2/vhosts
    348     ./apache2
    32      ./defoma/hints
    56      ./defoma
    28      ./fonts/conf.d
    56      ./fonts
    8       ./pear
    20      ./Bastille
    8       ./ha.d/resource.d
    12      ./ha.d
    3972    .
    I'm not sure how to decipher that -- what's the purpose of making /etc it's own partition?
  7. New Member

    Having /etc as an own partition makes sure that you configuration files are not lost if your systems screws up.

    If you want to ensure that you data isn't lost, why don't you use (software) RAID 0 instead of dd? Would be much faster.

    But probably you want regular backups, so use something like an rsync tool and run it with cron (sorry can't remember the exact name so google).

    du -h /etc
    19M     /etc
    -h means human readable on most unix commands. 19M means 19 MB (in my case), which seems a lot. :-$

    So, the number in your case means it's using 3972 KB ~= 4 MB.

    Backups: There are many nice open source tools available that make hard links and even save space with incremental backups...
  8. leetcharmer

    leetcharmer New Member

    how big should I make the / partition? And, is there a tutorial on setting up software RAID 0?
  9. tosser

    tosser New Member

    this is different.
    if you have only /boot, swap and / paritions, then / must be bigger than extra partitions with /var, /home and /usr.

    more partitions are better for security (/usr mount as read-only, /tmp with no setuid etc.) and your users cannot fill your complete hdd if they have a extra /home partition and you did not configure quota right...

    if you have a server, /usr must not so big than a desktop system. but a server need a big /var partition for many logs, mail and web folders etc.
  10. leetcharmer

    leetcharmer New Member

    lawl, would it just be best/easiest to do 80GB = / + swap? and then the 2nd 80GB will just backup that first drive?

    (or should swap be on the 250GB filestorage drive?)
  11. tosser

    tosser New Member

    swap parition is for example 1-2gb big, which hdd you take is your individual decision. whatever you take, it is only the hdd place interesting. take this hdd, where you didn't need the space.

Share This Page