How do you partition your drive?

I’m sick like a dog, and I’m heading to bed in couple of minutes. So instead of posting a lengthy rant or something funny, constructive or informative, I decided to take the lazy way out and ask you, the readers, a question.

How do you partition your hard drive?’

Travis asked me a question about it today, and it got me thinking. Do you usually go with the default partitioning recommended by your system (ie. a single big partition for Windows, and the common / + swap setup for Linux) or do you carefully define your own partitions?

Currently the Kubuntu install on my laptop has the default root + swap setup. There’s also a small NTFS partition on it with Windows 2000. I booted into that partition exactly twice. The first time was right after installation. The second time was after I installed Kubuntu – to verify that GRUB has the correct entry for Windows.

My destkop is also a dual boot. Since I use it for gaming, and I never really shut it down it’s booted into Windows 99% of the time. The ancient Mandrake install haven’t worked for about 2 years now. Around that time I upgraded my graphics card I never bothered to change the X config .

The primary drive has a 70 GB NTFS partition which hosts the system files, a 20 GB data partition (NTFS), 10 GB ext3 partition for root, 18 GB ext3 partition for /home and little under 2 GB for swap. The second hard drive is a one big 160 GB NTFS partition where I store all my data, downloads and shit. I also have a 270 GB external LaCie which is dedicated for backups of the windows partitions.

Yes, it’s a mess but it kinda grew organically. Each partition on the primary drive has been resized at least twice. :P

So, windows people – do you usually split your drive into system and data partitions or do you stay with the default setup? If you do define a data partition, do you usually hack registry to move the Documents an Settings or at least My Documents to the data partition?

Linux and unix users – do you usually put /var and /home on separate partitions? How about /tmp and /usr? I always seem to have a hard time figuring out how big to make the /var partition. What do you usually do?

Let me know.

[tags]partitioning, disk partitioning, partition, /var, /tmp, /home, swap[/tags]

This entry was posted in technology. Bookmark the permalink.



