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!

DiskSuite 1.4.2 on Solaris 8 problem

Status
Not open for further replies.

cgonan

MIS
Feb 23, 2005
39
0
0
US
I'm installing and configuring disksuite on a Solaris 8 ultra 5, my first experience with it. I already created my state databases, one on each of 2 paritions on each drive. The 2nd drive was bigger than the first but I only partitioned the part of a drive so it was identical in size and structure to the first (this is a test system before a real one comes in). I just want to mirror one drive onto the other. I set up a submirror d24 and d34 and created the mirror D14 (for /var). A metastat said everything was alright. I did a metattach d14 d34 and it indicated it was fine and way rsyncing.

I unmounted /var and edited the vfstab /dev/dsk/md/d14 /dev/rdsk/md/d14 /var.

When I tried to mount /var, I got an error that said "can't mount /var". I know the drive is ok cause other regular partitions were mounted from it. I ran an fsck on d14 and then I was able to mount /var, but it was empty. I don't know what caused it?

Any ideas?
 
What was your mount command?

Something like "mount /dev/dsk/md/d14 /var".

Have you tried the command "mountall
 
I might be going out on long shot here; but isn't it /dev/md/dsk and not /dev/dsk/md?
 
My mistake... Yes it should be /dev/md/dsk and /dev/md/rdsk

 
Actually you didn't make a mistake bfitz, you were using what the original poster put. He should try mounting it as /dev/md/dsk/d14 /var.
 
Thanks but I had the correct mounting, it was just a typo.
 
Don't know what your status is on this problem. Solaris 8 came with Solaris Management Console. To start the Solaris Management Console, enter command "smc &". It takes a few mintues to initialize, but once it is up and running, you will be able to see the disk volume sets you have created and also check the status of those volume sets. By your problem descirption, I am not sure if you missed a step in creating your mirror. Through smc, you will be able to see if your mirrors are set up properly.
 
This is a HOW-TO I wrote up for work that I give my co-workers to use.

1. Install the SDS Disk Packages
2. Partition the drives in the same exact way.
prtvtoc /dev/rdsk/cWtXdYs2 | fmthard -s - /dev/rdsk/cAtBdCs2
3. You need to create to Metadatabases I usually use slice 6 and/or 7 on both drives. If you forgot to create them reboot of a CD-Rom single user mode and steal some from the swap space.
metadb -a -f 2 cWtXdYs6 cWtXdYs7 cAtBdCs6 cAtBdCs7
4. vi /etc/lvm/md.tab
# Slice 0 root drive /
d10 1 1 /dev/dsk/cWtXdYs0 (Primary)
d20 1 1 /dev/dsk/cAtBdCs0 (Secondary)
d0 -m d10
# Slice 1 root drive swap
d11 1 1 /dev/dsk/cWtXdYs1 (Primary)
d21 1 1 /dev/dsk/cAtBdCs1 (Secondary)
d1 -m d11
# Slice 3 root drive /var
d13 1 1 /dev/dsk/cWtXdYs3 (Primary)
d23 1 1 /dev/dsk/cAtBdCs3 (Secondary)
d3 -m d13
# Slice 4 root drive /usr
d14 1 1 /dev/dsk/cWtXdYs4 (Primary)
d24 1 1 /dev/dsk/cAtBdCs4 (Secondary)
d4 -m d14
# Slice 5 root drive /opt
d14 1 1 /dev/dsk/cWtXdYs5 (Primary)
d24 1 1 /dev/dsk/cAtBdCs5 (Secondary)
d4 -m d14
5. metainit -a -f
6. metaroot d0
7. vi /etc/vfstab
change all /dev/dsk/cWtXdYs5 and /dev/rdsk/cWtXdYs5 to /dev/md/dsk/dx and /dev/md/rdsk/dx
8. reboot (Must be performed)
9. metattach d0 d20
10. metattach d1 d21
11. metattach d3 d23
12. metattach d4 d24
13. metattach d5 d25
14. metastat | grep -i resync
15. When everything is synced your drives are now fully mirrored
 
I did one partition /var because it could be unmounted. D14 (with D24 and D34 as the submirrors). The metattach did the resync.

