SunSolve Internal

 

  Simple Search | Advanced Search | Product Search | Tips | Investigation Wizard

 Search for in

Printer Friendly Page ] [ E-mail this Document to Someone ]
Was this document useful? Yes or No ]

Jump to
Infodoc ID   Synopsis   Date
15838   How to encapsulate boot disk using vxdiskadm   12 Jan 2000

Description Top
This procedure enables you to encapsulate the boot disk after vxinstall
has been run. 

STEP 1.

We will encapsulate the primary drive using vxdiskadm.

node0# vxdiskadm

Volume Manager Support Operations
Menu: VolumeManager/Disk

 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement
 5      Replace a failed or removed disk
 6      Mirror volumes on a disk
 7      Move volumes from a disk
 8      Enable access to (import) a disk group
 9      Remove access to (deport) a disk group
 10     Enable (online) a disk device
 11     Disable (offline) a disk device
 12     Mark a disk as a hot-spare for a disk group
 13     Turn off the hot-spare flag on a disk
 list   List disk information
 
 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus

Select an operation to perform: 2

Encapsulate one or more disks
Menu: VolumeManager/Disk/Encapsulate
 
  Use this operation to convert one or more disks to use the Volume Manager.
  This adds the disks to a disk group and replaces existing partitions
  with volumes.  Disk encapsulation requires a reboot for the changes
  to take effect.

  More than one disk or pattern cab be entered at the prompt.  Here are
  some disk selection examples:

  all:          all disks
  c3 c4t2:      all disks on both controller 3 and controller 4, target 2
  c3t4d2:       a single disk

Select disk devices to encapsulate:                                  
[<pattern-list>,all,list,q,?] c0t0d0

Here is the disk selected.  Output format: [Device_Name]
 
  c0t0d0

Continue operation? [y,n,q,?] (default: y) return

You can choose to add this disk to an existing disk group or to
a new disk group.  To create a new disk group, select a disk name that 
does not yet exist.

Which disk group [<group>,list,q,?] (default: rootdg) return

Use a default disk name for the disk? [y,n,q,?] (default: y) n
NOTE: Make sure you select "n"; we need to call the drive rootdisk.

The selected disks will be encapsulated and added to the rootdg
disk group with disk names that will be specified interactively.
 
  c0t0d0

Continue with operation? [y,n,q,?] (default: y) return

The following disk has been selected for encapsulation.
Output format: [Device_Name]

  c0t0d0

Continue with encapsulation? [y,n,q,?] (default: y) return

Enter disk name for  [<name>,q,?] (default: disk01) rootdisk

The disk device c0t0d0 will be encapsulated and added to the disk group
  rootdg with the disk name rootdisk.

  The c0t0d0 disk has been configured for encapsulation.

  The first stage of encapsulation has completed successfully.  You
  should now reboot your system at the earliest possible opportunity.

  The encapsulation will require two or three reboots, which will happen
  automatically after the next reboot.  To reboot, execute the command:
 
shutdown -g0 -y -i6

  This will update the /etc/vfstab file so that volume devices are
  used to mount the file systems on this disk device.  You will need
  to update any other references such as backup scripts, databases,
  or manually created swap devices.

Encapsulate other disks? [y,n,q,?] (default: n) return

Volume Manager Support Operations
Menu: VolumeManager/Disk

 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement
 5      Replace a failed or removed disk
 6      Mirror volumes on a disk
 7      Move volumes from a disk
 8      Enable access to (import) a disk group
 9      Remove access to (deport) a disk group
 10     Enable (online) a disk device
 11     Disable (offline) a disk device
 12     Mark a disk as a hot-spare for a disk group
 13     Turn off the hot-spare flag on a disk
 list   List disk information

 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus

Select an operation to perform: q

Goodbye.

node0# reboot

This will setup the volumes rootvol, swapvol, var, usr, export.
It will also edit the /etc/system and /etc/vfstab files to reflect the changes.


STEP 2. Init the secondary drive that will become the rootmir drive.
        We will use vxdiskadm to accomplish this. If you already
        have the disk initialized skip this step.

node0# vxdiskadm

