encapsulating disk in linux for vxvm


Soby, I am heading out. But basically you will do the folloowing.
Become root, run vxdiskadm, select option 2, then enter sda when it asks for which disk, then it will ask for disk group, type "rootdg", then accept the defaults and watch the screen.. it will ask you to reboot the system, if everything is successful. Do so, It will reboot about 2-3 times for encapsulation.. Try to access the system after 30min. or so, it should be up. Once you login, check df -k and see if you see /dev/vx/dsk/bootdg/rootvol etc. instead of /dev/sdaX, then it means the disk is encapsulated.

$ uname –a   (to see the  kernel version)
Linux etrntmdevw 2.4.21-47.0.1.ELsmp #1 SMP Fri Oct 13 17:56:20 EDT 2006 i686 i686 i386 GNU/Linux

$ hostname
etrntmdev

login as: sobyjose
Using keyboard-interactive authentication.
Password for sobyjose@ent.wfb.bank.corp:
$ sudo su -
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
Password for sobyjose@ent.wfb.bank.corp:
[root@etrntmdev root]# ls
ORIG..bash_profile  bplog.rest.002  cdunixj1
anaconda-ks.cfg     bplog.rest.003  install.log         reset_pass
bplog.rest.001      bplog.rest.004  install.log.syslog  services

[root@etrntmdev root]# 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 spare for a disk group
 13     Turn off the spare flag on a disk
 14     Unrelocate subdisks back to a disk
 15     Exclude a disk from hot-relocation use
 16     Make a disk available for hot-relocation use
 17     Prevent multipathing/Suppress devices from VxVM's view
 18     Allow multipathing/Unsuppress devices from VxVM's view
 19     List currently suppressed/non-multipathed devices
 20     Change the disk naming scheme
 21     Change/Display the default disk layouts
 22     Mark a disk as allocator-reserved for a disk group
 23     Turn off the allocator-reserved 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 may be entered at the prompt.  Here are some disk
  selection examples:

  sda:          add only disk sda
  sdb hdc:      add both disk sdb and hdc
  xyz_0  :      a single disk (in the enclosure based naming scheme)
  xyz_   :      all disks on the enclosure whose name is xyz


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

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

  sda

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

  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 group
  name that does not yet exist.

Which disk group [<group>,list,q,?] rootdg

  There is no active disk group named rootdg.

Create a new group named rootdg? [y,n,q,?] (default: y)    ---->  <enter>

Use a default disk name for the disk? [y,n,q,?] (default: y)   ---->  <enter>

  A new disk group will be created named rootdg and the selected
  disks will be encapsulated and added to this disk group with
  default disk names.

  sda

Continue with operation? [y,n,q,?] (default: y)  ---->  <enter>

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

  sda
Continue with encapsulation? [y,n,q,?] (default: y)   ---->  <enter>

  A new disk group rootdg will be created and the disk device sda will
  be encapsulated and added to the disk group with the disk name rootdisk.

Enter desired private region length
[<privlen>,q,?] (default: 2048)   ---->  <enter>


Continue with encapsulation? [y,n,q,?] (default: y)   ---->  <enter>

    VxVM vxencap INFO V-5-2-1923 Encapsulating root disk...

  VxVM vxencap INFO V-5-2-2123 Verifying generated partition-table...

  VxVM vxencap INFO V-5-2-0 Checking private region location of root disk ...

  VxVM vxencap INFO V-5-2-1946 Generating VxVM initrd image...

  VxVM vxinitrd INFO V-5-2-3588 Initializing...

  VxVM vxinitrd INFO V-5-2-3573 Creating initrd image for
  kernel 2.4.21-47.0.1.ELsmp.

  Please wait(few minutes)...

  NOTE: Until next reboot, none of the 'lilo' settings should
  be tampered. Otherwise, your system may not boot!

  VxVM vxencap INFO V-5-2-2414 Adding vxvm_root entry to 'lilo'...

  VxVM vxencap INFO V-5-2-2191 updating /etc/lilo.conf ...

  VxVM vxencap INFO V-5-2-2192 updating lilo...

  VxVM vxencap INFO V-5-2-2377 Please save /etc/vx/rootdisk_info.etrntmdev
  on some other server. Information in this file can be useful for recovery in
  case of unknown failures.

  NOTE: After your system comes up with rootdisk encapsulated,
  never run any of LILO's fallback/lock/-R options. LILO does not understand
  VxVM devices properly and using above commands may render your system
  unbootable

  The sda 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.

  VxVM  NOTICE V-5-2-2044
The encapsulation will require two or three reboots which will happen
  automatically after the next reboot.  To reboot execute the command:

shutdown -r now

  This will update the /etc/fstab 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)  ---->  <enter>

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 spare for a disk group
 13     Turn off the spare flag on a disk
 14     Unrelocate subdisks back to a disk
 15     Exclude a disk from hot-relocation use
 16     Make a disk available for hot-relocation use
 17     Prevent multipathing/Suppress devices from VxVM's view
 18     Allow multipathing/Unsuppress devices from VxVM's view
 19     List currently suppressed/non-multipathed devices
 20     Change the disk naming scheme
 21     Change/Display the default disk layouts
 22     Mark a disk as allocator-reserved for a disk group
 23     Turn off the allocator-reserved 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.
[root@etrntmdev root]# sync

[root@etrntmdev root]# reboot

Broadcast message from root (pts/1) (Thu Feb  8 13:04:23 2007):


The system is going down for reboot NOW!

No comments:

Post a Comment