Fsck -n on mounted FS - how unreliable ?


 
Thread Tools Search this Thread
Operating Systems AIX Fsck -n on mounted FS - how unreliable ?
# 8  
Old 11-18-2014
Quote:
Originally Posted by dukessd
Code:
You can't re-bore your engine while it's running.

Classic!

We should have a hall of fame for comments like that!

;0)
Well, you can try, but you'll probably have pieces-parts all over... Smilie

And it's not just the cache that's the problem with a mounted file system - it's the fact that things are changing. Every file system check I'm aware of assumes the entire file system is static. And it pretty much has to be to ensure consistency. If there's some sort of required consistency between two or more items in the file system, if things are changing there's no way to know if there's an inconsistency because it's corrupt or because it's been changed. The fsck process can't look at the entire file system at one moment in time - it can only look at all the different parts of the file system in some sequence.
# 9  
Old 11-18-2014
I get that I don't want to modify the FS live, however, a really simplistic construction is that the buffer cache contents on top of the disk contents represents the consistent (correct) state of the FS. There is a delay in that consistent state being written through to the disk, i.e. depending on when it's written through. I said "simplistic" and disclaim right away that I don't know the slightest about how that picture changes with journaling.

So again, I don't want to modify it live, but why is it improbably to -check- it live, by looking at the buffer cache, and through to the corresponding on-disk data, and noting (probably with a fair amount of complexity) what inconsistencies -might- be corruption, or which ones are unequivocal signs of it. I anticipate immediately that telling the difference between an inconsistency that's the result of write-through lag, vs. one where no matter how hard the OS tries, the on-disk data can't be made to match what's in the buffer cache because of I/O errors.

Glad to know the conclusion that it's not possible, I'm just curious of the details of why.
# 10  
Old 11-19-2014
Quote:
Originally Posted by maraixadm
So again, I don't want to modify it live
But you are modifying it live. It's like trying to read a dictionary while someone else is constantly changing the order of the words -- possibly tearing out pages while they're at it, if they're writing to a corrupt filesystem. If you at least made it read-only, stopped moving things around, it'd be possible to check it.

The kernel makes an awful lot of assumptions about the state of the filesystem. It's the job of it and the journal to keep it that way, but if something else unintentionally alters the filesystem tree -- power outage, disk failure, controller glitch, whatever -- these assumptions may be violated, and using it can cause bad things to happen. Like an index pointing to the wrong disk cluster, causing data to be overwritten or two files to unintentionally share contents, or a file just not mentioned at all anywhere and disappearing from disk, etc, etc.

fsck makes as few assumptions as possible, but does assume the filesystem isn't changing. That's the tradeoff it makes.

Last edited by Corona688; 11-19-2014 at 02:19 AM..
This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Fsck in vxvm

Hi, When we are running fsck in vxvm FS within few sec it will completed even if data is more than 500GB or in TB also. compare to UFS FS in that it will take more time compare with vxvm.UFS check FS in block level. & then vvxm on where its checking the FS. Please explain. (1 Reply)
Discussion started by: tiger09
1 Replies

2. Solaris

unable to repair the / filesystem. Run fsck manually (fsck -F ufs /dev/rdsk/c1t0d0s0)

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)
Discussion started by: getrue
4 Replies

3. Solaris

fsck issue

I am not able to boot into solaris. I am getting following message. The / file system (/dev/rdsk/c0t0d0s0) is being checked. Warning - Unable to repair the / filesystem. Run fsck manually(fsck -F ufs /dev/rdsk/c0t0d0s0). I ran fsck manually but it didn't work. Help from anyone would be... (1 Reply)
Discussion started by: likhitgatagat
1 Replies

4. UNIX for Dummies Questions & Answers

Fsck error

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)
Discussion started by: tjwops
2 Replies

5. UNIX for Dummies Questions & Answers

about fsck

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)
Discussion started by: farhan_t49
1 Replies

6. Solaris

fsck -o

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)
Discussion started by: melanie_pfefer
2 Replies

7. UNIX for Dummies Questions & Answers

fsck - what should be done?

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)
Discussion started by: duke0001
3 Replies

8. UNIX for Dummies Questions & Answers

fsck on a mounted file system?

I have a Solaris 7 box. We got a strange error in the syslog, which read as follows: Nov 15 11:50:16 server-01 unix: NOTICE: free inode /mount1/8025691 had size 0x20d I consulted with a fellow sysadmin, and he suggested running "fsck -N" on the filesystem in question without unmounting it. So I... (1 Reply)
Discussion started by: GKnight
1 Replies

9. Solaris

fsck

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)
Discussion started by: run_time_error
5 Replies

10. Filesystems, Disks and Memory

fsck -y

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)
Discussion started by: rpatrick
4 Replies
Login or Register to Ask a Question