Sponsored Content
Operating Systems Solaris Need to remove a disk from Veritas Post 302113294 by reborg on Wednesday 4th of April 2007 05:13:54 PM
Old 04-04-2007
It might help if you said what part wasn't working, and what error message you got, because the method described, does work:


Code:
#: vxprint -g rootdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg rootdg       rootdg       -        -        -        -        -       -

dm rootdisk     c0t0d0s2     -        35358848 -        -        -       -
dm rootmirr     -            -        -        -        NODEVICE -       -

v  rootvol      root         ENABLED  20624424 -        ACTIVE   -       -
pl rootvol-01   rootvol      ENABLED  20624424 -        ACTIVE   -       -
sd rootdisk-02  rootvol-01   ENABLED  20624424 0        -        -       -
pl rootvol-02   rootvol      DISABLED 20624424 -        NODEVICE -       -
sd rootmirr-01  rootvol-02   DISABLED 20624424 0        NODEVICE -       -

v  swapvol      swap         ENABLED  14682592 -        ACTIVE   -       -
pl swapvol-01   swapvol      ENABLED  14682592 -        ACTIVE   -       -
sd rootdisk-B0  swapvol-01   ENABLED  1        0        -        -       Block0
sd rootdisk-01  swapvol-01   ENABLED  14682591 1        -        -       -
pl swapvol-02   swapvol      DISABLED 14682592 -        NODEVICE -       -
sd rootmirr-02  swapvol-02   DISABLED 14682592 0        NODEVICE -       -

#: vxplex -g rootdg -o rm dis rootvol-02
#: vxplex -g rootdg -o rm dis swapvol-02

#: vxprint -g rootdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg rootdg       rootdg       -        -        -        -        -       -

dm rootdisk     c0t0d0s2     -        35358848 -        -        -       -
dm rootmirr     -            -        -        -        NODEVICE -       -

v  rootvol      root         ENABLED  20624424 -        ACTIVE   -       -
pl rootvol-01   rootvol      ENABLED  20624424 -        ACTIVE   -       -
sd rootdisk-02  rootvol-01   ENABLED  20624424 0        -        -       -

v  swapvol      swap         ENABLED  14682592 -        ACTIVE   -       -
pl swapvol-01   swapvol      ENABLED  14682592 -        ACTIVE   -       -
sd rootdisk-B0  swapvol-01   ENABLED  1        0        -        -       Block0
sd rootdisk-01  swapvol-01   ENABLED  14682591 1        -        -       -

#: vxedit -g rootdg -rf rm rootmirr
 #: vxprint -g rootdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg rootdg       rootdg       -        -        -        -        -       -

dm rootdisk     c0t0d0s2     -        35358848 -        -        -       -

v  rootvol      root         ENABLED  20624424 -        ACTIVE   -       -
pl rootvol-01   rootvol      ENABLED  20624424 -        ACTIVE   -       -
sd rootdisk-02  rootvol-01   ENABLED  20624424 0        -        -       -

v  swapvol      swap         ENABLED  14682592 -        ACTIVE   -       -
pl swapvol-01   swapvol      ENABLED  14682592 -        ACTIVE   -       -
sd rootdisk-B0  swapvol-01   ENABLED  1        0        -        -       Block0
sd rootdisk-01  swapvol-01   ENABLED  14682591 1        -        -       -

#: vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0t0d0s2     auto:sliced     rootdisk     rootdg       online
c0t1d0s2     auto:sliced     rootdisk     rootdg2      online
c1t1d0s2     auto:cdsdisk    disk1        datadg        online
c2t1d0s2     auto:cdsdisk    disk1mirr    datadg        online


Last edited by reborg; 04-04-2007 at 06:26 PM..
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

FSCK on veritas managed disk

I've had a VXFS filesystem get corrupted and now it won't mount. Can I run a fsck -y on the raw disk device or should something be done within veritas? Veritas does not see the disk at the moment. (2 Replies)
Discussion started by: ozzmosiz
2 Replies

2. Solaris

Veritas root disk mirroring

Hi there, My task is to replace the two 73 G disks with two 143 G disks , which has vxvm 4.1 running on it. I would like to know whether the steps iam following are correct. 1. Break the sub-disks, plexes of the root mirror. 2. Remove the sub-disks,plexes of the root mirror. 3. Remove one of... (10 Replies)
Discussion started by: Jartan
10 Replies

3. Shell Programming and Scripting

mapping device from an inq output to veritas disk groups

Hi, Does anyone have a clever way of mapping the following from two different files using perl. sample line from vxdisk list output (vxdisk-list.file): emcpower18s2 auto:sliced IDFAG1_1 (IDFAG1_appdg) online sample line from 'inq' output (inq.file): ... (0 Replies)
Discussion started by: csoesan
0 Replies

4. UNIX and Linux Applications

Veritas silent disk group creation

I am trying to write a kornshell script that will automatically create veritas disk groups. However, the only utility that I can find that will create the diskgroup is vxdiskadd, which prompts with interactive questions. I've tried to pass the answers through to vxdiskadd, but I receive the... (0 Replies)
Discussion started by: jm6601
0 Replies

5. Solaris

Help needed to find out the disk controller for veritas disks

hi all i am using vxvm 5.1 on my sun blade 150 which is running with solaris 5.10. When i give the command "vxdisk list" it gives the following output # vxdisk list DEVICE TYPE DISK GROUP STATUS c0t0d0s2 auto:none - - online... (2 Replies)
Discussion started by: kingston
2 Replies

6. AIX

Remove internal disk from Veritas Control

I installed new internal disks in my p570. They will be part of a new AIX vg. Unfortunately, we have Veritas Volume Manager running on this AIX 5.2 ml 10 box. Veritas has grabbed control of the disks. I want AIX LVM to control the disks. I cannot get these disks free of Veritas: <lspv... (2 Replies)
Discussion started by: BobSmith
2 Replies

7. UNIX for Dummies Questions & Answers

Configure disk group with veritas

People i have an a storage i create two virtual disk 1 y 2. In the virtual disk 1 i configure 8 volumes and in the Vd2 configure 5 volumes. Now i want to create a disk group called Prod2 y Dev2 but when i go to vxdiskadm and i choose add disk o encapusalte when i press list to list the disk... (0 Replies)
Discussion started by: enkei17
0 Replies

8. Solaris

Veritas not attaching replaced disk

Hi, I`m on SunFire480R with Solaris 10. Disk in rootdg group failed, so it was replaced. However, I cannot make Veritas initalise the replaced disk: # vxdctl enable # vxdisk list c1t0d0s2 Device: c1t0d0s2 devicetag: c1t0d0 type: auto flags: online error private autoconfig... (1 Reply)
Discussion started by: masloff
1 Replies

9. Solaris

Veritas disk group not the same on each cluster node.

Need help getting all disk devices back on node 2 the same as node 1. Recently Veritas and/or Sun cluster got wrecked on my 2 node Sun cluster after installing the latest patch cluster. I backed out the patches and then node 2 could see only half of the devices and Veritas drives (though format... (0 Replies)
Discussion started by: buggin
0 Replies

10. UNIX for Beginners Questions & Answers

How to extend a disk in veritas volume manager in veritas cluster?

Hi Experts, I wanted to extend a veritas file system which is running on veritas cluster and mounted on node2 system. #hastatus -sum -- System State Frozen A node1 running 0 A node2 running 0 -- Group State -- Group System Probed ... (1 Reply)
Discussion started by: Skmanojkum
1 Replies
vxchg_rootid(1M)														  vxchg_rootid(1M)

NAME
vxchg_rootid - set up VxVM root disk that has been cloned or copied from another operational VxVM root disk SYNOPSIS
/etc/vx/bin/vxchg_rootid [-g new_dg] [-N] [-R] [-S] [-s script_path] [-v] new_host_name new_root_da DESCRIPTION
The vxchg_rootid command sets up a VxVM root disk that has been freshly cloned by using the dd command, or by using a hardware-based proce- dure such as EMC Symmetrix BCV cloning. The disk ID and disk group ID fields in the private region header and the configuration records are changed from their cloned values to ensure that they are unique. The new host name is written to the host ID fields of the private region header and to the /etc/vx/volboot file. Script files in /etc, /usr and /var, that contain hard-coded host name values, are modified to use the new host name (new_host_name). If no options are specified, values in the /etc/rc.config.d/netconf file are initialized such that when the new root disk is first booted, the "set_parms initial" dialog menu is displayed. This allows you to enter the system host name and network parameters manually. OPTIONS
-g new_dg Specifies the name of the disk group for the new root disk. If this option is not used, the new root disk remains in the same disk group as the source disk. -N Provides a method of updating a current host for a new release of the HP-UX operating system. The command attempts to use NFS to mount the root directory of the current root disk from which new_host_name was booted. This assumes that the specified host already exists and is accessible over the network. The root directory is temporarily mounted using the new_host_name:/ syntax. For this to work, the /etc/exports file on the target system must have been edited to contain an entry for /, and the exportfs command must have been run to give root permission to the host on which the vxchg_rootid command is to be invoked. When the old root file system has been mounted, and the freshly cloned root file system has also been temporarily imported and mounted, system-specific files are copied from the old to the new root file system. The files that are copied include: /etc/exports /etc/fstab /etc/hosts /etc/lvmtab /etc/passwd /etc/rc.config.d/netconf /etc/resolv.conf /etc/vx/elm/* /etc/vx/licenses/* -R Provides a method of obtaining and updating machine-specific information on a remote target host. When the new disk ID and disk group ID fields have been changed on the cloned disk, the command uses remsh to execute appropriate commands to find the new root disk as it is enumerated on the remote host. Once a match has been found, the name and hardware path of the new disk as it exists on the remote host are extracted. The disk name information is used to update the /stand/bootconf file with the correct value. The hardware path information is used with the setboot command to set the boot device in the target host's NVRAM. The criteria for making the setboot changes are as follows: o If the -v option was specified, the current primary and alternate boot device values are displayed. o The hardware path of the new root on the remote host is set as the primary boot path. o The hardware path of the current primary boot device is set as the alternate boot path. As successful operation of remsh depends on having permission to access the remote host, vxchg_rootid executes a simple remsh command to test this before any configuration changes have been made. An entry for the host name of the maintenance server and the user run- ning the command (such as root) must exist in the /.rhosts file on the remote host. See the hosts.equiv(4) manual page for further information. -S Starts an interactive Bourne shell when the new root file system has been temporarily mounted. This allows manual changes to be made to the configuration before it is booted on the new host. When the changes have been completed, exit the shell to allow the vxchg_rootid command to continue to completion. Immediately before starting the shell, a message is output to indicate the mount point of the temporarily mounted new root file system. -s script_path Runs the specified shell script after the new root file system has been temporarily mounted. This allows you to make any automated changes to the configuration files that are required. When the script exits, the vxchg_rootid command continues to completion if a 0 exit status is received, or aborts if a non-zero exit status is received. If any command arguments are required to the script, place script_path and its arguments in quotes. To allow operational control from the invoked shell script, the new host name and the temporary mount point of the new root file sys- tem are passed to the script as the last two arguments. Thus, the calling sequence for the invoked shell script is: user_script script_arguments host_name mount_point For example, the calling sequence for the script, patch_db, which takes the internal arguments db_path and token would be: patch_db db_path token newhost temp_mount -v Outputs verbose messages, including a time stamp, which indicates the major operations that are being performed. ARGUMENTS
new_host_name The host name of that target machine that is to inherit the newly cloned disk as its root disk when accessed via a SAN boot. new_root_da The disk access name (CTD name) of the freshly cloned root. NOTES
The order in which any optional operations are completed is important as it may determine what can be accomplished in a script, or what must be done manually. This is the order of operations that are performed by vxchg_rootid: 1. Perform sanity checks on the arguments and options specified. These checks include: o Check that Veritas Volume Manager is running. o If the -s option was specified, check that the specified script_path exists. o Check that the new_root_da argument refers to a real disk. o Check that the disk group name on the freshly cloned disk is rootdg. o Check that the rootdg disk group contains one disk. 2. If the -N option was specified, attempt to mount the current root file system over NFS. If the target host does not grant access, the mount is unsuccessful and the vxchg_rootid command exits without performing any configuration operations. 3. The main operations of the vxchg_rootid command are accomplished up to the unmounting of the file systems on the new root. These operations include: o Patching the private region to provide unique disk ID and disk group ID values. o Temporarily importing the new root disk clone, running fsck, and temporarily mounting the new root file system and all file systems under it. o Initializing values in the /etc/rc.config.d/netconf file on the new root file system. o Patching the new host ID into the /etc/vx/volboot file on the new root file system. o Updating the /stand/bootconf file with the appropriate disk name. o Updating the host name value in files in the /etc, /usr and /var directories. 4. If the -N option was specified, system-specific files (listed in the DESCRIPTION section) are copied from the old to the new root file system. 5. If the -s option was specified, the script file is executed. 6. If the -S option was specified, start an interactive Bourne shell. This allows the contents of the new root file system and all of its subordinate file systems to be inspected, and any required manual operations to be performed. When the shell exits, the vxchg_rootid command runs to completion. 7. All temporarily mounted file systems are unmounted. 8. The new root disk clone is deported. 9. The host ID value in the new root disk clone's private region is patched with the specified value. 10. The vxchg_rootid command exits. When the vxchg_rootid command is executed, messages similar to the following may be displayed on the system console: vxvm:vxconfigd: WARNING: Group rootdg: Duplicate virtual device number(s): Volume standvol remapped from 2,5 to 2,8388607 Volume swapvol remapped from 2,1 to 2,8388606 Volume rootvol remapped from 2,0 to 2,8388605 Volume tmpvol remapped from 2,6 to 2,8388604 Volume homevol remapped from 2,7 to 2,8388603 Volume optvol remapped from 2,8 to 2,8388602 Volume usrvol remapped from 2,9 to 2,8388601 Volume varvol remapped from 2,10 to 2,8388600 These messages are the normal consequence of temporarily importing the cloned rootdg disk group and starting its volumes. The minor device numbers of the indicated volumes are changed, but only for the period that they are temporarily imported. EXAMPLES
This example shows the vxchg_rootid command being invoked in its simpliest form: /etc/vx/bin/vxchg_rootid new_host c5t12d0 The next example shows the vxchg_rootid command being invoked with the -s option. Note that quoted script arguments are also specified. In this case, the test_script script echoes each of the four arguments: vxchg_rootid -s "/test_script arg1 arg2" furnace c5t12d0 test_script: Args are arg1 arg2 furnace /tmp/tmpmnt1.6523 The next example is similar to the one above, except that the -N, -R and -v options are also specified. (The time stamp is usually placed on the line as each message, but this output has been edited for clarity.) # cd /etc/vx/bin # ./vxchg_rootid -RNvs "/test_script arg1 arg2" hpilb09 c8t4d4 vxchg_rootid 16:29: Checking configuration of cloned disk and disk group vxchg_rootid 16:29: Mounting hpilb09:/ on /tmp/tmpmnt2.6376 vxchg_rootid 16:29: Checking remsh remote access vxchg_rootid 16:29: Patching disk ID and disk group ID values on disk c8t4d4 vxchg_rootid 16:29: Rescanning the configuration vxchg_rootid 16:29: Temporarily importing new root as rootdg.6376 disk group vxchg_rootid 16:29: Checking & mounting root FS on /tmp/tmpmnt1.6376 vxchg_rootid 16:29: Checking & mounting stand FS on /tmp/tmpmnt1.6376/stand vxchg_rootid 16:29: Checking & mounting opt FS on /tmp/tmpmnt1.6376/opt vxchg_rootid 16:29: Checking & mounting tmp FS on /tmp/tmpmnt1.6376/tmp vxchg_rootid 16:29: Checking & mounting var FS on /tmp/tmpmnt1.6376/var vxchg_rootid 16:29: Checking & mounting home FS on /tmp/tmpmnt1.6376/home vxchg_rootid 16:29: Checking & mounting usr FS on /tmp/tmpmnt1.6376/usr vxchg_rootid 16:29: Initializing netconf & Veritas license files. vxchg_rootid 16:29: Setting host name into volboot and other selected files. vxchg_rootid 16:29: Copying selected files from NFS mounted host. vxchg_rootid 16:29: Finding cloned root on remote host hpilb09 vxchg_rootid 16:29: Disk c8t4d4 will appear as c7t4d4 on target host hpilb09 vxchg_rootid 16:29: HW path of c7t4d4 on target host is 0/4/0/0.1.3.0.0.4.4 vxchg_rootid 16:29: Setting devpath in /stand/bootconf file to /dev/dsk/c7t4d4 vxchg_rootid 16:29: Current setboot values for remote host hpilb09: vxchg_rootid 16:29: Primary: 0/4/0/0.1.3.0.0.4.3 vxchg_rootid 16:29: Alternate: 0/4/0/0.1.3.0.0.4.2 vxchg_rootid 16:29: Making disk c7t4d4 (0/4/0/0.1.3.0.0.4.4) the primary boot disk vxchg_rootid 16:29: Making Alternate boot disk old primary (0/4/0/0.1.3.0.0.4.3) vxchg_rootid 16:29: Calling /test_script arg1 arg2 hpilb09 /tmp/tmpmnt1.6376. test_script: Args are arg1 arg2 hpilb09 /tmp/tmpmnt1.6376 vxchg_rootid 16:29: Unmounting temporarily mounted file systems. vxchg_rootid 16:29: Deporting rootdg.6376 disk group vxchg_rootid 16:29: Patching Private Region hostid to hpilb09 on disk c8t4d4. vxchg_rootid 16:29: Disk c8t4d4 is now suitable for booting on host hpilb09 SEE ALSO
dd(1), remsh(1), setboot(1M), hosts.equiv(4) VxVM 5.0.31.1 24 Mar 2008 vxchg_rootid(1M)
All times are GMT -4. The time now is 01:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy