Filesystem, corrupted, or if there is a filesystem corruption, well, what is a filesystem filesystem
consist of the the directories of folders that you create a new operating system.
So there are different type of file systems.
The file systems are like extension three and the next extension for office NTFS or Fat and Windows.
These are all different type of file systems that we have an operating system, a file system layout,
and politicians are like slash war, slash Etsy, slash root or slash home.
So whenever you carve a desk and you give that disk to your operating system, the first thing you have
to define is what type of file system do you want for it?
Then you pick a file system, for example, for once that is assigned to your file system.
The next step is to partition that disk or that file system and the way you want.
If you leave it a default file system, then everything goes under slash.
But if you wanted to partition with advanced partitioning option while you're doing the installation,
then you could use Lajoie ETSI or whichever the partition or mount point that you want to specify.
So what happened is when the file system is corrupted, it usually gets corrupted in one of these partitions.
Maybe the aguaje is bad at sea of sexualizes bad.
That's why sometimes the system administrators, the way they design the operating system is they slice
each petition's differently.
So this way, if there was a problem with war, it only stays with war.
It doesn't impact the whole file system.
So that is one of the main reason people pick the partitioning off your desk instead of just picking
one big, large partition, which is now how do we check the file system?
Well, the first command that you need to run is D.F. Command.
We already talked about a command, tells you what type of system you have and where that file system
is being partitioned and where is it mounted.
Also, you can run the command F disk with minus L'Opera to see all the disk that you have in your,
um, in your system and also each partition of that disk.
If your system is running on LVM, that you could run many LGM commands like Elvie Display, Peevey
display, uh, the Elvie block.
So there are many commands that you can run to see your file system.
Now let's get into troubleshooting steps so you know, your system is running slow or you have identified
that you have a file system corruption in one of your partitions.
So what do you do?
You first check the wire log messages to confirm that it is actually the PA system and you will see
a lot of error messages that will come up in your Warralong messages that will say that bad block on
this sector, on this disk, and you need to fix it or you need to run AFSC K, you will see that in
your log messages or log messages or any type of log like Warlock's.
This log are very, very important in a system structure to identify where the problem is.
Then once you know that you do have a file system problem or a corruption and you identified which partitioned,
that file system is corrupted, then you run the command frsc k, this is the command f k which stands
for File System Check.
Uh, this command has been used with many different Linux as well as Solaris or Unix flavours as well.
It's still there.
It works perfectly.
Um, there are some of the um, some of the new commands that are in there for different policies.
Maybe a first file system will run as a repair, which will talk about it in a little bit.
So anyway, we run the FC K on block device, which is Dev SDK.
We will not run on the mound point, meaning these are the multipoint, which is why we cannot run FRSC
K on war.
We have to run on the actual mount where it's a coming from the source that would be the block device.
Then make sure we are inbounding the file system before we are running a Physick, because if you run
FC K on a mounted file system or mounted.
That is already mounted on war at sea.
It will give you an air message and it will say you cannot mounted because that filesystem is busy.
That is why one of the things that a lot of people get into trouble seeing when they are trying to do
the corruption, clean up of the corrupt system and they run Facebook and it doesn't run.
And then they are sitting in trying to find out why it is not running.
Read the error message, what it says, and it will tell you why it's not running, because it cannot
run that command on the mounted file system.
So let's get into our Lennix machine.
I have already opened a terminal to my politics machine and the first thing we'll see is we'll see the
layout of a file system which and for that we'll run the idea of Miles H.
H is for human readable option.
You could pick any option you want if you pick, I suppose, t that also tells you what type of file
system it is.
It is office temp file system or file system.
So let's just run FTF miles each and you will see there are different file systems are also there as
temp office.
These are just a temporarily this is not the actual file system.
So what you could do is you could do the F minus H and grep minus V to exclude temp first.
So now you know exactly how many petitions you have you have to petition.
One is mounted on slash, which is just slash on the root level.
And the second one is SD 1A, which is mounted for boot.
Boot is usually mapped on on a regular block device.
It does not get mapped on the LVM.
So up here you'll see this is the LVM.
It always starts with the mapper.
So we identified it.
Now in your system, if you are working in a corporate environment or any of your system, you probably
going to see more mounted points.
You probably have slash or slash at sea, slash, opt, slash, um, espin or slash temp, whatever
the petition you have, it's OK.
I'm not going to go into every one of them, but I'm just saying you probably going to see a lot more,
a lot more points on your system.
If you don't, that is fine.
But let's go come in here.
And um, to cover this, I have actually attached a disk through my virtual machine and I am going to
mount that disk first just to show you how we could run FRSC K so that disk I will do A minus K F displays
mask.
Oh sorry.
F dismissal.
And here if you notice I have a new disk which I have already partitioned.
Um, I just wanted to add that I have already partitioned that, that new disk.
If you, if you notice right here, I have a disk disk as Dev CDB, which is five gig.
This is what I got it from.
I was a machine and I have already partitioned that.
Now I have to mount that somewhere, so I will mount it in one of the directory that I have created
earlier.
So that directory is in my Slashdot tree, which is I named it Sparer Data, so I'm going to mount that.
Staggs Mount sd dev sd be one to spare.
Data.
OK, now it is mounted when I run a DF minus H, of course I will grab everything, all the temporary
file system and now you will see I have basically two file systems.
One is Saeda and one is CDB.
They are the same system.
Zephyrs, I wanted to know, I have discovered that this file system or this partitioned point is corrupted.
No, I need to fix that or clean any bad sectors that is on this partition.
So I will run the command f sc k space slash speare data.
Now the reason I'm putting that here, because I want you to know that it will not work because I am
trying to run FRSC K on the Mount Point which does not work and it would tell you it's a directory while
trying to open this so we don't do the directory we do on the block device as I mentioned before.
So I will do frsc k dev s DB one.
Now I'm running this.
It will still fail.
Why?
Because as I mentioned in my last part, it says unmount file system and then run it on mounting mean.
It is already mounted on this directory.
So that's why it's not going to work.
But I will go ahead and run it to see the error message.
OK, so when I ran it, it says FC K forms utility Linux so and so and the version and the date and
this is Dev as DB one is mounted E to FRSC K cannot continue.
So abhorring basically this E to FC K is a newer command, but uh for FC K, I'm sure of a K probably
have a link to this.
There's a new command that you can run anyway.
We could talk about new commands later, but right now our focus is to find out why we cannot run FRSC
K on dev CDB one and we know we cannot because it is mounted.
So what do we have to do.
I have to unmounted.
You mount the command to unmount as you mount slash spear data, that's the petition or decimal point
I have, so I'll run the comment and now it is unmounted.
I will do it again and you will see it is not there.
Now, I could run aphasic CDB one by heading up Cherokee's, which will repeat all the commands that
were ran earlier.
I am enter as soon as I hit enter, says FC K from utility so-and-so and Virgin data and says we want
clean and it has some.
Its calculations and defiles is telling you how many files it has, how many blocks it has since this
is only five gig and it went pretty fast and there is no files or data on that spare disk right now.
That is why it went pretty fast.
And you see, you got the result right away.
If you have that, let's say, a hundred gig of disk and has so much data on it that it could take a
long time to run, it will go into it and I'll check everything that it has to check on for the back
blocks and it will fix it.
So it's also possible while it is fixing it, it will ask you, hey, I found the fix for this.
Do you want me to fix that?
That bad, bad block?
And you will have to enter y to say yes, go ahead.
So one thing is you keep saying y y and keep entering and on the prompt or you could just simply say
frsc k minus Y it means whatever that you're going to ask me.
My answer is yes.
So then you hit enter and I will go through all the file system again and it will clean up.
Now next thing I wanted to talk about, which is one of the biggest things a lot of people experience
is they say, OK, my file system is corrupted, but it is a root file system.
Now, how do I clean that when it is mounted?
If I unmounted, it's not going to let me out because that's where I am running my entire operating
system.
So how can I do that?
Well, that's a very good question.
If that is coming in.
In your mind, many times we have that issues we cannot clean up.
So the only way we could do that is we have to boot our machine through the CD rom.
We have to mount our Centaurs or RedHat CD to our Linux machine right here and we have to boot from
that CD rom.
And then once it puts it will give us the rescue option.
We'll pick the rescue option and then we can fix this issue.
If there are any bad sectors on the route or any petition that cannot be mounted while the operating
system is running.
Now, how can I do that?
So for that, you cannot use a PUDI session.
For that you have to actually console into the machine because you will be rebooting the machine and
you will be bringing down all the network connections and all the multi user environment.
So I will go into my Linux machine through console.
OK, I am logged into Kosal now I have to attach the device so the ISO image of my S.O.S go to device
optical drives and choose a disk image.
Once I go in here, it will tell me where the file is.
I'll say desktop.
It is on my desktop and the file is CentOS.
Click open if you want to confirm it has attached, you could go back to device's optical drives and
you see the check block is right here, so it means it is mounted.
So now all I have to do is do a reboot and better when it reboots at you see it in the back.
I have um, the putty session and it says it lost the server unexpectedly.
That's fine.
Now I am at the section where it says Install Santoya seven.
You probably have seen that if you have recently done the installation.
So install S.O.S.
Perfect.
You don't want it to do that because this is if you are doing the installed from scratch, test this
media and install S.O.S.
It's the same thing, but it will test it again.
Our option is troubleshooting.
I'll go in and head in troubleshooting now.
The next option is install S.O.S in basic graphical mode.
Again, are not installing.
We are doing rescue.
So come down to the selection, to the option which is rescue Acento assist.
If you are using RedHat, it would say rescue a RedHat system to hit enter.
Now it's basically starting up the.
The operating system, not actually the operating system, but the system that is actually on the disk
that is used to go through the installer is starting installer.
Well, in fact, is not doing the installer.
So don't be alarmed by that.
Now, here we are in the rescue mode.
Read it.
Read it very carefully.
Says the environment, the rescue environment will now attempt to find your Linux installation and mounted
under the directory slash Mouche Lassus image.
You can then make any changes required to your system.
Choose one to proceed with this step.
You can choose to mount your file system, read only instead of read write by choosing to.
If for some reason this process does not work, choose three to skip directly to a shell.
So if I mounted, if I pick one, then it will mount my file system, which is route to slash romanticists
image.
So certainly I lost the screen anyway, so I don't want to mount that if I mounted, then I cannot run
aphasic, which I will be in the same situation.
I don't want to mount it as Read-Only, so I will just skip straight to the shell.
So I'll pick option three and Haddara.
Now I have the shell, so I run demonises command and you will see none of the file system will show
up here that actually the petitions that we have in the actual operating system runs.
So it's this the one that you see right now?
It is actually coming straight from the KDDI.
So you know that already your file system that you need to clean actually lives on Dev SDK.
So you will run now you run FSC K minus Y if you want to dev SSD a one, because you have to specify
the entire partition for every partition.
Do you have on the disk now you hit enter and it says FC care from utility two to three, the two Espin
FC Kit Zephyrs file system.
It means I cannot run FC K for the partition for that is on their lives on or that has assignment of
SFL file system.
So I have to run the command FC K Zeppos now run dev SDK one.
Now if you wish to check the consistency of a file system somewhere, repair damage file system.
See this now it's saying now go to discom and this is the one I was talking about.
You will have to run this command instead of FC K, so now you run a dev SD a one hit error and it's
going through all the phases, phase one through six and it's actually resetting the content, resetting,
checking the blocks and it's verifying in and says verify and correct link count and at the end done
so basically it went through the whole lot.
If you had a big disk space with a lot of data on it, then it will take a long time, as I mentioned.
So now since it's mounted, it's cleaned up.
Corruption is cleared on your file system.
Now, you could simply do a reboot, but before you do the reboot, just unmount the optical drive so
it won't start off the ISO image.
So force unmount and hit reboot.
It will it will reboot and it will come back as clean desk and no corruption, you will also check and
voila messages anyway.
So this is about this lecture file system corruption.
Then you have to follow these steps one by one.
Again, if you have any questions, please send me a message and I'll be happy to answer anything that
you have in mind.