| « Squid log rotation with timestamp | Change failed hdd in submirror in Solaris Volume Manager (SVM) » |
How to migrate from dying system disk to new one in Solaris
If your HDD with system is dying, you have the same HDD (in matter of size), and you`re using UFS - you could do the next steps to completly recreate this disk to a new one:
1. Check the disks (with attached new one):
# format
2. Copy the VTOC from old one to a new one:
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c1t0d0s2
3. Create new filesystem:
# newfs /dev/rdsk/c1t0d0s0
4. Mount slice to copy to:
#mount /dev/rdsk/c1t0d0s0 /mnt
5. UFSdump from old slice to a new mounted one:
# ufsdump 0f - /dev/rdsk/c0t0d0s0 | (cd /mnt && ufsrestore rf - )
6. Umount the new slice, with dumped information from from old one:
# umount /mnt
Steps 3 - 6 should be repeated for each slice to migrate.
7. Install bootblocks into a new disk partition:
# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t0d0s0
That`s it, grab a beer 
1 comment
just in case drive dies, but server will try to boot from it