Understanding fsck pass in /etc/vfstab


 
Thread Tools Search this Thread
Operating Systems Solaris Understanding fsck pass in /etc/vfstab
# 1  
Old 03-09-2016
Understanding fsck pass in /etc/vfstab

hi all,

On reading the docs, on fsck pass in /etc/vfstab ->

q1) how do we specify the to run the fsck in preen mode ( -o p ) inside /etc/vfstab ?

q2) if this parameter is use to determine whether fsck on the mount point / raw device is needed during boot time, how does the system bootup so fast ? i remember running fsck as a long process, but i didn't see any fsck at all when i rebooted my system .. ( i have a few mountpoint with fsck pass = 1)
(is the fsck running in background ?)

q3) lastly, if i set 1 ,2 ,3 ,4 individually for my different mountpoints in "fsck pass" in /etc/vfstab, they still get check sequentially right ? (the number does not implies the sequence of the check)

Hope to hear from you gurus..SmilieSmilieSmilie

Regards,
Noob
# 2  
Old 03-09-2016
I think the fsck_pass field is historical.
Solaris 9 and later do not use it, instead check all ufs file systems with "-o p".
The / /usr /usr/platform /var /var/adm are checked in sequence (in run level S, and of course only if present in vfstab), the other local filesystems are checked in parallel (in run level 2).
(Solaris processes run level S and 2 before it goes to 3.)
--
On journaled ("logging") ufs file systems, fsck checks the integrity of the intent log; if okay it skips a full check.
Since Solaris 9 "logging" is default, i.e. does not need to be in vfstab field 7; check with
Code:
mount -v | grep -w ufs


Last edited by MadeInGermany; 03-09-2016 at 05:44 PM..
This User Gave Thanks to MadeInGermany For This Post:
# 3  
Old 03-10-2016
Quote:
Originally Posted by MadeInGermany
I think the fsck_pass field is historical.
Solaris 9 and later do not use it, instead check all ufs file systems with "-o p".
The / /usr /usr/platform /var /var/adm are checked in sequence (in run level S, and of course only if present in vfstab), the other local filesystems are checked in parallel (in run level 2).
(Solaris processes run level S and 2 before it goes to 3.)
--
On journaled ("logging") ufs file systems, fsck checks the integrity of the intent log; if okay it skips a full check.
Since Solaris 9 "logging" is default, i.e. does not need to be in vfstab field 7; check with
Code:
mount -v | grep -w ufs

Hi MadeInGermany,

Thanks for your reply.

Q1) Does it mean that it is due to logging which is the reason why fsck can be completed in short time ?

Q2) If I have a filesystem/device with nologging, does that means fsck will take a longer time to complete and the system can only go to runlevel3 when the fsck is completed ?

Q3) when fsck is running on a filesystem/device, are we still able to access the filesystem ?

if the answer is no -> it means that fsck on / have to be completed before the system can boot into S user mode ?

Regards,
Noob
# 4  
Old 03-10-2016
Q1) Yes, the main purpose of "logging" is a fast fsck.
Q2) Yes, much longer. The more files are on the file system, the longer it takes. Yes, run level 3 is reached when all fsck are done.
Q3) No, not accessable. fsck is to be run before the file system is mounted.
When the system is booted, / is mounted read-only, then fsck is run on it, then it is remounted read-write. (When fsck fails it goes to an emergency maintenance shell; / is still read-only then.)

If your goal is a faster system boot, simply remove the nologging option (field 7) in /etc/vfstab for the respective ufs file system (field 4)
If you have Solaris 8 you must put logging option (i.e. replace the - placeholder with logging).
Next boot (or next mount) will automatically convert the filesystem to logging (that can a few seconds, and it will reduce the free space by a few percent).
# 5  
Old 03-10-2016
Quote:
Q3) No, not accessable. fsck is to be run before the file system is mounted.
When the system is booted, / is mounted read-only, then fsck is run on it, then it is remounted read-write. (When fsck fails it goes to an emergency maintenance shell; / is still read-only then.)
Hi MadeInGermany,

