[
191
]
The output will look different depending on the types of disks and mount points on
your system. In the screenshot, you'll see that the root filesystem is located on
/dev/
mapper/ubuntu--vg-ubuntu--lv
. We know this because under the column
Mounted on
we see that the mount point is set to a single forward slash (
/
). As we discussed in
Chapter 4
,
Navigating and Essential Commands
, this single forward slash refers to the
beginning of the filesystem (also referred to as the root filesystem). In my case, this is
an LVM volume, which is why we have a device with such a long name, beginning
with
/dev/mapper
. Let's not worry about LVM for now, we'll discuss that later. But
for now, just keep in mind that the single forward slash refers to the beginning of the
filesystem, and the device name on the left refers to the actual device that's mounted
there.
The actual device name varies from one server to another, and also varies depending
on whether you chose to utilize LVM during installation. Instead of a long path
beginning with
/dev/mapper
, you may instead see the device name as
/dev/sda1
,
/
dev/xvda1
,
/dev/nvme0n1p1
, or other variations. The name of the device is generated
by the type of hardware the underlying storage device is, such as the
/dev/nvme...
naming convention used for NVME hard drives,
/dev/sdaN
for standard SATA hard
drives, and so on.
The actual type of device the underlying hardware is doesn't matter so much; it only
really matters that you can identify which device is at the most danger of becoming
full. In the example screenshot, the root filesystem is using
36%
of its available space.
In this case, we aren't in danger of running out of space. There are some loopback
devices that are up to
100%
usage (identified by devices with a naming scheme of
/dev/loopN
) but those aren't actually of concern, as system processes may create
loopback devices for various purposes as needed.
While investigating disk utilization, it's also important to check inode utilization as
well. Checking inode utilization will be especially helpful in situations where it's
being reported that your disk is full, yet the
df -h
command shows plenty of free
space is available. It can definitely be very confusing the first time you run into this
situation. In such a scenario, it may be that you've run out of inodes, and your disk
isn't actually full from a free space perspective.
But, what exactly is an inode, and why would such a thing cause a disk to be
reported as full when it's actually not? Think of the concept of an inode as a type of
database object
, containing metadata for the actual items you're storing. Information
stored in inodes are details such as the owner of the file, permissions, last modified
date, and type (whether it is a directory or a file). While metadata is certainly a good
thing to have, the problem with inodes is that you can only have a limited number of
them on any storage device.
Monitoring System Resources
Do'stlaringiz bilan baham: |