Volume Manager Support Operations
Menu: VolumeManager/Disk
 
 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement
 5      Replace a failed or removed disk
 6      Mirror volumes on a disk
 7      Move volumes from a disk
 8      Enable access to (import) a disk group
 9      Remove access to (deport) a disk group
 10     Enable (online) a disk device
 11     Disable (offline) a disk device
 12     Mark a disk as a hot-spare for a disk group
 13     Turn off the hot-spare flag on a disk
 list   List disk information
 
 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus
 
Select an operation to perform: 1
Add or initialize disks
Menu: VolumeManager/Disk/AddDisks

  Use this operation to add one or more disks to a disk group.  You can
  add the selected disks to an existing disk group or to a new disk group
  that will be created as a part of the operation. The selected disks can
  also be added to a disk group as hot spares. The selected disks can also
  be initialized without adding them to a disk group leaving the disks
  available for use as replacement disks.
 
  More than one disk or pattern may be entered at the prompt.  Here are
  some disk selection examples:
 
  all:          all disks
  c3 c4t2:      all disks on both controller 3 and controller 4, target 2
  c3t4d2:       a single disk
 
Select disk devices to add:                                          
[<pattern-list>,all,list,q,?] c0t1d0

Here is the disk selected.  Output format: [Device_Name]

  c0t1d0

Continue operation? [y,n,q,?] (default: y) return

You can choose to add this disk to an existing disk group, a
new disk group, or leave the disk available for use by future
add or replacement operations.  To create a new disk group,
select a disk group name that does not yet exist.  To leave
the disk available for future use, specify a disk group name
of "none".

Which disk group [<group>,none,list,q,?] (default: rootdg) return

Use a default disk name for the disk? [y,n,q,?] (default: y) n 
NOTE: We could let it default, but in this example we will call 
the disk "rootmir".

Add disk as a hot-spare disk for rootdg? [y,n,q,?] (default: n) return

The selected disks will be added to the disk group rootdg with
  disk names that you will specify interactively.

  c0t1d0

Continue with operation? [y,n,q,?] (default: y) return

The following disk device has a valid VTOC, but does not appear to have
been initialized for the Volume Manager.  If there is data on the disk
that should NOT be destroyed you should encapsulate the existing disk
partitions as volumes instead of adding the disk as a new disk.
Output format: [Device_Name]
 
  c0t1d0

Encapsulate this device? [y,n,q,?] (default: y) n

  c0t1d0

Instead of encapsulating, initialize? [y,n,q,?] (default: n) y

  Initializing device c0t1d0.

Enter disk name for  [<name>,q,?] (default: disk01) rootmir

  Adding disk device c0t1d0 to disk group rootdg with disk
  name rootmir.


Add or initialize other disks? [y,n,q,?] (default: n) return

Volume Manager Support Operations
Menu: VolumeManager/Disk

 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement
 5      Replace a failed or removed disk
 6      Mirror volumes on a disk
 7      Move volumes from a disk
 8      Enable access to (import) a disk group
 9      Remove access to (deport) a disk group
 10     Enable (online) a disk device
 11     Disable (offline) a disk device
 12     Mark a disk as a hot-spare for a disk group
 13     Turn off the hot-spare flag on a disk
 list   List disk information

 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus

Select an operation to perform: q

Goodbye.

node0#

STEP 3 setup mirroring to the rootmir disk.

node0# /etc/vx/bin/vxrootmir rootmir 
 NOTE: THIS ONLY MIRRORED rootvol. The following command
 will mirror the rest of the primary drive. 

node0# /etc/vx/bin/vxmirror rootdisk rootmir
! vxassist -g rootdg mirror export rootmir
! vxassist -g rootdg mirror swapvol rootmir
! vxassist -g rootdg mirror usr rootmir
! vxassist -g rootdg mirror var rootmir
node0#

Now the rootdisk is mirrored to rootmir disk.

node0# more /etc/vx/volboot

volboot 3.1 0.2
hostid node0
end
###############################################################
###############################################################


STEP 4 reboot the system

node0# reboot
Product Area SunOS Unbundled
Product Veritas Volume Manager
OS Solaris 2.x
Hardware n/a

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team