How To Move A Disk Between Diskgroups.

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View How To Move A Disk Between Diskgroups. as PDF for free.

More details

  • Words: 2,262
  • Pages: 8
Document ID: 182857 http://support.veritas.com/docs/182857 How to move a disk between disk groups Details: There are two different methods to accomplish this, depending on whether the data on the disk needs to be preserved or not. One way is described below in this TechNote. Another way is to use Disk Group Split and Join (DGSJ) feature, which is part of FlashSnap and is a licensable feature, and is only available in VERITAS Volume Manager (VxVM) 3.2 and above. Refer to the VxVM 3.2 (and above) Administration Guide for more information on the DGSJ feature. Case #1 - No data on disk: ====== In this case, simply remove the disk from the disk group: vxdg rmdisk disk01 ...and add it to the new disk group: vxdg -g newdg adddisk disk01=c1t2d0s2 ...and then use the disk as usual.

Case #2 - With data on disk to be preserved: ====== It is not technically possible to move a disk between disk groups and maintain the VxVM structures on a disk. However, it is possible to record what those VxVM structures are, move the disk to the new disk group and then recreate the structures on the disk, so that the volumes map the same area on disk as they had in the old disk group. See below for more details. Moving populated

VERITAS Volume Manager disks between disk groups

1. The assumption is to move volumes vol02 and vol04 from the disk group olddg to a new group, newdg. First show that there is data in the volumes (in actuality, rather than a simple string, there would be file system or database structures in the volumes): # dd of=/dev/vx/rdsk/olddg/vol02 conv=sync This is the content of vol02. ^D 0+1 records in 1+0 records out # dd of=/dev/vx/rdsk/olddg/vol04 conv=sync This is the content of vol04. ^D 0+1 records in 1+0 records out

# dd if=/dev/vx/rdsk/olddg/vol02 count=1 This is the content of vol02. 1+0 records in 1+0 records out # dd if=/dev/vx/rdsk/olddg/vol04 count=1 This is the content of vol04. 1+0 records in 1+0 records out 2. Get a list of disks in the disk group to be split: # vxdisk list | grep olddg c1t0d0s2 sliced olddg01 c1t0d1s2 sliced olddg06 c1t1d0s2 sliced olddg04 c1t1d1s2 sliced olddg09 c1t2d0s2 sliced olddg02 c1t2d1s2 sliced olddg07 c1t4d0s2 sliced olddg03 c1t4d1s2 sliced olddg08 c1t5d0s2 sliced olddg05 c1t5d1s2 sliced olddg10

olddg olddg olddg olddg olddg olddg olddg olddg olddg olddg

online online online online online online online online online online

3. Get the configuration: # vxprint -ht -g olddg DG NAME GROUP-ID DM NAME DEVICE V NAME USETYPE PL NAME VOLUME SD NAME PLEX

TYPE PRIVLEN PUBLEN PUBPATH FLAGS KSTATE STATE LENGTH READPOL PREFPLEX KSTATE STATE LENGTH LAYOUT NCOL/WDTH MODE DISK DISKOFFS LENGTH [COL/]OFF FLAGS

dg olddg

782676710.2488.dustbuster

dm dm dm dm dm dm dm dm dm dm

olddg01 olddg02 olddg03 olddg04 olddg05 olddg06 olddg07 olddg08 olddg09 olddg10

c1t0d0s2 c1t2d0s2 c1t4d0s2 c1t1d0s2 c1t5d0s2 c1t0d1s2 c1t2d1s2 c1t4d1s2 c1t1d1s2 c1t5d1s2

v pl sd sd sd

vol01 vol01-01 olddg01-01 olddg02-01 olddg03-01

gen vol01 vol01-01 vol01-01 vol01-01

ENABLED ACTIVE 4194304 SELECT ENABLED ACTIVE 4194304 CONCAT olddg01 0 2050272 0 olddg02 0 2050272 2050272 olddg03 0 93760 4100544 -

v pl sd sd pl sd sd

vol02 vol02-01 olddg08-01 olddg08-02 vol02-02 olddg09-01 olddg09-02

