Formatting and partitioning storage devices
A disk must be formatted before it can be used. Finding the device’s given name is necessary to format the right disk. If you read the last section, you know that drives in Linux distributions follow a predetermined naming convention. Consequently, you should be familiar with the new disk’s device name. You can view information about the storage devices connected to your server using the sudo fdisk -l
command, as previously mentioned:
sudo fdisk -l
Figure 10.2 – Listing all disks
The /dev/sdb
device is new to my server, as I just installed it (see Figure 10.2). I’m using it for the exercises in this chapter. Currently, it is not partitioned. At this point, it’s quite clear that the storage device referenced by /dev/sdb
in the previous example is brand new. To avoid losing data, we must be careful never to format or repartition the wrong device. Since there are no partitions...