Lilás Lilás - 4 months ago 19
Linux Question

Are the partitions listed in /dev/mapper inside /dev/sda?

I have the following output from fdisk -l:

$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dd2f1

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 312580095 156039169 5 Extended
/dev/sda5 501760 312580095 156039168 83 Linux

Disk /dev/mapper/sda5_crypt: 159.8 GB, 159782010880 bytes
255 heads, 63 sectors/track, 19425 cylinders, total 312074240 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/sda5_crypt doesn't contain a valid partition table

Disk /dev/mapper/ubuntu--vg-root: 151.3 GB, 151309516800 bytes
255 heads, 63 sectors/track, 18395 cylinders, total 295526400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition table

Disk /dev/mapper/ubuntu--vg-swap_1: 8468 MB, 8468299776 bytes
255 heads, 63 sectors/track, 1029 cylinders, total 16539648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition table


My question is: what is the space of my disk?
Is it only the /dev/sda size (160.0 GB)?
Or do I need to sum the sizes of the disks in /dev/mapper too? So my disk space is actually 160.0 GB + 159.8 GB + 151.3 GB + 8468 MB?

If the /dev/mapper disks are contained in /dev/sda disk, how can I have a logic disk of size 159.8 GB and another one of size 151.3 GB if my total size is only 160.0 GB?

I am having some trouble to view how the disk is organized here, and I am not familiar with /dev/mapper and I am pretty sure I only have one disk in my notebook.

Thanks

Answer

Your total size is 160G, and if you want to see how your disk is organized, I suggest that you use gparted.

The /dev/mapper/* are logical partitions, and it just indicates that you installed your system using LVM2 logical volume management.

The correct equation is:

159.8 GB = 151.3 GB + 8468 MB
Comments