fsgen vol02 vol02-01 vol02-01 vol02 vol02-02 vol02-02

ENABLED ACTIVE 2050268 SELECT ENABLED ACTIVE 2050268 CONCAT olddg08 0 4 LOG olddg08 4 2050268 0 ENABLED ACTIVE 2050268 CONCAT olddg09 0 4 LOG olddg09 4 2050268 0

sliced sliced sliced sliced sliced sliced sliced sliced sliced sliced

2015 2015 2015 2015 2015 2015 2015 2015 2015 2015

2050272 2050272 2050272 2050272 2050272 2050272 2050272 2050272 2050272 2050272

/dev/rdsk/c1t0d0s4 /dev/rdsk/c1t2d0s4 /dev/rdsk/c1t4d0s4 /dev/rdsk/c1t1d0s4 /dev/rdsk/c1t5d0s4 /dev/rdsk/c1t0d1s4 /dev/rdsk/c1t2d1s4 /dev/rdsk/c1t4d1s4 /dev/rdsk/c1t1d1s4 /dev/rdsk/c1t5d1s4

-

-

RW

RW

-

-

RW

v vol03 pl vol03-01 sd olddg10-01

fsgen vol03 vol03-01

ENABLED ACTIVE 1024000 SELECT ENABLED ACTIVE 1024000 CONCAT olddg10 0 1024000 0

-

v pl sd sd sd sd

fsgen vol04 vol04-01 vol04-01 vol04-01 vol04-01

ENABLED ACTIVE 4194304 SELECT ENABLED ACTIVE 4194304 STRIPE olddg04 0 1048576 0/0 olddg05 0 1048576 1/0 olddg06 0 1048576 2/0 olddg07 0 1048576 3/0

vol04-01 4/128 RW -

vol04 vol04-01 olddg04-01 olddg05-01 olddg06-01 olddg07-01

-

RW

-

4. Determine which disks contain the volumes to be moved. Insure that all volume allocations are self-contained in the set of disks to be moved. In this case, the volumes are contained on disks olddg04 through olddg09, with no unassociated plexes or subdisks, and no allocations which cross out of this set of disks. 5. Save the configuration in a format that can be plugged back into the vxmake utility. Specify all volumes on the disks in question (plus any unassociated plexes and their child subdisks, plus any unassociated subdisks). # vxprint -hmvpsQq -g olddg vol02 vol04 > movers If

layered volumes,

use the following:

#vxprint -hmvpsQqr -g olddg vol02 vol04 > movers Note: The vxprint -r option was not available in version 2.x. only apply for version 3.x and above.

This option will

6. Unmount the appropriate file systems, and/or stop the processes which hold the volumes open. 7. Stop the volumes. # vxvol -g olddg stop vol02 vol04 8. Remove from the configuration database the definitions of the structures (volumes, plexes, subdisks) to be moved. (NOTE that this does not affect the data.) # vxedit -g olddg -r rm vol02 vol04 9. Remove the disks from the original disk group: # vxdg -g olddg rmdisk olddg04 olddg05 olddg06 olddg07 olddg08 olddg09 10. Initialize the new disk group using one of the disks. DO NOT reinitialize the disk itself (vxdisk init). (If moving the disks to a disk group that already exists, skip this step.) It is simplest to keep their old names until a later step. # vxdg init newdg olddg04=c1t1d0s2 11. Add the rest of the moving disks to the new disk group: # vxdg -g newdg adddisk olddg05=c1t5d0s2 # vxdg -g newdg adddisk olddg06=c1t0d1s2

# vxdg -g newdg adddisk olddg07=c1t2d1s2 olddg08=c1t4d1s2 olddg09=c1t1d1s2 12. See the disks in the new disk group: # vxdisk list | grep newdg c1t0d1s2 sliced olddg06 c1t1d0s2 sliced olddg04 c1t1d1s2 sliced olddg09 c1t2d1s2 sliced olddg07 c1t4d1s2 sliced olddg08 c1t5d0s2 sliced olddg05

newdg newdg newdg newdg newdg newdg

online online online online online online

