16

Are there any special hardware wise advantages of partitioning a hard drive before OS installation compared to doing it after OS installation?

(Here by advantages, I mean physical effects like lifetime of the hard drive etc., not that losing data or , being unable to shrink etc.)

  • 1
    I mean if you partition afterward you'll likely have to move around data so that will wear down the hard drive a bit compared to just partitioning it beforehand. Whether that's significant or not is up to you, but most people would not worry about it unless they're doing it many times. It will save you time regardless to do it beforehand, though... – user541686 Apr 9 '18 at 22:27
  • 3
    What PC OS can you install on a HDD/SSD that does not require partitioning (prior or during the install)? – sawdust Apr 9 '18 at 22:34
  • @sawdust: Pretty much all Unix-like OSs including but not limited to Linux and BSD, probably most DOS-like OSs (after all, you can run them from floppy disks, CDs, or DVDs, wich are usually not partitioned). I'm not sure about Windows, but I guess it's possible as well. – Jörg W Mittag Apr 10 '18 at 8:06
  • 2
    @sawdust I know a friend managed to install fedora onto an unpartitioned disk. It led to problems down the line though as it expected to live in a partition. – Baldrickk Apr 10 '18 at 8:45
  • 1
    With Windows you can have the entire disk as one partition. Some call this "not partitioned". But if it really wasn't partitioned I don't see how you could even boot. – Jamie Hanrahan Apr 23 '18 at 23:06
22

No real advantages.

If you only have one drive you do not even get a choice. You have to have something to install the OS to, and for windows that is a partition.

(For completeness sake: For almost any OS that will be a partition, though you could tell BSds etc to use the raw drive in dangerously dedicated mode. And I would not be surprised if QNX, GNU/Linux etc also supported this).

