What is the best way to partition, and what is the best file-system for a new Hard Disk? [duplicate]

Solution 1:

There is no best way to partition a drive as such. Of course it depends on your set-up. If you have a complicated or odd server system, you may want to spend a lot of time thinking about this. If your current configuration works, leave it be.

  • You will not gain a lot by making an effort.

But this is the important bit:

  • The default, i.e. what the ubuntu installer chooses for you if you select erase entire drive is heavily tested by millions of users. It will work very well.

The default file system in Ubuntu currently is ext4. This is what that partitioning looks like on one of my virtual machines: alt text
This works extremely well


Bonus 2: If btrfs is supposedly "better" than ext3/4, why isn't it the default?

  • There are things that are better about btrfs compared to ext4, and vice versa. Keep in mind that ext4 is, also, on the bleeding edge of file systems. It's brand new and very advanced. Btrfs is not magical. :-)

  • It may very well become the default soon; we'll see.

  • Here's the technical bit about btrfs's cool features (this list is copied verbatim from  btrfs):

    • Online volume growth and shrinking
    • Online block device addition and removal
    • Online defragmentation
    • Online balancing (movement of objects between block devices to balance load)
    • Transparent compression (currently zlib)
    • Subvolumes (separately-mountable filesystem roots)
    • Snapshots (writeable, copy-on-write copies of subvolumes)
    • File cloning (copy-on-write on individual files, or byte ranges thereof)
    • Object-level (RAID1-like) mirroring, (RAID0-like) striping
    • Checksums on data and metadata (currently CRC-32C)
    • In-place conversion (with rollback) from ext3/4 to Btrfs
    • File system seeding (Btrfs on read-only storage used as a copy-on-write backing for a writeable Btrfs)
    • User-defined transactions
    • Block discard support (reclaims space on some virtualization setups and improves wear leveling on SSDs by notifying the underlying device that storage is no longer in use)

    (my emphasis)

    If you care about and use any of the above, btrfs will be a great boon. It's, after the oracle/sun merger, going to be what  ZFS should have always been: Implemented. :)


Bonus 3: Will creating a separate boot partition reduce boot time?

  • No. Boot time is mostly waiting for the magnetic seek-head in the hard drive, you can gain very little indeed by changing any configuration at all. Partitioning the drive differently will do not much good.

  • You will possibly hear miracle stories of people decreasing their boot time by putting /boot right at the very beginning of the disk (where the platters are "smaller", so to speak). There will be about a 50% decrease in seek times at the very inner part of the disk compared to the very outside. Making an effort to put /boot there is futile. It's will be close to the beginning anyway, no need to bother with that. You should know this though, it makes sense to put the operating system first, and data last.