One more minor tweak to general FAQ.
[openafs-wiki.git] / ConfiguringtheAFS-modifiedfsckProgramonSolarisSystems.mdwn
1 In this section, you make modifications to guarantee that the appropriate fsck program runs on AFS server partitions. The fsck program provided with the operating system must never run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data, it removes all of the data. To repeat:
2
3 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
4
5 1. Create the /usr/lib/fs/afs directory to house the AFS-modified fsck program and related files.
6
7        # mkdir /usr/lib/fs/afs
8
9        # cd /usr/lib/fs/afs
10
11        2. Copy the vfsck binary to the newly created directory, changing the name as you do so.
12
13        # cp  /cdrom/sysname/dest/root.server/etc/vfsck  fsck
14
15 1. Working in the /usr/lib/fs/afs directory, create the following links to Solaris libraries:
16
17        # ln -s /usr/lib/fs/ufs/clri
18        # ln -s /usr/lib/fs/ufs/df
19        # ln -s /usr/lib/fs/ufs/edquota
20        # ln -s /usr/lib/fs/ufs/ff
21        # ln -s /usr/lib/fs/ufs/fsdb
22        # ln -s /usr/lib/fs/ufs/fsirand
23        # ln -s /usr/lib/fs/ufs/fstyp
24        # ln -s /usr/lib/fs/ufs/labelit
25        # ln -s /usr/lib/fs/ufs/lockfs
26        # ln -s /usr/lib/fs/ufs/mkfs
27        # ln -s /usr/lib/fs/ufs/mount
28        # ln -s /usr/lib/fs/ufs/ncheck
29        # ln -s /usr/lib/fs/ufs/newfs
30        # ln -s /usr/lib/fs/ufs/quot
31        # ln -s /usr/lib/fs/ufs/quota
32        # ln -s /usr/lib/fs/ufs/quotaoff
33        # ln -s /usr/lib/fs/ufs/quotaon
34        # ln -s /usr/lib/fs/ufs/repquota
35        # ln -s /usr/lib/fs/ufs/tunefs
36        # ln -s /usr/lib/fs/ufs/ufsdump
37        # ln -s /usr/lib/fs/ufs/ufsrestore
38        # ln -s /usr/lib/fs/ufs/volcopy
39
40 1. Append the following line to the end of the file /etc/dfs/fstypes.
41
42        afs AFS Utilities
43
44 1. Edit the /sbin/mountall file, making two changes.
45
46 \* Add an entry for AFS to the case statement for option 2, so that it reads as follows:
47
48        case "$2" in
49        ufs)    foptions="-o p"
50                ;;
51        afs)    foptions="-o p"
52                ;;
53        s5)     foptions="-y -t /var/tmp/tmp$$ -D"
54                ;;
55        *)      foptions="-y"
56                ;;
57
58 ### <a name="Solaris 6"></a> Solaris 6
59
60 \* Edit the file so that all AFS and UFS partitions are checked in parallel. Replace the following section of code:
61
62        # For  fsck purposes, we make a distinction between ufs and
63        # other file systems
64        #
65        if [ "$fstype" = "ufs" ]; then
66             ufs_fscklist="$ufs_fscklist $fsckdev"
67             saveentry $fstype "$OPTIONS" $special $mountp
68             continue
69        fi
70
71 with the following section of code:
72
73        # For fsck purposes, we make a distinction between ufs/afs
74        # and other file systems.
75        #
76        if [ "$fstype" = "ufs" -o "$fstype" = "afs" ]; then
77             ufs_fscklist="$ufs_fscklist $fsckdev"
78             saveentry $fstype "$OPTIONS" $special $mountp
79             continue
80        fi
81
82 ### <a name="Solaris 9"></a> Solaris 9
83
84 \* Edit the file so that all AFS and UFS partitions are checked in parallel.
85
86 You must copy /usr/lib/fs/ufs/fsckall to /usr/lib/fs/afs/fsckall and change the word ufs to afs in file /usr/lib/fs/afs/fsckall as indicated below. This ensures that AFS fsck is called on vice partitions.
87
88 1. 1. 1. Copy /usr/lib/fs/ufs/fsckall to /usr/lib/fs/afs/fsckall.
89
90     cp /usr/lib/fs/ufs/fsckall /usr/lib/fs/afs/fsckall
91
92 1. 1. 1. Edit /usr/lib/fs/afs/fsckall and replace ufs with afs as indicated below.
93
94 Original:
95
96     for fsckdev in $*; do
97     /usr/sbin/fsck -m -F ufs $fsckdev >/dev/null 2>&1
98
99 Modified:
100
101     for fsckdev in $*; do
102     /usr/lib/fs/afs/fsck -m -F afs $fsckdev >/dev/null 2>&1
103
104 Also, this section of the same file:
105
106 Original:
107
108             echo "checking ufs filesystems"
109             /usr/sbin/fsck -o p $ufs_fscklist
110
111 Modified:
112
113             echo "checking afs filesystems"
114             /usr/lib/fs/afs/fsck -o p $ufs_fscklist