19

If I partition a SSD, will it really partition the drive physically or will the SSD Controller (for example Samsung Phoenix) fool the OS that it is partitioned but it actually manages the drive by itself?

1

3 Answers 3

53

Partitioning is only ever presented as a logical assignment of space... It's not really a physical operation on modern spinning disks either.

Take sector reassignments as an example - you have no control over where data is physically stored.

With solid-state storage like SSDs and SD cards, this concept is taken to the next level, with logical blocks assigned to physical storage in a way that is completely out of the control of the user and even Operating System - the main reason for this being wear levelling. In addition to this, a growing number of SSDs will encrypt their entire contents, so the data isn't accessible to you at a physical level anyway.


If I partition a SSD, will it really partition the drive physically

No, but it never was a physical operation anyway.

... or will the SSD Controller (for example Samsung Phoenix) fool the OS that it is partitioned but it actually manages the drive by itself?

Partition tables are typically something that the storage device knows nothing about - it presents itself to the operating system as "a massive array of blocks" (hence the term "block device").

It is entirely the Operating System's job to correctly interpret the partition table, and present the logical partitions for use (e.g: as the space to store a filesystem). This presentation is not much more than simply "from x to y is referred to as partition 1" - it's a transparent window that bounds your access to the underlying storage device, and restricts access to between these points.

block device layout example

In the (very rough) example above, we have:

  • The partition table at the front, in purple. As mentioned above, it informs the OS where the partitions logically are in the storage device.
  • Partition #1 starts at location 8, and runs through to location 456 (i.e: it's 449 units in size).
  • Unused space
  • Partition #2 starts at location 504, and runs through to location 904 (i.e: it's 401 units in size).
  • Unused space

In this example, the OS will present the two as things that can be used... you'll probably have filesystems on both, and the contents of the filesystem will be presented at a mountpoint (like C:\ on Windows, or perhaps /home on *nix).

The "foolery" that you're referring to is actually lower than this... The SSD keeps a map of where each logical block is physically located. But this is completely invisible to everything outside of the SSD. If you looked at the raw / physical flash, then it would be:

  1. A jumble of non-sensical mess that you'd need to reconstruct (using the SSD's propietary map)
  2. More and more likely it would appear as random noise, with no data or patterns present, because it's encrypted.

ssd logical to physical mapping


To clarify a potential source of confusion, some things (like eMMC storage) do support physical partitioning, but this is not what you're referring to.

For eMMC, it's a one-time operation that can be used to physically keep one region of flash separate from another - the wear levelling algorithms will never cross that boundary. It can also be used to treat a section as SLC rather than MLC, supposedly for greater longevity and reliability, and is intended specifically for embedded systems.

10
  • 2
    I guess "physically partitioned" means that each bit of iron oxide is always owned by a certain partition? Commented Feb 10, 2020 at 12:47
  • 2
    Sounds reasonable to me... This is what it means for the eMMC "partitioning" I mentioned - a range of flash cells are specifically allocated to a partition, and may never be used by another partition. The logical to physical mapping and wear levelling still occurs, though it is bounded to the partition's region of physical flash.
    – Attie
    Commented Feb 10, 2020 at 14:07
  • 11
    The diagrams really make this an excellent answer. Commented Feb 10, 2020 at 14:45
  • 4
    I would disagree with it never was a physical operation anyway. In ancient times, partition tables did agree with physical sector layouts and you could measure differences in disk performance depending on if the partition was on the inner cylinders compared to ones on outer cylinders.
    – doneal24
    Commented Feb 10, 2020 at 19:26
  • 4
    @doneal24 true, physical / logical association of blocks (aka sectors) was much stronger in the past, though this was an artefact of the underlying storage (etc...), not an explicit promise by the partitioning that was in place.. partitions have always been a logical assignment of space.
    – Attie
    Commented Feb 10, 2020 at 19:41
5

On an SSD there is no fixed assignment which chip contains which sector. Therefore the "partitioning" is not existing on hardware level (because the SSD controller dynamically assigns the flash chip sections to sectors to perform wear leveling and increase the life of the SSD).

If you name this "fooling" than yes. But you will only recognize this if you solder out the flash chips and access them directly. Or if you manage to access the SSD bypassing the SSD controller (normally this is not possible).

However in the data level the partitioning is existent and visible to the OS and that is everything what matters.

6
  • 5
    Therefore the "partitioning" is not existing on hardware level and never was. For HDDs it's the same
    – Suncatcher
    Commented Feb 9, 2020 at 20:40
  • @Suncatcher: Antique hard drives used cylinder, platter, and sector numbers which actually corresponded to the physical layout of data on the drive.
    – supercat
    Commented Feb 10, 2020 at 5:02
  • 3
    @supercat Still, partition table is just data. There's no physical difference between partitioning and storing files.
    – gronostaj
    Commented Feb 10, 2020 at 5:13
  • @gronostaj: On antique hard drives, layout would have sometimes-predictable effects upon performance and fragmentation.
    – supercat
    Commented Feb 10, 2020 at 7:33
  • @Suncatcher AFAIK on an HDD each sector has a fixed physical location on disk (excluding relocated sectors) - at least on the "traditional HDDs" may be there are new types that have areas that are assigned dynamically. Therefore on those statically assigned HDDs partitioning can be translated to areas on the disks of an HDD.
    – Robert
    Commented Feb 10, 2020 at 7:37
1

Almost certainly the partitioning will be done by the OS. Only the newest SSD's for large enterprises have the capability to do the partitioning in the SSD. An example would be the Samsung PM1725a. You might find such an SSD in a cloud server, which is used by multiple customers at the same time. They even have features to be accessed by multiple Operating Systems at the same time. More consumer-oriented SSD's like the Samsung 980 are designed for a single user and do not offer this sort of features.

3
  • 1
    Are you refering to the "Multi-namespace" feature mentioned in the literature? If so, this is a similar concept to the eMMC partitioning I mention in my answer, and is almost certainly not what the question is about. This is the trouble with reusing terminology!
    – Attie
    Commented Feb 10, 2020 at 14:18
  • @Attie: Indeed. The main thing is that non-technical readers would probably not use the name SSD for that eMMC, but the Samsung device would definitely be called an SSD. It's even in the URL!
    – MSalters
    Commented Feb 10, 2020 at 15:03
  • Partitioning is possible without an OS. But it is intended to be interpreted. The actual location of any addressed block is abstracted from the interface. Logically everything is structured.What goes on behind that opacity is only important after a failure or for forensics.
    – mckenzm
    Commented Feb 11, 2020 at 19:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .