name, since the Linux kernel decides which drive gets a certain name
during each and every booting process .
Solving the issue with the /dev/disk, subdirectories correspond with a
defined way of identifying the partitions and disks on the system. The
subdirectories include symbolic links generated during booting to
correct/dev/(sh)da* files. These links are usually named in accordance with
the directory identifying the files.
Subdirectories under /dev/disk
By label: File systems must have a method of naming files in order to assign a name to
a particular disk or partition.
By uuid: The UUID or the universally unique identifiers are a long string of
alphanumerical that can be used as an identification of a storage device. The strings are
not readable by people but guaranteed to be specific across systems. It will be much
advisable to use uuids to refer to storage that may move across various systems since
naming collisions cannot occur.
By partlabel and by partuuid : GPT tables usually have specific labels and even the
UUIDs used in identification. This directory function similar to the previous two
directories but uses GPT specific identifiers.
By id: They are dynamic hardware generated directories having their serial numbers
and the hardware attached to them.
By path: the directory entirely depends on the storage devices that are connected to the
system. However, connection to a different port alters the original value of the
directory; hence, it faces similar kinds of drawbacks to by ids.
Mounting block devices
Files contained within the /dev are used in communication with the kernel driver for the
system. More abstraction is required to make the device as a portion of the remaining space.
In Linux and similar Unix OS despite the number of devices involved the system is
represented in a single unified file tree. While accessing the driver’s contents you will access
them from there. There are various mounting options used that alter the mounted devise
behavior. To prevent the contents from being altered, it is wise to mount the drive in the read-
only mode.
Using the file system hierarchy standard, you can mount file systems under the /mnt or its
subdirectory. However, the hierarchy offers no recommendation on where to place permanent
storage; hence, you can mount them under the /mnt or /mnt subdirectories.