Thanks for your reply.
In the above, you mentioned that the filesystem is not accessible/mounted until fsck is completed.
But following you mentioned that / is mounted as read-only and fsck is being run on it.

So if a filesystem is mounted as read only, we can access the filesystem while fsck is running on it ?

What will actually happen if userA run a fsck on a mountpoint (e.g /mnt), and userB try to access the mountpoint (cd /mnt; ls /mnt ) ?

Regards,
Noob
# 6  
Old 03-10-2016
Yes / is an exception, it needs to be there in order to have any files.
If a file system is read-only, you can run fsck on it. But as soon fsck modifies something, the system is likely to crash (because cashed things do not match real things), so it should be umounted/remounted ASAP.
If a file system is read-write, you can technically run fsck on it. But if either a user or fsck does modifications during the fsck run, the whole stuff goes out of sync, and the system is likely to crash with a permanently inconsistent file system. Once inconsistent, any further write will grow the inconsistencies. A long grown inconsistency can lead to a point that finally an fsck during a system boot will move a major part of the files to lost+found, with lost attributes, file names, directory names, directory hierarchy.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Dummies Questions & Answers

Setting up a vfstab

Hi Guys i need your help quite urgently I am setting up a vfstab but need some help, here is the file systems 0. c0t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> drmlc-00 Part Tag Flag Cylinders Size Blocks Mounted/used by 0 root wm 0 - ... (1 Reply)
Discussion started by: brian112
1 Replies

3. UNIX for Dummies Questions & Answers

/etc/vfstab vs /etc/mnttab

what is the difference between the /etc/vfstab and /etc/mnttab? when i check both files, the content is almost the same. can you enlighten me? what i know is /etc/vfstab is used for hard mounts. (4 Replies)
Discussion started by: hrist
4 Replies

4. Solaris

etc/vfstab

Hi Everyone, How to find the wrong entry in etc/vfstab or wrong mount point in etc/vfstab ? Thanks & Regards Padmaja. (4 Replies)
Discussion started by: padmaja
4 Replies

5. Solaris

how to edit /etc/vfstab

I created a file system earth in /earthpool (zpool). I mounted the file system on a directory /earth. But, when I reboot my machine it doesn't load the file systems and the zpool and zfs shows no pools available and no datasets respectively. I am using Solaris 10 running on X4500. Could you... (5 Replies)
Discussion started by: bharu_sri
5 Replies

6. UNIX for Advanced & Expert Users

vfstab overlay mount

How can I specify and the -O (overlay option) in the vfstab ? Also can you specify the overlay option to the mount options for a Vertias cluster NFS service group ? (0 Replies)
Discussion started by: wjones
0 Replies

7. Shell Programming and Scripting

question about vfstab

Hi all, I have been trying to figure out a way to mount swap on /tmp at a stage early than the default script that does it... If anyone knows how it can be done pls pls help me!!!!! I have been struggling a lot for it Secondly, continuing with the same issue... I wanted to know if the... (4 Replies)
Discussion started by: wrapster
4 Replies

8. Solaris

mount in vfstab

In the end of /etc/vfstab file : /dev/md/dsk/d30 /dev/md/dsk/d30 /odb0 ufs no no - /dev/md/dsk/d40 /dev/md/dsk/d40 /odb1 ufs no no - After boot filesystems /odb0 and /odb1 don't mount. Also they don't mount after comand mount -a But if i'm enter... (1 Reply)
Discussion started by: jess_t03
1 Replies

9. UNIX for Dummies Questions & Answers

VFSTAB edit

Hello all... I have a Ultra 60 that that is used for connecting a large Xerox printer to the network. This computer takes PDF's and converts them to tiffs and sends them back to a pc :p . In order to transfer data back and forth a mount is manually performed on the UNIX box. The mount of course is... (1 Reply)
Discussion started by: xeroxguy
1 Replies

10. UNIX for Dummies Questions & Answers

/etc/vfstab

If i wish to make a mount permanent, is it /etc/vfstab that i have to the entry add to? If so does anybody know the syntax, ie. is it tab or space delimited ? etc etc any help would be greatly appreciated (3 Replies)
Discussion started by: hcclnoodles
3 Replies
Login or Register to Ask a Question