"Best" partitioning strategy


Results 1 to 13 of 13

Thread: "Best" partitioning strategy

  1. #1
    Join Date
    Sep 2008
    Posts
    2

    "Best" partitioning strategy

    What's the best partitioning strategy?

    I've never used linux, but I plan to use an Ubuntu destro (Mythbuntu) on a new computer. The computer has a single 232G partition with WinXP pre-installed. I'm going to reinstall WinXP but don't plan on keeping anything on that harddrive at all, not even the partitioning structure. Since I can do it all fresh I'd rather do it "right" from the start rather than altering partitions later.

    I want to ensure that the frequently accessed files (ie the OS partitions) are located on the physical outer rim of the hard disk since that is the fastest part of the drive. AND I want the partition I'm going to store video and other files (large files rarely accessed) at the inner portion of the drive where it's slowest. This is easy to set up using a single OS, but I'm not sure how to do it with a dual boot especially since I'm not familiar with linux and don't know what partitions it likes to have.

    I've read that linux likes 10G for root, 1G for home, and 1G for swap & var (12G + a 4.7G FAT32). Is that a good setup to start with? Which of these should I make a primary partition?

    BTW: I like to have lots of partitions under windows to make backing up easier. I carve up my drives based on use. IE one for WinXP only, one for programs running under XP, another for games, another for data files I've created myself, another for big files like video, etc. I've decided on 8 partitions (Fat32 & NTFS) for WinXP, one 4.7G Fat32 partition of which will be tasked as a slush between XP and Linux so it's easy to transfer files from XP to Linux.

    My plan is currently to:
    1. Format the current drive,
    2. Release the partition (so the whole thing is unpartitioned)
    3. Set up ALL the partitions when installing WinXP (and install it)
    4. Convert the partitions to a Linux friendly filesystem as part of a linux install
    5. Install Linux

    See any issues with that? What's a good way to optimally partition a WinXP and Ubuntu drive?

  2. #2
    Join Date
    Jul 2002
    Location
    Tallahassee, FL
    Posts
    512
    A brand new installation of Ubuntu takes up 2.5GB. So take that into account. Also, your home partition should be much bigger than your root partition, unless you plan on installing a ton of software, but never using it. You also can't put var and swap on the partition. The swap partition can't store any files at all. If you've got 12GB to work with, I'd say:
    Code:
    root     4GB
    home     7.5GB
    swap     512MB
    Registered Linux User No. 321,742

    "At Harvard they have this policy where if you pass too many classes they ask you to leave."
    ---Richard M. Stallman

  3. #3
    Join Date
    Sep 2008
    Posts
    2
    12G was just something I read, and was written a few years ago so I figure it's out of date. It could be any size that makes the most sense (aka the "best"). I prefer it to be smaller rather than bigger, but I'll don't want to take a performance hit, or end up in a jam later.

    I've never installed Linux so I don't know what the designations mean. (I could guess at swap.) Of those 2.5G for Ubuntu, which drive do they end up on? How would you rate each of the drives for access frequency while Ubuntu is running? Scale:
    Very infrequent, infrequent, hard to say, frequent, very frequent?

  4. #4
    Join Date
    Jan 2007
    Posts
    280
    Most partitioning programs will ask where you want your partition to start. Having it start from the beginning of the unallocated space will put it on the outer edges of the platters - just where you want it to.

    Quote Originally Posted by evilmind
    Set up all the partitions when installing Windows XP (and install it)...
    Generally, it is recommended to use tools native to an OS to create partitions for the same. So, I wouldn't recommend that you use Windows XP's partitioner to create partitions for Ubuntu. Here's how you could proceed with partitioning your disk:

    1. Create a partition for Windows XP using the installation disc, and install it on the same.
    2. Use the Ubuntu installation disc to create / and swap partitions for Ubuntu.
    3. Use the Disk Management console from within Windows (Start | Run | Type in diskmgmt.msc | Press Enter), to create the rest of the partitions.

    I'm assuming you have a 250 GB hard disk, with 232 GB available. Here's a strategy that you could use (I use something similar):

    Code:
    sda1   Windows XP         5 GB     ntfs
    sda2   Ubuntu /          10 GB     Any Linux-compatible filesystem
    sda3   Ubuntu swap        1 GB     swapspace v2
    sda5   Program Files     20 GB     ntfs
    sda6   Personal Data     20 GB     ntfs
    sda7   Games             20 GB     ntfs
    sda8   Music             65 GB     ntfs
    sda9   Setups            10 GB     ntfs     (contains installation programs for Windows-based software)
    sda10  Videos            65 GB     ntfs
    sda11  Dump              10 GB     ntfs     (holds miscellaneous knick-knacks)
    sda12  Recovery           6 GB     fat32    (holds a raw image of my Windows partition)
    Play around with the capacities till they fit your requirements. You may add or omit partition(s) from this list, as per your needs.

    If you don't understand Linux's hard disk/partition naming convention (hdXY, sdXY, etc.), see here. The document, in its entirety, might be of great help to you.

    You might use the partition named "Dump" as a bridge partition between Linux and Windows.

    Linux provides comprehensive read/write support for both NTFS and FAT filesystems. Also, you could use the ext2ifs driver to access Linux partitions (formatted with the ext2 or ext3 filesystems only) from within Windows. Thus, a bridge partition may not be necessary at all.
    Last edited by i845_; 09-30-2008 at 03:11 PM.

  5. #5
    Join Date
    Sep 1999
    Posts
    3,203
    For a myth box I'd do a single / partition (plus a swap partition) and then use a RAID array (software RAID 1 for "on the cheap" - also software raid is slower, but you can recover the array in any computer since it is software based) for your movie/tv storage, perhaps under /myth, or /data, or wherever you decide to create it.

  6. #6
    Join Date
    Jul 2002
    Location
    Tallahassee, FL
    Posts
    512
    I've never installed Linux so I don't know what the designations mean. (I could guess at swap.) Of those 2.5G for Ubuntu, which drive do they end up on? How would you rate each of the drives for access frequency while Ubuntu is running? Scale:
    Very infrequent, infrequent, hard to say, frequent, very frequent?
    The root partition also called /, is the main partition. It contains anything that you don't create a dedicated partition for. You probably guessed what the swap partition is, however, swapping is done a little bit differently under Unix-like OSes. Instead of swapping to a file, like Windows does, GNU/Linux and freinds will swap to a dedicated partition with no filesystem. That's why you can't put files on your swap partition.

    You can do an installation of Ubuntu with only a root and swap partition. In fact, this is the default if you let the setup program do the partitioning for you. However, we can make our lives a little easier if we create dedicated partitions for a few frequently used directories.

    We can move the /home directory off of / and onto it's own partition. What we gain here is the separation of the users' personal files from the files of the operating system. This enables handy things like being able to reinstall the system while keeping your personal files intact or, if you're really 1337, maintaining multiple operating systems that use the same /home directory.

    Many server administrators will put /var on its own partition too. /var contains things like logs and a cache for the package manager. Making a partition for /var means that if your logs grow out of control and fill the hard drive, the system will still be useable.

    Another trick is to make a /tmp partition. Many exploits copy files to /tmp and run them from there. Creating a /tmp partition and adding the noexec option to /etc/fstab will make a cracker's life a little bit harder if they manage to compromise your machine and are trying to get root access.

    But most of this is probably more than you wanted to know about partitioning under GNU/Linux. If you still want to know more, check out the Filesystem Hirearchy Standard. It explains many common directories in Unix-like OSes and what they're used for.

    For our purposes, though, you can get by with a root and swap partition or a root, swap, and home partition.
    Registered Linux User No. 321,742

    "At Harvard they have this policy where if you pass too many classes they ask you to leave."
    ---Richard M. Stallman

  7. #7
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986
    All the suggestions seem good, however I would suggest not putting your Myth storage on /. Mainly because you want a file system that can work with very large files efficiently for the MythTV storage (I use XFS on mine) and you want the opposite with your / (lots of small files). Even with standard definition, uncompressed I'm seeing files of ~2GB per hour. If you go HD or record a long program - the files can easily get very large. Many file systems suffer trying to deal with files that large.

    Software RAID is the way to go as mentioned. Its recoverable, free, and you will want a lot of I/O speed so you don't get skips during playback if another recording starts or it ques a commercial delete.
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

  8. #8
    Join Date
    Jul 2002
    Location
    Tallahassee, FL
    Posts
    512
    Quote Originally Posted by trilarian
    All the suggestions seem good, however I would suggest not putting your Myth storage on /. Mainly because you want a file system that can work with very large files efficiently for the MythTV storage (I use XFS on mine) and you want the opposite with your / (lots of small files). Even with standard definition, uncompressed I'm seeing files of ~2GB per hour. If you go HD or record a long program - the files can easily get very large. Many file systems suffer trying to deal with files that large.

    Software RAID is the way to go as mentioned. Its recoverable, free, and you will want a lot of I/O speed so you don't get skips during playback if another recording starts or it ques a commercial delete.
    Whoops! I missed the part where this was a partition scheme for a MythTV installation. Basically you've two choices: create a separate partition for your MythTV recordings or put them on the /home partition. Either way, you'll want that partition to be first on the drive. And you'll want to make it a lot bigger than 12GB!
    Registered Linux User No. 321,742

    "At Harvard they have this policy where if you pass too many classes they ask you to leave."
    ---Richard M. Stallman

  9. #9
    Join Date
    Jan 2007
    Posts
    280
    Quote Originally Posted by paj12
    ...if you're really 1337, maintaining multiple operating systems that use the same /home directory.
    Strongly dis-recommended, since configfiles from multiple distros would set up conflicts, creating a disaster.

    /* Correct me, if wrong. */
    Last edited by i845_; 10-01-2008 at 12:51 AM.

  10. #10
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986
    Quote Originally Posted by i845_
    /* Correct me, if wrong. */
    Your not. I'd highly advise NOT using the same home for multiple installs. You can make a separate partition for all your data/music/movie/etc files and share that across all installs, but let each install have it's own /home. /home does not take up much space at all (its all text config files). So you can leave it as part of the / partition for multiple installs and then add your data storage partition to each install's /etc/fstab. Much, much more stable.

    The only reason to have a separate partition for /home is if you are planning on having many user accounts (public computer for example). Then you could limit the amount of space a user can use, and even if full the OS will not come to a screeching halt (try running Windows with 25MB free hard drive space....). One could argue that they are saving their config files, but its not hard to put a copy command into cron that backs up your home directory to your storage partition in the event you have to wipe and reinstall your / partition.
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

  11. #11
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,947
    You could simply skip the partitioning issues for now, go with LVM (...assuming Mythbuntu supports it properly ), and adjust the logical volume sizes later. (Under LVM, you have a volume group as the main unit; it contains both physical volumes (where the data is stored) and logical volumes (which act like partitions, in that they're the way programs talk to the disk). If you create one somewhat-huge partition (say, 50G?) and add it as a physical volume to a volume group, then create a logical volume (in that group) for each of root, swap, home (if desired) and Myth files, then you can jockey around the sizes of those logical volumes at any time, while the system is running.)

    OTOH, that's a lot more complicated, plus you do also need a separate (tiny: 50MB) partition for /boot. But it means you never have to worry about partition sizes again; if you need more space in a particular LV, you shrink other LVs that share the VG, and expand the LV that needs space. (If you can't shrink any other LVs, you can add another physical volume to the group and use its newly-added space, as well.) That's the tradeoff: simplicity later if you ever have to change anything, versus complicated setup.

    (Also, I wouldn't even attempt this unless Mythbuntu explicitly supports it. It's way too hard to set up otherwise.)

  12. #12
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986
    Quote Originally Posted by bwkaz
    (Also, I wouldn't even attempt this unless Mythbuntu explicitly supports it. It's way too hard to set up otherwise.)
    Out of the box - I don't think it does (haven't installed that distro), but I did find a HowTo here. The post was made in 2007, so it may be supported by now without any work. At any rate, I still strongly recommend LVM. It is a pain to setup the very first time you do it, but once you get the hang of it you will thank yourself many times over. The ability to resize and repartition on the fly is really useful - especially for an install that is going to regularly create massive files.
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •