Filesystem check.
There are two type of commands that you could use to prepare your file system, the main one which has
been there and still there for years is FSC k.
This command has been always used, starting from Unix era and Solaris moving on to Linux.
And then there is another command that was introduce first and repair EXIF first file system or except
first underscore repair command is used for file system that I build on except this file type.
So Linux FC K utility is used to check and repair Linux file system and those Linux file system specifically
are two, three, four and so on.
So this utility once again is only used for filesystem that are built on extension two, three, four
or any other related file system.
Lennix EXIF first underscore repair utility is used to check and repair Linux file system except first
file system type, as I mentioned earlier.
So then how do you check if a file system is Zeppos or extension three file system Euron Dev Comen?
I believe with the option minus T, which tells you the Linux file system type, then depending on when
was the last time a file system was checked, the system runs the FC K during boot time to check whether
the file system is inconsistent state.
So every time your system votes up by default, it does the fact check.
And if there are any inconsistency, any corruption in the file system, it actually fixes that.
And sometimes you probably see one system boards up.
It takes a longer time to boot up because FRSC kid might find some of the disk errors or it tries to
fix it before it actually brings you into the operating system problem mode.
Then system administrator could also run it manually when there is a problem with the file system.
So if you get an error messages and wire log messages or in IO state or any of the command that you
run and then that you do find that file system or one of the file system on on your system is corrupted,
then you could run the command manually.
You don't have to wait for the system for Rebo to run it to make sure to execute K command on an unmounted
file system to avoid any data corruption issues.
So that's what you have to make sure that it is not mapped to any map drives.
So remember, when you do D.F. Miles, each command and you will see on the left hand side, you'll
see all the mounts and on the right hand side you'll see all the points I'm sorry, in the left hand
side you see the file systems that slash dev, slash SDK one, Oresteia two.
And on the right hand side, all the way to the right, you see the points where it's mounted to.
So before you run Physick, are any of those file system?
Make sure you unmount.
Hey, how about I need to run it on slash route.
Then how can I, unmounted, right?
That's a good question.
Well, the answer is you can't there's no way that you unmounted, you're only the only way to do it
is that you report it or bring the system and single user mode or bring the system in recovery mode
and mounted on the disk and then do fousek on your original file system, which is rooked, but gets
a little complicated as you actually bring the system in, which is a mode and how you do it now.
Continuing on force file system check even if it's clean using option F.
So if you wanted to do a file system check and it is already clean but you still wanted to run it,
then use minus F option, why do you want to even clean it when it's already clean?
Some people do like to keep it consistent.
If they are going through files and some check of every file system, then they might do an entire file
system because if you have a different partitions on your desk and you want to clean every petition
and perhaps maybe one of the petition is clean, so it will tell you, hey, this petition, please,
I'm not going to do it.
So instead of just going through back and forth and see which system or repartition is cleaned, then
you just mind set option, which was clean.
Everything OK?
Attempt to fix detective problems automatically.
Who's using option Y?
What y means is if you are doing K file system and then you use minus Y option with that, then it's
not going to bother you with questions like hey, is it OK if I go ahead and clean it.
Hey, I found this problem and these bad blocks as they occupy proceed.
So these are the type of the things that you specify or pre define before running the script, before
running the command.
So it's just like as if you were doing youm install and it will ask you question, hey, I found this
package.
Do you want me to install and you say Mazwai, but if you do not want to have enter y all the time then
you could just specify minus Y with that.
The federal pay utility is highly scalable and is designed to repair even very large file system with
many, I know that.
Unlike other Leung's file system, experts underscore repair does not run at boot time.
OK, so the difference primarily is between Fekkai and Zeppos is Zeppos.
Filesystem is was introduced for larger prediction like terabytes petabytes.
So that's why they came up with Zephyrs.
And the reason we don't run the utility at Bhuti, because of course it does the check or clean up of
the file system, which is very large, and you don't want to wait for it to finish checking your file
before you get into operating system.
That's why it doesn't do it at budget time.
If you do have issues, then you could run manually but bring the system into a single user mode.
Or if it's not coopetition, then you could simply run it by and mounting it and running it.
The following are the possible exit codes for FHC kick in and those exit codes are zero for no errors.
Meaning when you run the command and you get an output status or exit code zero, that means there are
no errors.
And to check the exit code, you could always run Echo Dollar and questionmark right after running your
command and you will get the exit code.
So zero, of course, no errors.
All successful, no one as file system errors corrected.
Number two, false system should be rebooted for file system errors left uncorrected eight, 16, 32
and so on.
And of course you could look it up.
More errors online if you like to get into more detail of how the exit codes are, what are each error
code meet?
And I'm sure you don't want to get into too much detail because not all the time you will get the error
codes with that.
So let's get into our Linux machine and let's try to see if we could run Epicure on a few of the filesystem.
I have my Linux machine open right here, and I logged into my position, I am logged in as myself,
I am in my home directory and the system I'm logged in is my system, which is my lab system, my first
Linux VM perfect No-Hit now type clear to clear the screen.
Now how do you check the file system D.F. minus H.
So what I was talking about, this is a file system on the left hand side.
All this on the left column.
If you wanted to, if you just left column you could do Halk.
Printed taller one, right, and it will only give you the first column.
Now the second column size, what is the capacity used?
What is available?
The percentage.
And the last column is mounted on.
So if you want to.
Correct, any inconsistency on a file system you do not correct.
You do not run physically on the mounted file system.
You don't you do not run like, let's say on data or Oracle.
You run on the actual file system.
But before you run it, you need to pick which utility you have to use to do the file system check.
And the utility depends on the file system type.
How do you find the file system type is by running DF minus Teckman Uppercase T and you will see the
type right here tells you Zeppos.
Except except this, except this now, since we are running our latest version of RedHat.
Most of the pilot system that are introduced, used in the latest version of RedHat or S.O.S or Zephyrs,
if you are working on all the version of Readhead, then you probably going to see two, three, four
and so on.
And then you could use the command aphasic on X default system.
But since now we are using this file system, we need to run the Zephyrs underscore repaired utility.
But anyway, just to find out or verified, let's run our FC K command on one of the PA system.
Let's say if you run it on this one, the SD B1.
Hit enter and you will see if you wish.
First off, came from utility the next.
This is a version.
Then it says, if you wish to check the consistency of the festival system or repaired or damage file
system.
See zippers and disco repair, because when you ran it, it found out, hey, this file system is not
a filesystem system, it's first fault system.
That's what it has given you, the option or the suggestion to run this one.
OK, we'll run that one except this underscore repair.
Now we'll specify the file system, SD be one hit enter.
OK, now what does it say?
It says except his repair.
I ran it.
I ran it on your file system, the one that you asked me to run.
But it contains a mounted file system.
Second message contains a mounted and rideable file system.
Fatal error could not initialize Zephyrs Library, OK.
And that's why.
Because this file system is mounted on.
Slash data.
So for me to run Zeppos underscore repaired utility on this filesystem, I have to unmount this false
system from this point and to do that, I have to do you mount slash data simply that hit enter and
it says uman to slash data unmount operation not permitted.
Why?
Because who am I.
Am I have so and for for this operation to be successful I have to be a root.
OK, who am I?
I'm root the study of minus T and you'll see all the file system.
Now let's do you mount slash data.
Remember, you have to mount that file system again.
So before you mount unmounted, you have to make sure copy this somewhere so you don't forget.
So you mount data.
It has mounted it.
Let's verify D.F. minus T and you'll see there is no file system dev CDB one and no slash data.
Perfect.
Now we could do except this underscore repair slash dev CDB one.
Right.
It was, this was the one, it was mounted on data so let's run it.
And it ran so fast even though it's two gig of space if you notice right here, this one slash data
is only two gig.
And when you ran it.
You see, it's his face, one find and verify superblock using internal log, zero log scan file system
space found.
I know chunks so on, so on.
Phase three, phase four, check for duplicate blocks.
Phase five, rebuild agea headers intrinsics check Aynaw Connectivity seven.
Paraquat and link count and last as done.
So it means it ran successfully and how do you check the status you do echo?
Dollar question mark, and it came up so it means it the command that I ran preceding this command.
That command was successful and remember our exit code right here, it says zero is no error.
So our command ran perfectly.
It actually fixed any issue if there were.
So now the repair is done.
Now, we could mount the file system back on.
And I'm sure you have written then down which file system we unmounted to mount it back again.
You have to use the command mount slash dev slash SDP one.
This is the file system.
And where are you trying to mount it?
You're trying to mount it to slash data and hit enter and you get your problem back.
It means it did mount and now you do D.F. minus H hit enter and you will see the bottom one dev slash
CDB one is mounted on slash data.
So this is the lesson about these two utilities, very important.
Both of them are very important utilities and they become very handy.
When your file system is corrupted, then to fix it you would I of course, you could either open up
a case with your lender, which is RedHat, or sent to us or whoever.
But if Acento us, you're not going to get support.
And if any way, if any other Linux file system, I would say you you could be.
Your own system administrator support guy who could fix it yourself so you could run Physick or Zeppos
and a school repair and fix your file system and bring the system back online within minutes.
Try it out, just be careful, this utility is very powerful.
I don't want you to corrupt your file system.
It's better if you could actually do a snapshot of your machine.
But anyway, if you have not done it and it's too late and you following me exactly as I'm running it
and everything came out fine.
Perfect.
If not, if you are having issue, it's OK.
Feel free to send me an email and I'll try to help you out.