Quote:
Originally Posted by
wolfgang
Also, why one machine does logging of slice1 only, and another one does logging of slice 1 and slice 5? Is there any reasons for that?
Sure, on the first disk, there are two ufs file system with logging enabled, s1 and s5 while on the second disk, only slice 1 is containing an ufs file system.
There is no use for logging with the swap slice, because there is no file system on it in the first place. Slice 2 being the wole disk must not have loggin enabled, that wouldn't make sense. Either the other partitions are raw devices for some application needing them, or are using ZFS, are spare partitions, or are just empty.
Quote:
- When system skipes the fsck checkup of certain slice, that means that there's no problem with this slice and system just does logging of that slice.
When the OS boots and try to mount the file systems that need to, it first check if each file system has been properly unmounted, which should be the general case. The file system is then in a clean state and no fsck is performed.
If the file system state in not "clean", that means it wasn't unmounted properly or at all, for example because there was a power failure, a system panic, the disk was unplugged and similar situations. In such case, if the file system has logging enabled, instead of launching fsck, the OS only has to verify the last write/delete transactions were already performed, and replay the ones that weren't, if any. If the file system hasn't logging enabled, fsck is used and can take a long period of time because the OS need to explore the whole directory tree to see if everything is fine, fix inconsistencies and salvage files that would have been lost otherwise by copying them to the lost+found directory.
So logging speeds up mount after crash operations.
Note that you might ask fsck to check an ufs file system anyway because a corruption can be due to other causes, like bad blocks, faulty controllers or cables.
The only file system that fully removes fsck requirement is ZFS. With it, all operations are transaction so are either committed or not recorded and all blocks are checksummed so the OS knows if their content is reliable or not. The file system cannot be corrupted by a brutal shutdown.
Quote:
So, I'm interested in the word logging what does it really means in this case? I would like to hear understable answer on that. What happens literally with the certain slice while logging.
Logging means all operations that change the contents of a file system are written in a "journal", a log, which is in a different location than the data. This journal contains all metadata operations (not the data ones) and is being written synchronously (writes are immediately flushed) so is consistent, unlike the regular data and metadata writes which might be reordered to speed up the process, and which are not immediately performed (buffering).
Quote:
Also hicksd8 wrote,
Could you explain understandable what does it mean and provide an example? If it's possible of course.
P.S. As far as I remember there were six slices configured during installation and we had nothing noticed in the settings about "whether configure certain slice as tranactional or not".
That's expected, logging is enabled by default because the is no reason not to do it.