Here is a quick solution to migrate a filesystem from one disk to another with only little downtime (= time when the data are unavailable).
It is using the incremental function of ufsdump commands.
What could be done during working hours without impact on the mounted filesystem:
# fs=/opt/apps # mkdir -p /a/$fs # mount /dev/dsk/newdevice /a/$fs # ufsdump 0uf - $fs | (cd /a/$fs ; ufsrestore rf -) # updating /etc/vfstab
You should then see entries in the /etc/dumpdates file for each filesystem you have issued ufsdump. When the outage time has come, just issue following commands:
# ufsdump 01f - $fs | cd (/a/$fs ; ufsrestore rf -) # umount /a/$fs ; umount $fs ; mount $fs
The last ufsdump should not last more than few seconds if the previous one has been executed just before.. Total downtime: about 15 seconds 🙂