13. Reload the object configuration into the new disk group: # vxmake -g newdg -d movers 14. Bring the volumes back on-line: # vxvol -g newdg init active vol02 # vxvol -g newdg init active vol04 15. Observe the configuration of the new disk group: # vxprint -ht -g newdg DG NAME GROUP-ID DM NAME DEVICE V NAME USETYPE PL NAME VOLUME SD NAME PLEX

TYPE PRIVLEN PUBLEN PUBPATH FLAGS KSTATE STATE LENGTH READPOL PREFPLEX KSTATE STATE LENGTH LAYOUT NCOL/WDTH MODE DISK DISKOFFS LENGTH [COL/]OFF FLAGS

dg newdg

782682285.2491.dustbuster

dm dm dm dm dm dm

olddg04 olddg05 olddg06 olddg07 olddg08 olddg09

c1t1d0s2 c1t5d0s2 c1t0d1s2 c1t2d1s2 c1t4d1s2 c1t1d1s2

v pl sd sd pl sd sd

vol02 vol02-01 olddg08-01 olddg08-02 vol02-02 olddg09-01 olddg09-02

fsgen vol02 vol02-01 vol02-01 vol02 vol02-02 vol02-02

ENABLED ACTIVE 2050268 SELECT ENABLED ACTIVE 2050268 CONCAT olddg08 0 4 LOG olddg08 4 2050268 0 ENABLED ACTIVE 2050268 CONCAT olddg09 0 4 LOG olddg09 4 2050268 0

v pl sd sd sd sd

vol04 vol04-01 olddg04-01 olddg05-01 olddg06-01 olddg07-01

fsgen vol04 vol04-01 vol04-01 vol04-01 vol04-01

ENABLED ACTIVE 4194304 SELECT ENABLED ACTIVE 4194304 STRIPE olddg04 0 1048576 0/0 olddg05 0 1048576 1/0 olddg06 0 1048576 2/0 olddg07 0 1048576 3/0

sliced sliced sliced sliced sliced sliced

2015 2015 2015 2015 2015 2015

2050272 2050272 2050272 2050272 2050272 2050272

/dev/rdsk/c1t1d0s4 /dev/rdsk/c1t5d0s4 /dev/rdsk/c1t0d1s4 /dev/rdsk/c1t2d1s4 /dev/rdsk/c1t4d1s4 /dev/rdsk/c1t1d1s4 -

-

RW

-

-

RW

vol04-01 4/128 RW -

16. Test the data. Remember that the device names have changed to refer to newdg instead of olddg; it is necessary to modify /etc/vfstab and/or the database configurations to reflect this. Then mount the file systems, start the database engines, etc:

# dd if=/dev/vx/rdsk/newdg/vol02 count=1 This is the content of vol02. 1+0 records in 1+0 records out # dd if=/dev/vx/rdsk/newdg/vol04 count=1 This is the content of vol04. 1+0 records in 1+0 records out 17. Note that the original database is intact, though the disk naming is a bit odd. The disks and their subdisks can be renamed to reflect the change. This is optional. # vxprint -ht -g olddg DG NAME GROUP-ID DM NAME DEVICE V NAME USETYPE PL NAME VOLUME SD NAME PLEX

TYPE PRIVLEN PUBLEN PUBPATH FLAGS KSTATE STATE LENGTH READPOL PREFPLEX KSTATE STATE LENGTH LAYOUT NCOL/WDTH MODE DISK DISKOFFS LENGTH [COL/]OFF FLAGS

dg olddg

782676710.2488.dustbuster

dm dm dm dm

olddg01 olddg02 olddg03 olddg10

c1t0d0s2 c1t2d0s2 c1t4d0s2 c1t5d1s2

v pl sd sd sd

vol01 vol01-01 olddg01-01 olddg02-01 olddg03-01

gen vol01 vol01-01 vol01-01 vol01-01

ENABLED ACTIVE 4194304 SELECT ENABLED ACTIVE 4194304 CONCAT olddg01 0 2050272 0 olddg02 0 2050272 2050272 olddg03 0 93760 4100544 -

v vol03 pl vol03-01 sd olddg10-01

fsgen vol03 vol03-01

ENABLED ACTIVE 1024000 SELECT ENABLED ACTIVE 1024000 CONCAT olddg10 0 1024000 0

sliced sliced sliced sliced

2015 2015 2015 2015

2050272 2050272 2050272 2050272

/dev/rdsk/c1t0d0s4 /dev/rdsk/c1t2d0s4 /dev/rdsk/c1t4d0s4 /dev/rdsk/c1t5d1s4

RW

-

-

RW

# vxedit rename olddg10 olddg04 # vxprint -g olddg -s -e "name~/olddg10/" TYPE NAME ASSOC KSTATE LENGTH COMMENT sd olddg10-01 vol03-01 1024000 # vxedit rename olddg10-01 olddg04-01 # vxprint -g olddg -ht DG NAME GROUP-ID DM NAME DEVICE V NAME USETYPE PL NAME VOLUME SD NAME PLEX

TYPE PRIVLEN PUBLEN PUBPATH FLAGS KSTATE STATE LENGTH READPOL PREFPLEX KSTATE STATE LENGTH LAYOUT NCOL/WDTH MODE DISK DISKOFFS LENGTH [COL/]OFF FLAGS

dg olddg

782676710.2488.dustbuster

dm olddg01 dm olddg02 dm olddg03

c1t0d0s2 c1t2d0s2 c1t4d0s2

sliced sliced sliced

2015 2015 2015

2050272 2050272 2050272

/dev/rdsk/c1t0d0s4 /dev/rdsk/c1t2d0s4 /dev/rdsk/c1t4d0s4

-

dm olddg04 v pl sd sd sd

c1t5d1s2

sliced

2015

2050272

/dev/rdsk/c1t5d1s4

vol01 vol01-01 olddg01-01 olddg02-01 olddg03-01

gen vol01 vol01-01 vol01-01 vol01-01

ENABLED ACTIVE 4194304 SELECT ENABLED ACTIVE 4194304 CONCAT olddg01 0 2050272 0 olddg02 0 2050272 2050272 olddg03 0 93760 4100544 -

v vol03 pl vol03-01 sd olddg04-01

fsgen vol03 vol03-01

ENABLED ACTIVE 1024000 SELECT ENABLED ACTIVE 1024000 CONCAT olddg04 0 1024000 0

RW

-

-

RW

18. Do the same for the disks in newdg and their subdisks: # vxprint -g newdg -s TYPE NAME ASSOC sd olddg04-01 vol04-01 sd olddg05-01 vol04-01 sd olddg06-01 vol04-01 sd olddg07-01 vol04-01 sd olddg08-01 vol02-01 sd olddg08-02 vol02-01 sd olddg09-01 vol02-02 sd olddg09-02 vol02-02

-

KSTATE

# vxprint -g newdg -e "name~/olddg/" TYPE NAME ASSOC KSTATE sd olddg04-01 vol04-01 sd olddg05-01 vol04-01 sd olddg06-01 vol04-01 sd olddg07-01 vol04-01 sd olddg08-01 vol02-01 sd olddg08-02 vol02-01 sd olddg09-01 vol02-02 sd olddg09-02 vol02-02 # # # # # # # # # # # # # #

vxedit vxedit vxedit vxedit vxedit vxedit vxedit vxedit vxedit vxedit vxedit vxedit vxedit vxedit

rename rename rename rename rename rename rename rename rename rename rename rename rename rename

LENGTH COMMENT 1048576 1048576 1048576 1048576 4 2050268 4 2050268 LENGTH COMMENT 1048576 1048576 1048576 1048576 4 2050268 4 2050268

olddg04 newdg01 olddg05 newdg02 olddg06 newdg03 olddg07 newdg04 olddg08 newdg05 olddg09 newdg06 olddg04-01 newdg01-01 olddg05-01 newdg02-01 olddg06-01 newdg03-01 olddg07-01 newdg04-01 olddg08-01 newdg05-01 olddg09-01 newdg06-01 olddg08-02 newdg05-02 olddg09-02 newdg06-02

# vxprint -g newdg -ht DG NAME GROUP-ID DM NAME DEVICE V NAME USETYPE PL NAME VOLUME SD NAME PLEX

TYPE PRIVLEN PUBLEN PUBPATH FLAGS KSTATE STATE LENGTH READPOL PREFPLEX KSTATE STATE LENGTH LAYOUT NCOL/WDTH MODE DISK DISKOFFS LENGTH [COL/]OFF FLAGS

dg newdg

782682285.2491.dustbuster

dm dm dm dm dm dm

newdg01 newdg02 newdg03 newdg04 newdg05 newdg06

c1t1d0s2 c1t5d0s2 c1t0d1s2 c1t2d1s2 c1t4d1s2 c1t1d1s2

v pl sd sd pl sd sd

vol02 vol02-01 newdg05-01 newdg05-02 vol02-02 newdg06-01 newdg06-02

fsgen vol02 vol02-01 vol02-01 vol02 vol02-02 vol02-02

ENABLED ACTIVE 2050268 SELECT ENABLED ACTIVE 2050268 CONCAT newdg05 0 4 LOG newdg05 4 2050268 0 ENABLED ACTIVE 2050268 CONCAT newdg06 0 4 LOG newdg06 4 2050268 0

v pl sd sd sd sd #

vol04 vol04-01 newdg01-01 newdg02-01 newdg03-01 newdg04-01

fsgen vol04 vol04-01 vol04-01 vol04-01 vol04-01

ENABLED ACTIVE 4194304 SELECT ENABLED ACTIVE 4194304 STRIPE newdg01 0 1048576 0/0 newdg02 0 1048576 1/0 newdg03 0 1048576 2/0 newdg04 0 1048576 3/0

sliced sliced sliced sliced sliced sliced

2015 2015 2015 2015 2015 2015

2050272 2050272 2050272 2050272 2050272 2050272

/dev/rdsk/c1t1d0s4 /dev/rdsk/c1t5d0s4 /dev/rdsk/c1t0d1s4 /dev/rdsk/c1t2d1s4 /dev/rdsk/c1t4d1s4 /dev/rdsk/c1t1d1s4 -

-

RW

-

-

RW

vol04-01 4/128 RW -

Related Documents: 247777: One way to recover volumes in rootdg after vxinstall has been run http://support.veritas.com/docs/247777 Products Applied: Volume Manager for UNIX/Linux 2.5 (Solaris), 3.0 (Solaris), 3.0.1 (Solaris), 3.0.2 (Solaris), 3.0.2.1(Solaris), 3.0.3 (Solaris), 3.0.4 (Solaris), 3.0.4+P05 (Solaris), 3.1 (Solaris), 3.1.1 P02 (Solaris), 3.1.1 P03 (Solaris), 3.1.1 P03 Localized, 3.1.1 P04 (Solaris), 3.1.1(Solaris), 3.2 (Solaris), 3.2 P01(Solaris), 3.2 P02 (Solaris), 3.2 U1(Linux), 3.2 U2 (Linux), 3.2s9 (Solaris), 3.5 (Solaris) Last Updated: October 09 2002 06:37 PM GMT Expires on: 365 days from publish date Subscribe Via E-Mail IconSubscribe to receive critical updates about this document Subjects: Volume Manager for UNIX/Linux Application: Configuration, How To Languages: English (US) Operating Systems: Solaris 2.5.1, 2.6, 7.0 (32-bit), 8.0 (32-bit), 9.0 (32-bit) Symantec World Headquarters: 20330 Stevens Creek Blvd. Cupertino, CA 95014 World Wide Web: http://www.symantec.com, Tech Support Web: http://entsupport.symantec.com,

E-Mail Support: http://seer.entsupport.symantec.com/email_forms, FTP: ftp://ftp.entsupport.symantec.com or http://ftp.entsupport.symantec.com THE INFORMATION PROVIDED IN THE SYMANTEC SOFTWARE KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. SYMANTEC SOFTWARE DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SYMANTEC SOFTWARE OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES,EVEN IF SYMANTEC SOFTWARE OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Related Documents