Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing disks

Status
Not open for further replies.

mrmac228

IS-IT--Management
May 27, 2003
255
0
0
GB

I'm relatively new to SUN H/W and I'm looking to replace the 18GB disks in an E420 with bigger 36GB ones. Disks are mirrored using disk suite. What are the steps I need to go through to install the new disks and keep/restore the existing data. This is what I think I'd need to do, but any addtions and more detail would be appreciated:

Note current disk config;
Backup current disks;
Shutdown and replace disks;
Boot and install from cd to new disk using disk layout noted;
Fully restore data;
Reboot;
mirror disks - resync.

This is just a disk upgrade and as I say any detail that can be added to this or any steps corrected would be very helpful.

t.i.a.

Ken


 
If you want to just replace the disks and keep the existing data, I'd recommend the following. You should plan for a downtime of 5 hours. This requires breaking the mirror.
I did this procedure quite a few times on Solaris 2.6 and worked fine. It should work for Solaris 8 also. Make sure you get a complete backup of the system to the tape using a script like hostdump although you will have the second disk of the mirror in hand.

1. Break the mirror.
2. Take the second disk off the slot.
3. Insert the new 36GB disk in the slot.
4. Run drvconfig and disks to identify the new disk.
5. Go through the following Sunsolve document (Infodoc 17234) and prepare a step by step procedure of your own.


You can set the new disk as your boot-device as given in the infodoc. or you can change the /etc/vfstab and move the disk to the first slot. Post any updates and questions to the thread.
All the best,

Chandu.
 
Hi Chandu,

Thanks for the post unfortunately I don't have a sunsolve account or a spectrum contract number. Could you post the contents of the link?

Ken
 
here you go.

Document ID: ID17234
Synopsis: Moving filesystems and boot devices with ufsdump and ufsrestore

--------------------------------------------------------------------------------

Document Body Top

The following is an excruciatingly detailed procedure list to migrate
filesystems (including root) from one disk drive to another and changing the
boot device.

The purpose of this exercise was to allow PSE&G to migrate off the loaner
multipacks to a RSM Tray. Disk 0 on the RSM Tray becomes the boot device.

The system used for testing was set up as follows:

c0t0d0 - Internal disk 0 (boot device/source drive)
c0t1d0 - Internal disk 1
c0t2d0 - Multipack disk 0 (target drive/new boot device)
c0t3d0 - Multipack disk 1

The filesystem configuration, on the source drive, was set up as follows:

c0t0d0s0 root
c0t0d0s1 swap
c0t0d0s2 backup
c0t0d0s3 unassigned
c0t0d0s4 unassigned
c0t0d0s5 unassigned (opt)
c0t0d0s6 usr
c0t0d0s7 var

The trick to this entire process is to be sure you have the new partitions and
filesystems sized and created properly. (i.e. make sure the customer knows what
they want and documented, before you start !!!)

Step 1: Perform a complete system backup.

Step 2: Install all new hardware and boot -r.

Step 3: Use format to create the partitions wanted on the target drive. In this
test we created root, swap, /usr, /var and /opt on the target disk.
(NOTE: /opt is not a legal tag so this partition's tag will be
unassigned.)
Here is what we wound up with:

c0t2d0s0 root
c0t2d0s1 swap
c0t2d0s2 backup
c0t2d0s3 unassigned
c0t2d0s4 unassigned
c0t2d0s5 unassigned (opt)
c0t2d0s6 usr
c0t2d0s7 var

Step 4: Label the disk when partitioning is complete. Exit format.

Step 5: newfs each of the partitions on the target drive.
# newfs /dev/rdsk/c0t2d0s0
# newfs /dev/rdsk/c0t2d0s1
# newfs /dev/rdsk/c0t2d0s5
# newfs /dev/rdsk/c0t2d0s6
# newfs /dev/rdsk/c0t2d0s7

Step 6: Make directories for the new partitions on the source drive. (not needed
for swap and backup)
# mkdir /newroot
# mkdir /newusr
# mkdir /newopt
# mkdir /newvar

Step 7: Mount each of the new filesystems from the source drive. (not needed for
swap and backup)
# mount /dev/dsk/c0t2d0s0 /newroot
# mount /dev/dsk/c0t2d0s5 /newopt
# mount /dev/dsk/c0t2d0s6 /newusr
# mount /dev/dsk/c0t2d0s7 /newvar

Step 8: Enter the following command for each of the filesystems to move:
# ufsdump 0f - /dev/rdsk/c0t0d0s0 | (cd /newroot;ufsrestore xf -)
# ufsdump 0f - /dev/rdsk/c0t0d0s5 | (cd /newopt;ufsrestore xf -)
# ufsdump 0f - /usr | (cd /newusr;ufsrestore xf -)
# ufsdump 0f - /dev/rdsk/c0t0d0s7 | (cd /newvar;ufsrestore xf -)
In the case of /usr filesystem replace c0t0d0s6 with /usr after root has
been moved.

Step 9: Update /etc/vfstab on the newroot partition.
NOTE: This is extremely important. Make sure you are on the target
drive. Leave the source /etc/vfstab as is.
This is the source /etc/vfstab.

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no
-
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s3 /opt ufs 2 yes
-
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s3 /usr ufs 2 yes
-
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /var ufs 2 yes
-
swap - /tmp tmpfs - yes -

This is the target /etc/vfstab.

#device device mount FS fsck mount mount
#to mount to fsck pointtype pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t2d0s1 - - swap - no -
/dev/dsk/c0t2d0s0 /dev/rdsk/c0t2d0s0 / ufs 1 no
-
/dev/dsk/c0t2d0s5 /dev/rdsk/c0t2d0s3 /opt ufs 2 yes
-
/dev/dsk/c0t2d0s6 /dev/rdsk/c0t2d0s3 /usr ufs 2 yes
-
/dev/dsk/c0t2d0s7 /dev/rdsk/c0t2d0s7 /var ufs 2 yes
-
swap - /tmp tmpfs - yes -

Step 10: Unmount each of the filesystems mounted in step 7.
# umount /newroot
# umount /newopt
# umount /newusr
# umount /newvar

Step 11: Run the installboot program to install the boot blocks on the target
drive.
# cd /usr/platform/`uname -i`/lib/fs/ufs
# installboot bootblk /dev/rdsk/c0t2d0s0

Step 12: Shutdown the system. /usr/sbin/shutdown -y -i0 -g0

Step 13: From the ok prompt:
ok setenv boot-device disk2
(reassign the boot device from the source to the target
ok reset
(recycle the prom monitor)
ok boot
(boot from the target drive/new boot device)

Note we used ufsdump/ufsrestore instead of dd
because it lets you make fs size changes in the upgrade if you require.

 
I am really just about to do this now, eventually.

In the above, step 5 is to create a new file system on each disk. Now, as the aim is to have the two disks mirrored again do I have to create the slices as sub mirrors BEFORE doing the copy of the data to the new disks or if the data is copied as detailed, will creating the submirror later have NO IMPACT (i.e. not delete) on the data copied.


I love deadlines. I like the whooshing sound they make as they fly by.

Douglas Adams
 
This sounds SO much more difficult than it is on AIX and looks a lot like BSD. Unfortunately, I am going to have to learn Solaris because that is what is being migrated to from AIX.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top