Short instruction to replace a failed bootable disk in a LVM mirror
0.
Indication of a failed disk.
metastat
(Some mirrors are not okay.)
Avoid a system reboot until all mirrors are okay!
1.
Physically identify the failed disk.
Tip: if the disk has a LED, make some activity with
find / -xdev
The working disk has a flickering LED.
2.
Physically replace the failed disk.
Wait a minute, the system might auto-detect it.
Then run
format
If the disk is not shown, run devfsadm, re-run format
3.
Assuming the failed disk is c1t1d0 and shows up as disk 1 in
format
Transfer the disk layout with format, disk -> 0 (the working disk),
partition, print
Note the layout.
Then quit, disk -> 1 (the new disk), partition, select -> original[0]
Check with print that it is identical, then label -> yes.
4.
See failed meta-DBs
metadb
For each failed metadb
do
(example with failed c1t1d0):
delete and recreate
metadb -d c1t1d0s7
metadb -c 2 -a c1t1d0s7
5.
See failed sub-devices
metastat
For each failed mirror
do
(example with d60 and failed c1t1d0):
metareplace -e d60 c1t1d0s6
metastat d60
(Resync is in progress...)
Wait until resync is ready.
And another article:
Quote:
Solaris Volume Management (LVM), the earlier name was DiskSuite (SDS).
Basically it is an inflexible implementation, but works okay with UFS (which is also inflexible).
The Solaris roadmap sees ZFS replacing UFS. ZFS is flexible, faster than UFS, and has integrated volume management.
Short instruction to get a mirror on two bootable disks.
1.
Install the OS on one disk, 2nd identical disk is unused.
Ensure there is no cold mirror in the crontab.
crontab -l | grep mirror
Ensure there is no swap on the 2nd disk.
swap -l
grep '^/dev.*swap' /etc/vfstab
2.
Meta-DBs hold all configuration info (/etc/lvm.cf is a text file copy)
Have a partition (s7, smallest size, 13MB is enough) on the boot disk
If necessary, create one in format -> disk 0, partition
3.
Identify the boot disk with
df -k /
It should show up as disk 0 in
format
Transfer the disk layout with format, disk -> 0 (with the OS),
partition, print
Note the layout.
Then quit, disk -> 1, partition, select -> original[0]
Check with print that it is identical, then label -> yes.
4.
We have two redundant s7 partitions for the meta-DBs.
Assuming the two disks are c1t0d0 and c1t1d0,
install with
metadb -c 3 -a -f c1t0d0s7 c1t1d0s7
metadb
(Three replicas per partition.)
5.
Create a sub-device d1 (concat/stripe) with the disk with the OS
metainit -f d1 1 1 c1t0d0s0
metastat
Create a one-way(yet degraded) mirror d0 on the sub-device
metainit d0 -m d1
metastat
Special treatment for bootable disk
metaroot d0
cat /etc/vfstab
tail /etc/system
reboot
6.
Create a sub-device d2 (concat/stripe) on the 2nd disk
metainit d2 1 1 c1t1d0s0
metastat
Add the sub-device to the mirror d0
metattach d0 d2
metastat
(Resync is in progress...)
Wait until resync is ready.
7.
For each additional OS partition s1,s3,...,s6 in /etc/vfstab
do
(example with s6):
Create a sub-device (concat/stripe) on the OS disk
metainit -f d61 1 1 c1t0d0s6
metastat d61
Create a one-way mirror
metainit d60 -m d61
metastat d60
Rename the corresponding entry in /etc/vfstab:
/dev/dsk/c1t0d0s6
to
/dev/md/dsk/d60
and
/dev/rdsk/c1t0d0s6
to
/dev/md/rdsk/d60
Verify /etc/vfstab contains no /c1t0d0 entry
reboot
8.
For each d*0 device in /etc/vfstab
do
(example with d60)
Create a sub-device on the 2nd disk
metainit d62 1 1 c1t1d0s6
metastat d62
Attach it to the mirror
metattach d60 d62
metastat d60
Do not more than two resyncs in parallel.
9.
Add "disk1" as an optional automatic boot device
eeprom boot-device
Example:
boot-device=disk net
Add disk1 after disk (and hope this alias works).
eeprom "boot-device=disk disk1 net"
eeprom boot-device
#to be sure prepare for recovery
ls -l /dev/dsk/c1t1d0s0 (get path for second path) such as
/sbus@3,0/SUNW,fas@3,8800000/sd@1,0:a
and create an alias at OpenBootPrompt if it doesnt exist
ok nvalias disk1 /sbus@3,0/SUNW,fas@3,8800000/sd@1,0:a
(or devalias disk1 /sbus@3,0/SUNW,fas@3,8800000/sd@1,0:a - depending on system)
I plugged both power cables in both power supply. When I unplugged each power cable one by one, the SPARC T4-1 machine keep running. However, show faulty command shows below message. (I have also attached the picture of both power supply)
-> show faulty
Target ... (1 Reply)
Hi,
Again a question about virt-install.
Someone knows how to add hardware in the virt-install command?
I put the first disk with --disks path=/.... but I need a second disk and I don't know how to include it?
Thanks (2 Replies)
Hi,
I'm trying to generate an alert related to Power Supply Failure.
As its difficult to generate such an event, Is it possible to set the status of a Power Supply Unit as "Faulty"
Any ideas are welcome and highly appreciated
-Thanks (3 Replies)
Hello,
I'm new to this forum and as you will see from my question I'm new to UNIX as well.
One of our costumers has HP rx4640 running on UNIX with two 300GB hot-swappable disks that are mirrored. They reported to us that one of the disks is faulty and they want us to take care of it. Below is... (16 Replies)
Hi,
Have mirrored the primary disk to 3 .
Server and OS:
# uname -a
HP-UX pdwp1s B.11.11 U 9000/800 118434630 unlimited-user license
# model
9000/800/L3000-7x
# strings /etc/lvmtab
/dev/vg00
+F@<
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/dsk/c2t0d0
But now I have only 1 disk... (5 Replies)
Requirement to remove a faulty mirrored disk from hp-ux LVM
<root@pdwp1s>/etc # vgdisplay -v /dev/vg00
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't... (9 Replies)
Hi,
Recently i came across a disk that seems to be faulty and need help. I have gathered some information by running below commands and any help on how to solve this will be great.
# uname –a
SunOS XYZ 5.7 Generic_106541-16 sun4u sparc SUNW,Ultra-4
#df -k
Filesystem kbytes used... (3 Replies)
Hi folk,
I have this hardware faunty message, but dont know which hardware is this ? can you guide me ?
--------------- ------------------------------------ -------------- ---------
TIME EVENT-ID MSG-ID SEVERITY
---------------... (9 Replies)
Hi all,
I guess most of you have seen this error message while installing Solaris 10 on an x86 platform. I got the error message while installing from DVD ISO on my home VMWare ESXi server.
It took me a long time to figure the exact issue and a subsequent solution. the solution is very... (1 Reply)
Hi Experts,
I have configured A D40 Array. There is an faulty disk which is not part of an raid volume but shows fault in the diagnostics.
pdisk15 U0.1-P1-I1/Q1-W40AA83CC2400D
SSA160 Physical Disk Drive ( MB)
Is there a way to stop this... (2 Replies)