Quantcast
Viewing all articles
Browse latest Browse all 649

Answer by Kamil Maciorowski for why fdisk -l /dev/sdX not show under system the "Linux LVM"

The id 83 in a dos partition table is a generic one for Linux filesystems; 8e is a more specific one for Linux LVM.

The id of your /dev/sda2 was a choice of whoever created the partition. The choice may have been explicit (he or she deliberately wanted 83) or implicit (he or she chose not to change the default value of 83).

The type of the filesystem (or another structure) inside the partition does not have to match the id. The id is only to "encode" the purpose of the partition in the partition table itself, i.e. without any need to examine data inside the partition (and this is usually a filesystem). One is not obliged to create a "matching" filesystem, technically it can be anything. E.g. you can create NTFS on your sda2 and still keep id 83 (which would be misleading then); or you can change the id to whatever you want. It's technically totally possible, although in case of discrepancy between the id and the actual content some tools may misbehave (compare this other answer of mine, but note it's for GPT).

You don't need to ignore 83. If you think 8e fits your setup better, correct the id. On the other hand if everything works as-is then you don't necessarily need to correct the id. It's your choice. If sda2 is indeed for LVM then most likely 8e does fit the setup better.

To change the id of /dev/sda2 to 8e:

  1. Run fdisk /dev/sda.
  2. Cast the command t.
  3. Choose the partition number 2.
  4. Choose (input) 8e as the new type.
  5. Examine the new partition table with p.
  6. If everything looks fine, write the new partition table to the device with w (if not, abort with q).

Doing this when /dev/sda (including sda1, sda2) is in use may trigger a warning, but if it's only the id you're changing then the whole operation is safe.


Viewing all articles
Browse latest Browse all 649

Trending Articles