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.

Replacing a failed bootdisk

In the following example, the host has a failed bootdisk (c0t0d0). Fortunately, the system is using DiskSuite, with a mirror at c0t1d0. The following sequence of steps can be used to restore the system to full redundancy.


System Fails to Boot

When the system attempts to boot, it fails to find a valid device as required by the boot-device path at device alias "disk". It then attempts to boot from the network:


screen not found

Can't open input device

Keyboard not present. Using ttya for input and output.


Sun Ultra 30 UPA/PCI (UltraSPARC-II 296MHz), No Keyboard OpenBoot 3.27, 512 MB memory installed, serial #9377973,Ethernet address 8:0:20:8f:18:b5, Host ID: 808f18b5


Initializing Memory

Timeout waiting for ARP/RARP packet

Timeout waiting for ARP/RARP packet

Replace failed disk and restore redundancy

The administrator replaces the failed disk with a new disk of the same geometry. Depending on the system model, the disk replacement may require that the system be powered down. The replacement disk is then partitioned identically to the mirror, and state database replicas are copied onto the replacement disk. Finally, the metareplace command copies that data from the mirror to the replacement disk, restoring redundancy to the system.


# prtvtoc /dev/rdsk/c0t1d0s2 | fmthard -s - /dev/rdsk/c0t0d0s2

fmthard: New volume table of contents now in place

# installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0

# metadb -f -a /dev/dsk/c0t0d0s5

# metadb -f -a /dev/dsk/c0t0d0s6

# metadb -i

flags first blk block count

a u 16 1034 /dev/dsk/cotodos5

a u 16 1034 /dev/dsk/c0t0d0s6

a m p luo 16 1034 /dev/dsk/c0t1d0s5

a m p luo 16 1034 /dev/dsk/c0t1d0s6

# metareplace -e d0 c0t0d0s0

d0: device c0t0d0s0 is enabled

# metareplace -e d1 c0t0d0s1

d1: device c0t0d0s1 is enabled

# metareplace -e d4 c0t0d0s4

d4: device c0t0d0s4 is enabled

Power Failure Alarm in Bandung

If there is messages like this :

Jan 14 05:05:15 osssvr picld[241] : Device PS1 unplugged
Jan 14 05:05:16 osssvr picld[241] : Device PS1 Plugged in

Then

indicates a power supply is inserted but the AC power cord is not plugged in.

so please as soon as the AC power cord is plugged in.

note : environment monitoring of a power supply occurs only if the power cord is plugged in.

Install & Setup RSC Software at Sun Fire v890

#unzip rsc2.2.2_packages_s8.zip
#pkgadd -d
#pwd
/tmp
#pkginfo grep rsc
#cd /usr/platform/SUNW,Sun-Fire-V890/rsc
#ls -la
#./rsc-config

Continue with RSC setup (yn): y

Set RSC date/time now (yn?) [y]: y
Server Hostname[ ]:
Edit customer info field (yns?) [n]: y
customer info (<= 40 char) [] : Telkom
Enable RSC Ethernet Interface (yns?) [n]: y
RSC IP mode : config
RSC IP address : 192.168.8.147
RSC IP Netmask : 255.255.255.0
RSC IP Gateway : 192.168.8.1
Enable RSC Alerts : n
Enable RSC Serial Port Interface : n
Setup RSC User Account : y
Username : admin
User permissions :cuar



...
...
...
...
...
...

Are you sure you want to reboot RSC (y/n) ? y

DONE

#eeprom diag-out-console=true
#eeprom output-device=rsc-console
#eeprom input-device=rsc-console