I'm really confused with the behaviour of fsck. I'm scripting a fsck process to check and mount some FS, yes without rebooting and getting initiated through vfstab. As a condition to initiate a fsck i check the status of the devices using fsck -m. If the check ( fsck -m) returns 0. I consider that a mountable device and i mount it. No issues. Stuff gets mounted and i manged to write to it as well.
To really check the integrity of my script, i unmounted one of the FSs and ran a fsck -Y against the device. Now is the part i cannot comprehend. It says :
How can this happen ? if the device is mountable how can it have a wrong state in the superblock ?
This is when things get really interesting.
Following is another device. Check this out.
It wants me to rerun fsck and at the sametime fsck -m tells me that the device is ready to be mounted.
Now, which one should i believe. I have scripted the process to reduce time of manual intervention. If i can use the -m option and check the devices are actually candidates for fsck i don't mind running it. But, i'm at a juncture of not being able to understand and decide what to believe. Gurus, a way forward please.
cheers
JJ
Last edited by Scott; 03-21-2014 at 05:27 AM..
Reason: Use CODE tags, please...
One thing that comes to my mind is: Did you use sync before umounting or before using fsck ( and after...)? If not, how can you be sure you are not seeing side effects of some cache somewhere?
Then you must remember that systems have evolved and fsck isnt suitable for all cases...
One thing that comes to my mind is: Did you use sync before umounting or before using fsck ( and after...)? If not, how can you be sure you are not seeing side effects of some cache somewhere?
Then you must remember that systems have evolved and fsck isnt suitable for all cases...
Thanks again for the reply Vbe, There are FC luns broken away from the consistent relationship.
What i hard to understand is how would fsck -m mark a device as clear and say it needs checking when you are running the fsck -Y.
What would be the best way to script this ?
What you describe is not unusual. Over long periods of time a filesystem may well develop inconsistencies that fsck will pick up and correct. However, even if these inconsistencies are not corrected but the filesystem is mounted and dismounted in an orderly manner, the filesystem remains usable. The 'flags' that fsck -m looks at are indicating that the filesystem was dismounted properly and so could be remounted okay.
However, a fsck check still finds the filesystem needs fixing.
Unreliable FC connections can be a nightmare and give rise to filesystem corruption.
Many fsck implementations support a '-o full' option which will check every last thing on a filesystem although it takes a very long time to run (depending on the filesystem size, of course). I think the Solaris fsck supports this too (but it is often undocumented).
Hope that helps in some way.
These 2 Users Gave Thanks to hicksd8 For This Post:
What can I fix this issue? I have ran below commands but everything is same.:confused:
WARNING: Last shutdown is later than time on time-of-day chip: check date.
The / file system (/dev/rdsk/c1t0d0s0) is being checked
WARNING - unable to repair the / filesystem. Run fsck manually (fsck -F... (4 Replies)
Hello
I own a SPARC Ultra 10 workstation (standalone) and when issuing the fsck command I get the following output on fs C0t0d0s7:
Phase 1 (checks blocks and sizes):
dada warning: /pci@lf;0/pci@1, 1/ide@3/dad@0,0(dad1): ATA Transport failed:reason, `incomplete'>
Uncorrectable data... (2 Replies)
i want to know what does it mean by doing a consistentcy check fsck on a disk and why journaling filesystems dont need to do it
and what is meant by disk is in a consistent state when writing because entries are recorded in a journal and then to the metadata and then removed from journal (1 Reply)
Hello
I am getting this in dmesg:
/mount1: unexpected free inode 1262865, run fsck(1M) -o f
What are the options I should use with fsck?
thanks (2 Replies)
hy guys
I got a ques
I cant acess root, i tried to fsck it, but gets errors to read file systems. What steps do you take to recover the host before you see if there is any data corruption on the root drive?
Regards
Charneet (1 Reply)
I want to use fsck to check and repair my linux system. When I use this command, what do I need to pay attention to or what should I do to make job running successfully. Thanks for your inputs for a newbie. (3 Replies)
OS: Solaris 5.8
Everytime I run fsck -y I get: FILE SYSTEM STATE IN SUPERBLOCK IS WRONG; FIX? yes
Do I need to run fsck with the backup superblock option or is there
some other option I should use. I have tried the format->analyze->read
option but that does not report any corrupt blocks.... (5 Replies)
Hi,
I'm running Red Hat 7.1 on an intel. After re-booting from a system crash, I am probpted to run fsck to repair filesystems manually with no options. For example,
/: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(ie without -a or -p options)
**Dropping you into a shell.
... (2 Replies)
Once in a while, I would think it advisable to run fsck -y to check the disk.
Should I sign in as su or sudo?
What is the difference and which is preferred?
Thank you in Advance! (4 Replies)