Disk Mirror with SDS in solaris 8 on netra240 at ntsdns1 node

1. Copy the volume table from the root disk to the mirror

  • #dd if=/dev/rdsk/c1t0d0s2 of=/dev/rdsk/c1t1d0s2 count=16
  • #prtvtoc /dev/rdsk/c1t0d0s2 fmthard -s - /dev/rdsk/c1t1d0s2

2. Install the boot block code on the alternate boot disk

  • #uname -i
  • #installboot /usr/platform/'uname -i'/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0

3. Create the meta databases on both of disk

  • #metadb -a -f -c 3 c1t0d0s7 c1t1d0s7
  • #metadb -i
  • #echo set md:mirrored_root_flag=1 >> /etc/system

4. Create mirror at each slice and attach one submirror

  • #metainit -f d10 1 1 c1t0d0s0
  • #metainit d20 1 1 c1t1d0s0
  • #metainit d0 -m d10
  • #metainit -f d11 1 1 c1t0d0s1
  • #metainit d21 1 1 c1t1d0s1
  • #metainit d1 -m d11
  • #metainit -f d12 1 1 c1t0d0s3
  • #metainit d22 1 1 c1t1d0s3
  • #metainit d2 -m d12
  • #metainit -f d13 1 1 c1t0d0s4
  • #metainit d23 1 1 c1t1d0s4
  • #metainit d3 -m d13

5. Setup the system files for root metadevices

  • #metaroot d0

6. Clear improper file locks

  • #lockfs -fa

7. Configure dumpadm and swap

8. Replace the remaining partition with metadevices in /etc/vfstab

  • #cp /etc/vfstab /etc/vfstab.tmp

9. Syncronize and reboot the system

  • #sync;sync;sync;init 6

10. Attach the mirrors

  • #metattach d0 d20
  • #metattach d1 d21
  • #metattach d2 d22
  • #metattach d3 d23

11. Check the progress

  • #metastat grep -i progress
  • #metastat

12. Halt the system and create an OBP alias for the bootable disks.

Invalid user shell, login rejected

Initial Customer Description
The system administrator created an account for a new user. However, during login, the system displays an error message and immediately logs out the user.

Probable Causes

  • corrupt password,shadow,or shell-starup files
  • modification of the /etc/passwd file, resulting in an invalid shell entry
  • system overload

Fault Insertion

Modify the /etc/passwd file to reflect either an improper shell or no shell for the new user, and then reboot the system.

Complete the following steps to edit the /etc/passwd file :

  1. Set the TERM parameter:
  2. Use the vi editor to open the /etc/passwd file.
  3. Edit the /etc/passwd file

Before edit: user1;x:100:1::/home/user1:/bin/sh

After edit:user1:x:100:1::/home/user1:/sbin/csh

Possible Fixes

Log in as the root user, and correct the invalid shell entry in the /etc/passwd file.

Learning

Learn about the /etc/passwd file and the significance of the parameters specified in the file.

System cannot boot in multiuser mode

Error Messages or Symptoms : Read-Only file system. No utmpx.

Probable Cause : A corrupt vfstab entry or corrupt rc scripts

Fault Insertion
Change the rcS script to point to the /fstab directory instead of the /vfstab directory. The vfstab directory mounts the root account in read-only mode.

Note - Set the TERM parameter. The TERM parameter enables you to edit files by using the vi editor.

To corrupt the rcS script, complete the following steps :
1.Edit the /etc/rcS script:
#vi /etc/rcS
Before Edit :
vfstab=/etc/vfstab
After edit:
vfstab=/etc/fstab
2.Make a copy of the /etc/vfstab file :
#cp /etc/vfstab /etc/fstab
3.Edit the /etc/fstab file to make the root file system read-only:
#vi /etc/fstab
Before edit:
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
After edit:
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no ro


Posibble Fixes
1.To repair the preceding fault, you first boot the system in single-user mode from the CD-ROM, and then repair the rc scripts by using the following commands :
ok boot cdrom -s
ok fsck /dev/dsk/c0t0d0s0
ok mount /dev/dsk/c0t0d0s0 /a

2.restore the /etc/vfstab file in the vi editor.

Learning
Insert echoes in the rc scripts to determine the source of the problem. This is similar to the concept of single-stepping through the rc script execution.