12 Responses to How do you partition your drive?

  1. Yey, I got a blog about my delimia thing… Hopefully, I will get this working without losing everything on my computer

    Reply  |  Quote
  2. Fr3d UNITED KINGDOM Mozilla Firefox Windows says:

    For my desktop, I divide my 250GB drive into a 100MB /boot, ~10GB / and the rest for Windows. My laptop has the same configuration, just less space for Windows.

    When it comes to servers, I have seperate /boot, /, /var, /usr and /home partitions, and often another one for /opt for backups. I could type out their sizes, but df -h is much easier :D

    root@thrawn:~# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 15G 655M 14G 5% /
    /dev/sda1 99M 15M 80M 16% /boot
    /dev/sdb2 225G 2.3G 211G 2% /home
     /dev/sda6 153G 199M 145G 1% /opt
    /dev/sda5 30G 1.7G 26G 6% /usr
    /dev/sda3 30G 2.6G 26G 10% /var

    Reply  |  Quote
  3. Freduardo BELGIUM Mozilla Firefox Linux says:

    My old laptop only has a 10 gb hard drive, so I just put a / and a swap on it.

    On my desktop I have:
    /dev/sda1 /boot 100 mb
    /dev/sda2 / 5 gb
    /dev/sda3 /home the rest of the 80 gb drive
    /dev/sda5 swap 1 gb

    /dev/sdb1 /mnt/data 120 gb

    On virtual machines, I don’t really bother with complicated partitioning, as they are mostly just for testing, so a / and a swap is sufficient there as well.

    Reply  |  Quote
  4. Wikke BELGIUM Mozilla Firefox Windows says:

    I have:
    -a 40Gb drive for my Windows, which is way too small because my downloads folder is on this one too, I need to change this sometime…

    -a 80Gb drive for ‘my documents’ (pictures and downloads I’d like to keep)

    -plus all my other shit on separate drives (e.g. music and movies)

    All the drives have 1 partition

    Reply  |  Quote
  5. Matt` UNITED KINGDOM Mozilla Firefox Windows Terminalist says:

    320GB hard drive, 50GB is for the Windows install + installed programs (started out as 10, then 20 but I kept hitting the limit so I gave it more than enough, its now about 50% full

    The rest of the drive contains all my data, everything in Documents and Settings has moved to there, and yes I did the registry editing by hand, repeatedly. Damn thing kept screwing up in some other way and having to be reinstalled (OK, didn’t have to be reinstalled, but it was easier that way). So I can now find the relevant keys from memory, which I will now do to show off
    Current User > Software > Microsoft > Windows > Current Version > Explorer > User Shell Folders

    Reply  |  Quote
  6. Luke UNITED STATES Mozilla Firefox Ubuntu Linux says:

    Follow up question: what do you usually use for partitioning your drive?

    Do you use the built-in tools in your OS?

    Do you use some 3rd party tools to do it? And if yes, which one is your favorite?

    Reply  |  Quote
  7. Nick UNITED STATES Mozilla Firefox Windows says:

    I have always kept two physical drives, one for /home and one for /, so I could upgrade my system without touching user data. With my latest machine I split /home up a bit more:

    Filesystem Size Used Avail Use% Mounted on
    /dev/hda1 36G 3.2G 31G 10% /
    tmpfs 251M 0 251M 0% /dev/shm
    /dev/hdb3 48G 9.7G 36G 22% /home
    /dev/hdb1 95G 2.3G 88G 3% /home/movies
    /dev/hdb5 37G 23G 12G 67% /home/music
    /dev/hdb2 48G 4.4G 41G 10% /home/pictures

    Seems to be working well so far. No Windows partition to worry about, either :-)

    Reply  |  Quote
  8. timothyb89 UNITED STATES Konqueror Linux says:

    I just have my entire Linux system(s) on one large partition.

    The real reason for having the Linux install span across multiple partitions was for the simple reason that hard drivers were, at one time, not large enough to host an entire system. Not that we have disks that are several hundred gigabytes, we really don’t need to anyway.

    In any case, having everything on a single partition makes management much easier. I would rather resize only one partition if you were running low on space than /home /var etc. separately.

    For the best partitioner, I would quickly count out MS’s disk management console. Almost every operation invloves reformatting :P
    I normally use the GParted live cd but there’s a bunch of other versions out there: http://gparted.sourceforge.net/

    Reply  |  Quote
  9. Luke UNITED STATES Mozilla Firefox Windows says:

    [quote comment="4786"]The real reason for having the Linux install span across multiple partitions was for the simple reason that hard drivers were, at one time, not large enough to host an entire system. Not that we have disks that are several hundred gigabytes, we really don’t need to anyway.[/quote]

    Actually there are many benefits to this. For example, if you ever decide to reinstall the system, you don’t need to worry about loosing data if your /home is on separate partition.

    Also consider fragmentation. If you put the directories that are bound to change a lot (ie. /home, /var, /tmp and etc) on separate partitions then the system partition that is mostly static doesn’t get fragmented which in turn improves performance.

    Reply  |  Quote
  10. vacri AUSTRALIA Mozilla Firefox Windows says:

    On windows I like to have three partitions for some inane reason. Smallish C: drive for Windows & ‘OS’ apps like word processors and tools, medium D: for programs (mostly games) and ‘risky’ software that might hose something, and a bulk data e: drive. That way I can screw up the programs drive and not affect the windows or bulk data, and my bulk data is never going to fill up my C: to the point of wiping out the swapfile. Screwing up D: will screw up games but not ‘productivity’ software which is kept on C:.

    On linux, I am essentially a newbie, and a sysadmin friend advised for home systems, the ‘one big partition’ theory is enough. For a production system, perhaps something else, but for home use it seems to be fine. I just have to be careful when I’m using disk management tools :)

    Interestingly, the system I used at home with Debian 3.1 wouldn’t install properly with XFS, so I had to make a 200MB ext3 /boot to get it booting properly. I wanted to reinstall anyway when Debian 4.0 became stable, and it didn’t have the same problem – it’s all XFS.

    Reply  |  Quote
  11. Matt` UNITED KINGDOM Mozilla Firefox Windows Terminalist says:

    I have a Ubuntu live CD kicking around so I use GParted from that (been meaning to install + use Ubuntu for a while but there’s been various things delaying, maybe preventing me

    and the fact that I’m kinda lazy is just one of those things :wink:

    Reply  |  Quote
  12. For Debian, I have always done it fairly simply:

    /
    swap
    /home

    Having /home separate is handy for reinstalling the OS in place, should I have the need.

    For OpenBSD, I like break it down more:

    /
    swap
    /usr
    /var
    /tmp
    /home

    This way I can better take advantage of some of the security features, which is desirable as OpenBSD is more likely to take on a server function.

    Luke mentioned the fragmentation issue already, but there is another reason too. If something were to go wrong with the logs they wouldn’t fill my entire hard drive, just the /var partition. And /tmp can’t be flooded to fill the hard drive either.

    Separating partitions allows more flexibility for different mounting policies. For example, / can be mounted read-only without causing any problems. If it contained /tmp, this wouldn’t be possible (it could still effectively be done with BSD file flags, though).

    On one of my systems I have a 650GB external drive (compared to the 80GB internal one) mounted as /ex (“external”). It’s just one giant partition. If a user is in the ex group, it gets to access it. This is where I dump most of my large, long-term data, like the MP3 collection, movies, tv shows, ISOs, and various other videos and data. It also has a copy of the small amount of non-replacable stuff.

    And to answer that last question, I use the system installation partition editor when making the install, and use GParted if I need to make adjustments later on.

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>