A disk is a mass storage [device](./Devices.md) which we can write to and read from.
## SCSI
* Small Computer System Interface
* Pronounced _scuzzy_.
* It is a protocol that allows communicaton between printers, scanners and other peripherals in addition to harddisks.
* The `/sda/` device that is the most common designation for the harddisk in Linux systems stands for *SCSI disk*.
## Disk schematic
The following diagram represents the basic anatomy of a disk device.
* A disk is divided up into *partitions* which are subsections of the overall disk. The kernel presents each partition as a [block device](./Devices.md#Devices.md) as it would with an entire disk.
* The disk dedicates a small part of its contents to a *partition table*: this defines the different partitions that comprise the total disk space.
* The *filesystem* is a database of files and directories: this comprises the bulk of the partition and is of course what you interact with in [user space](./User_Space.md) when reading and writing data.
## Partitioning disks
### Viewing current partitions
Whenever you install a Linux distribution on a real or virtual machine, you must partition the drive. There are three main tools that people choose from: `parted`, `g(raphical)parted`, `fdisk`.
We can use `parted -l` to view the partition table for the current machine:
```bash
Model: SKHynix_HFS512GDE9X081N (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 513MB 512MB fat32 boot, esp
2 513MB 30.5GB 30.0GB ext4
3 30.5GB 512GB 482GB ext4
```
We can use `fdisk -l` to get slightly more info:
```bash
disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors