Friday 5 October 2012

veritas disk operations


1.To initialize the disk

way1:

bash-3.00# vxdisk init c2t4d0
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:none       -            -            online invalid
c2t1d0s2     auto:none       -            -            online invalid
c2t2d0s2     auto:none       -            -            online invalid
c2t3d0s2     auto:none       -            -            online invalid
c2t4d0s2     auto:cdsdisk    -            -            online


way2:

bash-3.00# vxdisksetup -i c2t3d0
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:none       -            -            online invalid
c2t1d0s2     auto:none       -            -            online invalid
c2t2d0s2     auto:none       -            -            online invalid
c2t3d0s2     auto:cdsdisk    -            -            online
c2t4d0s2     auto:cdsdisk    -            -            online


way3:

bash-3.00# vxdiskadd c2t1d0

Add or initialize disks
Menu: VolumeManager/Disk/AddDisks
  Here is the disk selected.  Output format: [Device_Name]

  c2t1d0

Continue operation? [y,n,q,?] (default: y) y
  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: none)

Add site tag to disk? [y,n,q,?] (default: n)
  The disk will be initialized and left free for use as a replacement
  disk.

  c2t1d0

Continue with operation? [y,n,q,?] (default: y)
  Initializing device c2t1d0.

Enter the desired format
[cdsdisk,sliced,simple,q,?] (default: cdsdisk)

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

Goodbye.



way4:
===========================================
bash-3.00# 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     Get the newly connected/zoned disks in VxVM view
 22     Change/Display the default disk layouts
 23     Mark a disk as allocator-reserved for a disk group
 24     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: 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 may
  also be added to a disk group as spares. Or they may be added as
  nohotuses to be excluded from hot-relocation use. The selected
  disks may 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 (in the c#t#d# naming scheme)
  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 add: [<pattern-list>,all,list,q,?] c2t2d0
  Here is the disk selected.  Output format: [Device_Name]

  c2t2d0

Continue operation? [y,n,q,?] (default: y)
  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: none)

Add site tag to disk? [y,n,q,?] (default: n)
  The disk will be initialized and left free for use as a replacement
  disk.

  c2t2d0

Continue with operation? [y,n,q,?] (default: y)
  Initializing device c2t2d0.

Enter the desired format
[cdsdisk,sliced,simple,q,?] (default: cdsdisk)

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

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

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     Get the newly connected/zoned disks in VxVM view
 22     Change/Display the default disk layouts
 23     Mark a disk as allocator-reserved for a disk group
 24     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: list

List disk information
Menu: VolumeManager/Disk/ListDisk
  Use this menu operation to display a list of disks.  You can
  also choose to list detailed information about the disk at
  a specific disk device address.

Enter disk device or "all" [<address>,all,q,?] (default: all)

DEVICE       DISK         GROUP        STATUS
c1t0d0       -            -            online invalid
c1t1d0       -            -            online invalid
c2t0d0       -            -            online invalid
c2t1d0       -            -            online
c2t2d0       -            -            online
c2t3d0       -            -            online
c2t4d0       -            -            online

Device to list in detail [<address>,none,q,?] (default: none)

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     Get the newly connected/zoned disks in VxVM view
 22     Change/Display the default disk layouts
 23     Mark a disk as allocator-reserved for a disk group
 24     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.



2.To unsetup all disks

bash-3.00# for i in 0 1 2 3 4
> do
> vxdiskunsetup -C c2t$i\d0
> echo "c2t$id0 disk unsetup"
> done
c2t0d0 disk unsetup
c2t1d0 disk unsetup
c2t2d0 disk unsetup
c2t3d0 disk unsetup
c2t4d0 disk unsetup


3.How to change default vxdisk format

#cat > /etc/default/vxdisk
format=sliced/cdsdisk/simple

bash-3.00# vxdisk init c2t4d0
VxVM vxdisk ERROR V-5-1-5433 Device c2t4d0: init failed:
        Disk VTOC does not list private partition
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:none       -            -            online invalid
c2t1d0s2     auto:none       -            -            online invalid
c2t2d0s2     auto:none       -            -            online invalid
c2t3d0s2     auto:none       -            -            online invalid
c2t4d0s2     auto:none       -            -            online invalid



bash-3.00# vxdisksetup -i c2t4d0
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:none       -            -            online invalid
c2t1d0s2     auto:none       -            -            online invalid
c2t2d0s2     auto:none       -            -            online invalid
c2t3d0s2     auto:none       -            -            online invalid
c2t4d0s2     auto:simple     -            -            online



bash-3.00# vxdiskadd c2t3d0

Add or initialize disks
Menu: VolumeManager/Disk/AddDisks
  Here is the disk selected.  Output format: [Device_Name]

  c2t3d0

Continue operation? [y,n,q,?] (default: y)
  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: none)

Add site tag to disk? [y,n,q,?] (default: n)
  The disk will be initialized and left free for use as a replacement
  disk.

  c2t3d0

Continue with operation? [y,n,q,?] (default: y)
  Initializing device c2t3d0.

Enter the desired format
[cdsdisk,sliced,simple,q,?] (default: simple)

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

Goodbye.


4) how to make veritas disk offline//online//remove//enable

bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:cdsdisk    -            -            online
c2t1d0s2     auto:cdsdisk    -            -            online
c2t2d0s2     auto:cdsdisk    -            -            online
c2t3d0s2     auto:cdsdisk    -            -            online
c2t4d0s2     auto:cdsdisk    -            -            online
bash-3.00# vxdisk offline c2t4d0
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:cdsdisk    -            -            online
c2t1d0s2     auto:cdsdisk    -            -            online
c2t2d0s2     auto:cdsdisk    -            -            online
c2t3d0s2     auto:cdsdisk    -            -            online
c2t4d0s2     auto            -            -            offline
bash-3.00# vxdisk online c2t4d0
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:cdsdisk    -            -            online
c2t1d0s2     auto:cdsdisk    -            -            online
c2t2d0s2     auto:cdsdisk    -            -            online
c2t3d0s2     auto:cdsdisk    -            -            online
c2t4d0s2     auto:cdsdisk    -            -            online
bash-3.00# vxdisk rm c2t4d0
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:cdsdisk    -            -            online
c2t1d0s2     auto:cdsdisk    -            -            online
c2t2d0s2     auto:cdsdisk    -            -            online
c2t3d0s2     auto:cdsdisk    -            -            online
bash-3.00# vxdisk scandisks
bash-3.00#
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:cdsdisk    -            -            online
c2t1d0s2     auto:cdsdisk    -            -            online
c2t2d0s2     auto:cdsdisk    -            -            online
c2t3d0s2     auto:cdsdisk    -            -            online
c2t4d0s2     auto:cdsdisk    -            -            online


bash-3.00# vxdisk scandisks device=c2t4d0
bash-3.00#
bash-3.00# vxdisk scandisks ctlr=c2
bash-3.00#
bash-3.00# vxdisk scandisks new
bash-3.00#
bash-3.00# vxdisk scandisks fabric



bash-3.00# vxdisk destroy c2t4d0
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:cdsdisk    -            -            online
c2t1d0s2     auto:cdsdisk    -            -            online
c2t2d0s2     auto:cdsdisk    -            -            online
c2t3d0s2     auto:cdsdisk    -            -            online
c2t4d0s2     auto:none       -            -            online invalid
bash-3.00# vxdisk init c2t4d0
bash-3.00#
bash-3.00# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c1t1d0s2     auto:none       -            -            online invalid
c2t0d0s2     auto:cdsdisk    -            -            online
c2t1d0s2     auto:cdsdisk    -            -            online
c2t2d0s2     auto:cdsdisk    -            -            online
c2t3d0s2     auto:cdsdisk    -            -            online
c2t4d0s2     auto:cdsdisk    -            -            online

No comments:

Post a Comment