5

Do I just leave some space not partitioned and thats all?

graham
  • 10,436
  • 1
    please edit your question to indicate the version of Ubuntu yoou are using and what size SSD you propose. Will the SSD be your primary partition? – graham Aug 03 '19 at 09:09
  • Done. I have 500gb ssd only. Yes, linux is already installed there. I never heard about over provisioning thing, so I thought about decreasing parition size "live" with gparted. – personanongrata Aug 03 '19 at 09:12
  • Also, what exactly are you trying to achieve? If your concern is write lifetime, note that using a smaller part of your SSD but exposing it to the same number of writes won't increase its lifetime. – marcelm Aug 04 '19 at 10:01

1 Answers1

11

First, a SSD works totally differently compared with a HDD. On latter you actually assigned physical disk space (cylinders) to partitions. On SSDs partitions are purely logical, the space actually used for storage is distributed by the internal controller, which takes wear leveling into account, among others.

SSD manufacturers usually already overprovision their devices in the firmware. You may increase that by leaving some (logical) space unpartitioned, so the controller has more free capacity to work with. Or you can create an unused partition which you label accordingly to make clear what you intended.

But speaking from my (limited) knowledge, for the usual use cases (typical workstation use, not too write intensive) you could just assign all available space to partitions, and take care that the total space you use (over all partitions) doesn't exceed a certain percentage. So you make the best use of the capacity you paid for, without needing to repartition later (at least if your partition schema was sufficiently appropriate for your use), which would be a very write intensive process.

Murphy
  • 1,677
  • 5
    Also look into TRIM. The SSD will not know which space is no longer used by the filesystem unless it is told. – Wodin Aug 03 '19 at 10:31
  • Also check out Samsung Magician, since it's a Samsung SSD. It'll overprovion and TRIM for you with little setup – unixandria Aug 03 '19 at 19:44
  • 2
    How to use Samsung Magician on Ubuntu: https://askubuntu.com/questions/537471/samsung-magician-on-ubuntu-14-04#569581 However, applying fstrim -va once in a while is quite straightforward. – Murphy Aug 03 '19 at 20:16
  • 2
    @PeterMortensen: It doesn't. This works because nothing ever writes to unpartitioned space, so it remains in unwritten state even without TRIM. (If a drive had previously been full, you need to TRIM or secure-erase / reset it before partitioning, though.) – Peter Cordes Aug 03 '19 at 20:48
  • @PeterMortensen I'm not sure I understand correctly what your questions is aiming at. If I do, the answer is: The SSD controller doesn't need to know anything about partitions, because it works below the partition table/filesystem level, acts as interface between OS and hardware, mapping logical to physical units, and has complete control over access to the hardware. – Murphy Aug 03 '19 at 21:04
  • @PeterCordes I think your answer is misinterpretative, as AFAIK there is no "unpartitioned space" on a SSD (at least not in the sense as it is on a HDD). Perhaps you want elaborate on what exactly you wanted to say? – Murphy Aug 03 '19 at 21:11
  • 2
    @Murphy: When you make a partition table with fdisk or whatever, you leave some of space not part of any partition. e.g. a trivial example: on a 256GB SSD, make a small boot partition, a 2GB swap partition, and a 200GB main partition, leaving about 54GB unused. You could later create another partition, or grow the last existing partition, into that space. Modern partitions are merely about subdividing the raw linear array of sectors/blocks that the raw block device presents. (e.g. /dev/sda or /dev/nvme0n1). All disk formatting of rotational media is left to the disk internals. – Peter Cordes Aug 03 '19 at 21:22
  • 1
    Rotational IDE / SATA disks only present a linear array of sectors, same as SSDs. That's the whole point of "integrated drive electronics", if I understand correctly. – Peter Cordes Aug 03 '19 at 21:26
  • 2
    @PeterCordes IDE used to use CHS (cylinder/head/sector); LBA didn't come around until substantially later. – chrylis -cautiouslyoptimistic- Aug 04 '19 at 02:21
  • 2
    @chrylis: thanks. But you still don't really get a choice of actually formatting it differently to get more or less storage. It's still just a sequence of sectors with a well-agreed-upon order for traversing them. i.e. there is a fixed conversion between linear and CHS for any given drive, so you can still logically think of partitioning as breaking up that linear space into regions, regardless of how you store addresses. @Murphy's comments and answer about rotational HDDs implies much lower level than it is: remapping of bad sectors to a small pool of spares is a thing for magnetic disks – Peter Cordes Aug 04 '19 at 02:44