Solaris Troubleshooting SDS/SVM: How to Replace a Disk which contained Soft Partitions with

When trying to access a soft partition after a disk replacement, the metareplace command or any direct I/O to a soft partition will fail with the following types of errors:

In an instance where d68 is the mirror device, and d28 is a soft partition inside one of the sub-mirrors of d68

# metareplace -e d68 d28
metareplace: hostname: /dev/md/rdsk/d28: No such device or address

Or just when standard i/o is attempted directly to the soft partition:

# newfs /dev/md/rdsk/d87
/dev/md/rdsk/d87: I/O error


In DiskSuite (or Solaris Volume Manager), an extra step must be taken when physically replacing a disk that contained soft partitions.

Remember that soft partitions are logical divisions of a physical slice (partition) on the disk. Each soft partition is preceeded by an extent header, a 1-block marker to signal the beginning of a soft partiton or soft partition extent on the slice.

When a physical disk is replaced, the system administrator typically runs the format or fmthard utilities to put the slices on the new disk as they appeared on the old disk. If no soft partitions were present on the disk, the system administrator simply has to run the metareplace command(s) necessary to reconstruct the data onto these new slices, or, if the slice was not part of a mirror or RAID5 device, restore his data to the metadevice.

However, if the disk being replaced did contain soft partitions, after creating the slice(s) on the disk, the system administrator must also lay down new extent headers for the soft partitions.

Because the soft partition(s) that were on the replaced disk are still referenced in the local replicas (as evidenced by the fact that the metastat command still reports the soft partitions still exist), all the system administrator has to do to lay down the extent headers is to run the command

# metarecover c#t#d#s# -p -m

for each slice on the replaced disk that contains soft partitions.This metarecover command reads the information from the replica regarding each soft partition on that slice, and lays down an extent header for each soft partition at the correct location in that slice.

After this command is run, I/O can once again take place to the soft partition, whether it be direct I/O or I/O initiated by a metareplace command



I have started ( aka in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' You can connect me at -

1 Response

  1. September 16, 2015

    […] Read – How to Replace a Disk which contained Soft Partitions […]

What is in your mind, about this post ? Leave a Reply

  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us