Storage Integrity (Demo)

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
21 hours 25 minutes
Difficulty
Intermediate
CEU/CPE
21
Video Transcription
00:00
>> Hey Cybrarian, and welcome back to
00:00
the Linux+ course here at Cybrary,
00:00
I'm your instructor Rob Goelz.
00:00
In today's lesson, we're going to
00:00
be covering Storage Integrity.
00:00
Upon completion of today's lesson,
00:00
you're going to be able to understand the types of
00:00
storage integrity issues that
00:00
you may need to troubleshoot,
00:00
as well as use commands to find
00:00
degraded storage or identify bad blocks.
00:00
Now, strictly speaking on the Linux+ exam,
00:00
storage integrity refers to bad blocks,
00:00
that are identified on a storage device
00:00
or maybe on a partition.
00:00
However, the storage itself can become degraded.
00:00
This can refer to the storage medium,
00:00
such as on a SSD,
00:00
which has a limited number of read and write,
00:00
or what are called program or erase, PE cycles,
00:00
but it could also refer to a degraded mode,
00:00
which is when one or more disks
00:00
in a RAID array have failed.
00:00
Let's look at degraded storage first.
00:00
If we have SMART on a storage medium,
00:00
smartctl can be used along with
00:00
any other vendor-provided attributes
00:00
to determine the wear on that device.
00:00
We'll talk a little bit more
00:00
about that in the next slide.
00:00
But if we're troubleshooting a RAID device
00:00
that's maybe degraded,
00:00
the easiest way to see this is with the mdadm command.
00:00
We could use mdadm-D,
00:00
and then the RAID array,
00:00
and it's going to display the detailed
00:00
status information about that array.
00:00
Now, if we see the word degraded in the status return,
00:00
that means that there is an issue on that RAID device.
00:00
When we're testing for bad blocks on a device,
00:00
we can use that bad blocks command.
00:00
For example, we could run this on,
00:00
say /dev/sdb1, but,
00:00
of course, we need to do is after unmounting.
00:00
What we're going to do after we've
00:00
unmounted /dev/sdb1 is we can run
00:00
sudo bad blocks-nsv on /dev/sdb1.
00:00
What that's going to do is going to do
00:00
a non-destructive read-write test
00:00
for bad blocks on that device,
00:00
and it's going to check all blocks
00:00
from zeros to the end,
00:00
and perform its nondestructive read-write test,
00:00
and then if it pass successfully down to the bottom,
00:00
we're going to see pass completed
00:00
and zero bad blocks found.
00:00
Otherwise we would see the error message here,
00:00
you can see is 0/0/0 errors.
00:00
You would see errors incremented in
00:00
that very last part there in between the parentheses.
00:00
Now another way to check for
00:00
bad blocks is to use smartctl.
00:00
We can use smartctl-a, and then the name of the device.
00:00
This is going to display unreadable disk sectors as
00:00
either currently pending or offline uncorrectable.
00:00
Now, keep in mind, a block
00:00
is actually a group of sectors.
00:00
It may be one, or several bad
00:00
sectors that are causing the bad blocks.
00:00
In this lesson, we covered the types of
00:00
storage integrity issues that
00:00
you may need to troubleshoot,
00:00
and then we talked about using commands to
00:00
identify degraded storage and bad blocks,
00:00
such as smartctl,
00:00
mdadm, and badblocks.
00:00
Thanks so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next