Having said that:

  1. Why do you even think it would influence the lifetime of a harddisk?
  2. Regardless of pre-OS install partitioning or post-OS install partitioning, you almost certainly want a second disk or a second partion for data. (e.g. to store /usr/local and /home, or in windows My documents/
  • i didn't exactly say lifetime, I tried to emphasize it's about physical effects I'm asking – ETHER Apr 9 '18 at 16:53
  • 2
    You definitely have a choice. You boot your computer from the OS install CD / DVD / USB boot media, and use that to partition your drive before installing. Letting the OS install to a single partition that covers the whole drive and then shrinking that is not necessary. IIRC, even Windows includes a partition tool on their installer boot media (even one with a GUI, not just command-line fdisk or whatever it's called these days). All GNU/Linux distros do, of course. – Peter Cordes Apr 9 '18 at 23:39
  • The only way that partitioning could, even remotely, affect harddisk life - that I can think of, would be a small vs larger swap partition in mechanical, non SSD-harddisks. Theoretically a smaller partition in an area that gets lots of writes could generate more wear. But like I said, this is theoretical and highly unlikely to have any real world effect. – DocWeird Apr 10 '18 at 8:11
  • Side note: some SSD controllers support dynamic over-provisioning. This means that unused space in the partition table is used freely by the SSD for maintaining write performance. See this official article from Seagate: seagate.com/tech-insights/… – oldmud0 Apr 10 '18 at 22:17
  • @oldmud0 Isn't any free space used? Partitioned or not? So 100GB disk with a 100GB partition and 80GB data vs 1000 GB disk with 90GB partitioned, 80 GB of that used and 10GB as overprovisioning would behave the same? (assuming trim works). – Hennes Apr 11 '18 at 4:59
9

The big reason it's better to have a strong partition plan at install time instead of messing with it dynamically once your OS is installed is usually a matter of data preservation. Many utilities will let you truncate a partition that has data in it, which can leave the drive in a corrupted state and require reinstallation of the OS or any applications which lost files due to the change. That's the extent, however; the HDD or SSD doesn't suffer abnormal aging or stress by doing partition changes.

  • "the HDD or SSD doesn't suffer abnormal aging or stress by doing partition changes" - when GParted moves a NTFS partition, it copies its entire contents. That's quite a stress for a SSD. (I don't know if other tools can do it more gracefully) – gronostaj Apr 10 '18 at 9:43
  • 2
    It was a stress for an SSD. Modern SSDs don't suffer the rapid write-cycle expiration that the earlier ones did, largely due to TRIMing and use of SLC memory. Current gen SSD typically last longer than the machines in which they are installed outside of massive data centers where the drives receive constant writes. – CDove Apr 10 '18 at 11:56
  • Modern consumer-grade SSDs don't use SLC, but mostly cheaper TLC, which is less durable. TRIM doesn't work in this case, because it's a byte-to-byte copy. In 2 years of its lifetime (so far) my SSD had 23 times its capacity written to it, that's roughly 1 full overwrite per month. So moving a half-disk partition is basically two weeks worth of writes done in a few minutes. It won't kill a drive (unless you move partitions daily), but it's a significant amount of data. (Btw, declared durability of my MLC drive is 2x higher than current TLCs. So durability of new SSDs is actually getting worse.) – gronostaj Apr 10 '18 at 12:49
7

Mostly, it doesn't matter.

One exception is when installing legacy operating systems on modern drives.

Old OS installers tended to align partitions on "cylinder" boundaries. In particular, starting the first partition at the start of "cylinder" 1 (sector 0 was reserved for boot code and the partition table).

Modern drives would typically be viewed by the OS as having 255 "sectors" per "track" and "63" heads. So each "cylinder" would have 16065 sectors.

This was fine until "advanced format" drives came along. These drives have a physical sector size of 4KiB but a logical sector size of 512 bytes. They work much better if reads and writes (especially writes) are a multiple of 4KiB in size and aligned on a 4KiB (8 logical sectors) boundary. Unaligned writes will translate to a read-modify-write operation which risks data loss.

The result of this is if you are using an "advanced format" drive, you really want your partitions to start on a 4KiB (8 logical sectors) boundary.

You will notice that 16065 is not divisible by 8. So using an old OS tool to partition a modern drive is highly likely to result in misalignment.

  • 2
    @crypto: Note that this isn't only a data loss concern, but it also means your drive is doing more work than necessary, so wearing down faster. – user541686 Apr 9 '18 at 22:29
  • +1. This is actually a very good reason. – Hennes Apr 11 '18 at 5:04
2

Many filesystems (eg ext3/ext4) make decisions about optimizing reserved structures (eg sizes of inode tables, superuser-reserved space, just maybe even the size of pointers used). It is questionable whether these structures remain optimally tuned if the filesystem size is significantly altered, especially by online resizing tools for which altering filesystem fundamentals would be to hazardous. For example, a too-small inode table on ext3 (intended for a much smaller filesystem) could make you run into a condition where the filesystem runs out of "slots" for files, so you can suddenly not create any new file and get an out of space error even with plenty space left. A too-large inode (that was meant for a larger filesystem) table would waste space.

1

Partition it before/during the installation so that you can put the user data on it's own partition independent of the OS files.

Since the OS doesn't require much (a relative term...) space, you can make he OS partition relatively small, and the user partition large.

Anecdote: I use Linux, and my user data (called /home) has been on it's own partition for 17 years. It's allowed me to copy my data from disk to disk without worrying about the OS or version.

  • A dedicated data partition or disk (either /home, D:, somewhere to host my_documents, /usr/local/home, ... whatever) certainly is a very good idea. But that can be done both before and after OS installation. (here I assume that the OS installation does not fill the whole disk with a single partition. Luckily windows is smart enough not to do that during a sane installation, though you still need to set up the partitions manually because the automatic setups gets it wrong). – Hennes Apr 11 '18 at 5:03
  • @Hennes "recent" (last I did it was 2014) Ubuntu installers default to filling the whole disk with one partition, but let you add partitions if you know what to ask for. – RonJohn Apr 11 '18 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.