I rebooted and it ran fsck and prompted to do it manually. I think if I do that then it will wipe /var again. Do I have to create file system with newfs for D14? I did the metattach before rebooting, is that the problem?

Suggestions?
 
Do the partitions that hold the stat databases (mine are 5 and 6 on each disk) get mounted in vfstab? Also, do I keep the partitions on the second drive that will be the second submirror stay unmounted?

Thanks
 
Another question. I am going to be setting up a system with 2 73 Gig drives. Is there an issue with using such large drives? Are there any configuration parameters that need to be set for these larger drives? All the docs for Disk Suite on Solaris 8 reference smaller drives.

Any suggestions?
 
Well reading your first post I overlooked the fact you said "I unmounted /var and edited the vfstab /dev/dsk/md/d14 /dev/rdsk/md/d14 /var." You should never unmount /var while your in multi-user mode, it has temp files running, logs, and various other things. I would edit your /etc/vfstab back to the original settings, and then recreate the mirror and try that.

No there is not disk limitation in Disksuite that I know about, also you do not add the database replica's to /etc/vfstab.

I would use this method instead, of doing it in command line:

1. Partition the drives in the same exact way.
prtvtoc /dev/rdsk/cWtXdYs2 | fmthard -s - /dev/rdsk/cAtBdCs2
2. metadb -a -f 2 cWtXdYs5 cWtXdYs6 cAtBdCs5 cAtBdCs6
3. vi /etc/lvm/md.tab
# /var
d24 1 1 /dev/dsk/cWtXdYsA (Primary)
d34 1 1 /dev/dsk/cAtBdCsA (Secondary)
d14 -m d24
5. metainit -a -f
6. vi /etc/vfstab
Change /dev/dsk/cXtYdZsA /dev/md/dsk/d14
Change /dev/rdsk/cXtYdZsA /dev/md/rdsk/d14
7. reboot (Must be performed)
8. metattach d14 d34
9. metastat | grep -i resync
 
Thanks for your help. Regarding /var, one of the docs I had said the umount /var, mkdir /var/tmp, edit vfstab and then mount /var.

Any suggestions for creating / mirror?
 
Some of the docs say you have to do installboot on the root partition of the second drive and some say you don't. You don't have it in your notes. Does it have to be done?

thanks
 
If you follow those 15 steps I listed on my other post, that will setup your entire root disk to be mirrored. Make the applicable changes for your environment then your entire root disk can be mirrored. I also recommend turning on UFS logging you can do this by adding the word "logging", in the very last column of the /etc/vfstab for UFS systems.

You only need to run installboot if you are ufsdump/ufsrestore method, tape backups, or the tar command. I wrote a faq also that lists how to copy a hard drive without Disksuite or Veritas. This method is good for the fact if you delete a file or something you need you can mount up the secondary hard drive and restore it without having to hit the backups.

 
I was testing what would happen if the first disk failed by pulling the power on it. I can say boot disk1 and I can set eeprom to boot-devices=disk1, but if I pull the power out of disk0, it can't boot. I installed a boot block on disk1 but that didn't do anything. How can I have it automatically boot to disk1 if disk0 fails?

Thanks, you have been very helpful.
 
Here is a procedure for automatic failover to roots mirror.

ls -l /dev/dsk/<mirror disk partition>

Example: ls -l /dev/dsk/c0t2d0s0
Result: ../../devices/pci@1f.0/pci@1/scsi@4,1/sd@2,0:a

Copy the information after ../../devices/

Go to the ok> prompt and enter the following command:

nvalias backup_root pci@1f.0/pci@1/scsi@4,1/sd@2,0:a
printenv boot-device
setenv boot-device disk backup_root

NOTE: backup_root is just an alias for the device. You can use any name you want.

Now you should have failover... If the device "disk" is not available, backup_root will take over.
 
You have to change the /etc/vfstab on the mirror, it will have the same configuration as the primary. You could move the secondary to the primary slot and that should work fine also.
 
I should have thought of that.

So I can't really test a failure of the primary drive to see if the secondary takes over?

thanks so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top