Step 1 Modify the system startup script. Change the vi /etc/init.d/rc parameter in the SUSE 9 SP3 OS.
Step 2 Add /bin/mount -a at end of the line to remount file systems after the system is started.
Step 1 The mount.sh script file contains the following content (only five LUNs are listed as an example):
mount /dev/sdb /recordfile01
mount /dev/sdc /recordfile02
mount /dev/sdd /recordfile03
mount /dev/sde /recordfile04
mount /dev/sdf /recordfile05
Step 2 Suppose that the directory of the mount.sh script is /mnt/. Change the right of the mount.sh script to enable all users to execute the script after the system is restarted.
chomd 777 /mnt/mount.sh
Step 3 Enable the system to automatically execute the mount.sh script in the /mnt/ directory after system startup.
Change the parameter in the SUSE 9 SP3 OS.
Add /bin/sh /mnt/mount.sh at the end of the line.
Step 4 Test whether the system automatically mounts file systems after restart.
After the Linux OS is restarted, run the mount command to check that all file systems have been automatically mounted. The following messages are displayed:
/dev/sdb on /recordfile01 type xfs (rw)
/dev/sdc on /recordfile02 type xfs (rw)
/dev/sdd on /recordfile03 type xfs (rw)
/dev/sde on /recordfile04 type xfs (rw)
/dev/sde on /recordfile05 type xfs (rw)
Disks are automatically mounted.
Currently, file systems may not be automatically mounted even if the /etc/fstab parameter is changed in actual applications. However, executing the mount.sh script can solve the problem.