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!

Solaris 10 svm - add slice to existing configuration question 1

Status
Not open for further replies.

csgonan

MIS
May 2, 2007
118
0
0
US
I have my the root drive of my sparc solaris 10 server mirrored with SVM. In the same machine I have another single partition disk that was mounted /dev/dsk/s6 to /home1, and I wanted to mirror it to another disk. This happened without problem.

While the resync was happening I realized that I did not do a newfs on the target mirror disk with the s6 partition before doing the metattach. I did not have a problem with reboots or anything. Will the mirror create a UFS partition on the target disk? If the source /home1 disk failed, would I be able to mount the target disk as a regular /dev/dsk partition? Or if I wanted to metaoffline the target half of the /home1 mirror to do a backup, would it recognize it as be a UFS partition?

I'm thinking I should metadetach the mirror, do a newfs on the target S6 partition and then metattach again.

Any ideas would be appreciated.
 
THis was one answer to the question that I got from Sun.

1) When mirroring, it isn't necessary to do a newfs because when you run the metattach to sync the drives, it will take care of it. If you're not seeing any issues or anything in needs maintenance in metastat, then you should be fine. What you did was pretty much the normal process to setup a simple mirror.

2) Here was the second answer I got on Sun's forum, which says the same thing.

Your getting a little confused about the difference between a partition/slice and a filesystem.
Partitioning is the act of breaking the disk up into "slices". You have been referring to c0t0d0s6 which is a slice. Partitioning is done with the format program.

The filesystem is the data that goes onto the slice. This is what newfs does. It creates a filesystem on a slice. So all its doing is writing a particular pattern of data onto a chunk of disk.

So mirroring filesystems doesnt require a newfs. Since the correct pattern of data already exists. You just need to copy it onto the new slice.
But the mirroring doesnt do partitioning ie create the slice. You have to do that with format. But it does copy the filesystem.

So assuming you created a new slice of the correct size.
You should be able to mirror the existing slice to the new slice. Then mount the virtual device representing the mirror.
You do have to always use the mirror through the virtual /dev/md device, not the raw slices.

The raw slices making up the mirror are perfectly ordinary UFS partitions. So yes they will be recognised.
But if you modify one directly instead of through the virtual device, you changes won't be mirrored to the other.

But yes, if a disk fails. You can use the other slice directly if necessary. But normally you would just keep using the metadevice.
And if you metaoffline a disk. You could then back it up.
But backups are normally more conveniently done with fssnap. That way you don't have to split mirrors and join them again.
 
That's very valuable information. I hesitated when I read the question because, like you, I was unsure of the implications - thanks for clarifying and have a star for doing so!

The internet - allowing those who don't know what they're talking about to have their say.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top