The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem replace disk with RAID-5 volumes bonovox Filesystems, Disks and Memory 0 05-26-2008 06:02 AM
disk upgrade giriplug UNIX for Advanced & Expert Users 1 12-04-2005 10:49 AM
Disk upgrade problem mooshkie AIX 5 04-30-2004 05:21 AM
Creating a Mirror RAID With Existing Disk sysera Filesystems, Disks and Memory 2 02-08-2004 09:40 PM
Upgrade Hard Disk to a larger one DLongan UNIX for Dummies Questions & Answers 2 07-05-2001 12:10 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-08-2008
photon's Avatar
Registered User
 
Join Date: Jul 2002
Posts: 131
Upgrade boot disk in RAID 1


I need to upgrade 2 x 73 GB disk and replace with 2 x 146 GB disk in sun v240.

These disks contain boot and swap files

These are mirrored disks with RAID 1

I am trining to create the correct procedure.

So far the procedure I have is as follows:

# metastat

State: Okay

continue

# format
^C
view avialible disks

# cfgadm -al
Get the correct Ap_Id and check if configured

# metadb -i
#metadb -d -f cotodos7

check state database replicas and delete

# cfgadm -c unconfigure c1::dsk/c1t1d0
# cfgadm -al

verify device is unconfigured

# format
# ^C

confirm hard drive is no longer visible.
Safe to remove hard drive and replace with new one when
blue LED light comes on

# format
# ^C

disk is visible

# cfgadm -al
new disk is unconfigured

# format
Specify disk (enter its number): disk-number
fdisk
y or n (y is whole disk ; n create % partitions with 1. selected when prompted)\
format> label
format> yes
format> quit

IA: How to Create a Solaris fdisk Partition (System Administration Guide: Basic Administration)


# metadb -a -c 2 cotodos7
Adding two state database replicas

# cfgadm -c configure c0::dsk/c0t0d0
# cfgadm -al

confirm configured


The RAID 1 mirror should mirror the new disk and once finished repeat the procedure above
for the other disk (c0::dsk/c0t1d0) and wait for mirror to finish by checking metastat.

Last edited by photon; 07-08-2008 at 08:57 PM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-09-2008
joerg's Avatar
Registered User
 

Join Date: Jan 2002
Location: Germany
Posts: 167
flar create

Hi,
only two hints:

to copy the partition table from one to an other disk:
prtvtoc /dev/rdsk/c?t?d?s2 | fmthard -s - /dev/rdsk/c?t?d?s2


make the disks bootable:
/usr/sbin/installboot /usr/lib/fs/ufs/bootblk /dev/rdsk/c?t?d?s?

Br Joerg
Reply With Quote
  #3 (permalink)  
Old 07-09-2008
Registered User
 

Join Date: Aug 2004
Location: standing in a Sun 25k, Vienna
Posts: 78
Hi,

Is the replacement of the two 72GB drives w/ two 146GB drives just
because you can get the drives quicker for replacement?

Because you dont use the additional added space from the step to 146GB drives, I can write a little how-to of doing that if you want..

In short :

-) Break the 2x72GB mirror by removing the second disk (c0t1d0)
-) Remove the drive and insert a 146GB drive
-) Copy (for now) the VTOC from disk1 (72GB) to disk2 (146GB) OR
create the needed existing partitions by hand and create a big (or two/three..) slice/partition to hold the additional ~65GB space
-) Create metadb replicas on the 146GB disk
-) Start mirror sync
-) When mirrored, break the mirror and remove the first (72GB) disk, V240 now runs from the 146GB disk in slot 2
-) Insert the other 146GB disk and copy the VTOC from disk2 like stated from jörg via prtvtoc , I always add the additional '-sh' arg to prtvtoc
prtvtoc -sh | fmthard -s -
-sh removes the human readable index and stuff , MAN page states that those arguments should be used when duplicating the VTOC from disk to disk
-) Create metaDBs on disk1 and mirror the disk
-) Create a filesystem on the new slice to use the additional space (of course on the metadevice)
-) D O N E

greets,
Christopher
Reply With Quote
  #4 (permalink)  
Old 07-09-2008
photon's Avatar
Registered User
 
Join Date: Jul 2002
Posts: 131
Thanks for replies.

Nice hints joerg.

This was absolutely needed in procedure

Quote:
to copy the partition table from one to an other disk:
prtvtoc /dev/rdsk/c?t?d?s2 | fmthard -s - /dev/rdsk/c?t?d?s2
but since disks are not identical I might do it manually, not sure yet.

Manually would be
# format
# partition
# print

get partition table from 73Gb drive

then with new 146Gb drive

# format
# partition
# (follow prompts etc.. to create partitions of 73Gb drive)

Quote:
make the disks bootable:
/usr/sbin/installboot /usr/lib/fs/ufs/bootblk /dev/rdsk/c?t?d?s?
It says in the man fmthard "adds boot information to the Solaris fdisk partition"
so I do not think hint 2 is needed and if you partition manually the volume
manager will recreate the boot, swap, and other partitions.

Quote:
Is the replacement of the two 72GB drives w/ two 146GB drives just
because you can get the drives quicker for replacement?
Yes, the drives have reached there max capacity and backups of company
critical info have not been done in a month, it seemed like the best choice but
I wonder if there would have been a better?

Quote:
Because you dont use the additional added space from the step to 146GB drives, I can write a little how-to of doing that if you want..
I think it would be best to partition the drive exactly as mirror of 73Gb for volume
manager to do its thing. When both drives are in sync with 146Gb drives then
partion new space with format -> partition and mount a new file system. If you have
a suggestion or idea, I would like to here it.
Reply With Quote
  #5 (permalink)  
Old 07-11-2008
Registered User
 

Join Date: Jul 2008
Posts: 7
Quote:
Quote:
to copy the partition table from one to an other disk:
prtvtoc /dev/rdsk/c?t?d?s2 | fmthard -s - /dev/rdsk/c?t?d?s2
but since disks are not identical I might do it manually, not sure yet.
I am pretty sure this should be used between same-geometry disks only.

And a hint: to step "0" - make a backup

Ooh, and what about the "metadevadm -u" after you swap drives?
This command updates mapping between so called "device ID" and cXtXdX identifier, and should be run (at least on Sol9) after disk replacements.
Reply With Quote
  #6 (permalink)  
Old 07-11-2008
photon's Avatar
Registered User
 
Join Date: Jul 2002
Posts: 131
Quote:
I am pretty sure this should be used between same-geometry disks only.
I agree, going to do it manually, safer.

Quote:
And a hint: to step "0" - make a backup
Yes, but since the problem is no backups can be made, we have decided to
shutdown the oracle database when there is least trafic at 1:00 am (mind
you this may take about 2 hours) then pull the old drive and keep that
as the only backup so if we plug it in again it will start the oracle with a
clean startup.

Quote:
Ooh, and what about the "metadevadm -u" after you swap drives?
Since I am using metadb -d (delete)
then metadb -a (attach) with new drive it should update database replica with new device id (mddb.cf file is updated with -a) but like it says in the metadevadm -u man "If the device ID has not changed this option does nothing", so it would do nothing probably but does not hurt to try it. The location of update would be in /etc/lvm/mddb.cf
Reply With Quote
Google UNIX.COM
Reply

Tags
solaris

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:31 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0