This section describes the steps you need to take before removing VERITAS Volume Manager to preserve the contents of the volumes.
Caution Failure to follow the preparations in this section might result in unexpected behavior.
To uninstall VxVM if root, swap, usr, or var is a volume under Volume Manager control
rootvol
, swapvol
, usr
, and var
volumes have only one associated plex each.
The plex must be contiguous, non-striped, non-spanned, and non-sparse. To obtain this information, enter the following:
# vxprint -ht rootvol swapvol usr var
If any of these volumes have more than one associated plex, remove the unnecessary plexes using the following command:
Note
It is important that you have created the plex designated for rootvol
using vxrootmir
, which guarantees that the underlying subdisks start on cylinder boundaries and that partitions are created for them.
The vxunroot
command changes the volume entries in /etc/vfstab
to the underlying disk partitions for rootvol
, swapvol
, usr
, and var
. It also modifies /etc/system
and prompts for a reboot so that disk partitions are mounted instead of volumes for root
, swap
, usr
, and var
.
Continue to the next section if you choose this last option. Otherwise, proceed to Shutting down VERITAS Volume Manager.
To move volumes incrementally to disk partitions
vxdiskadm
, the VEA GUI, or the vxevac
utility.
Evacuation moves subdisks from the specified disks to target disks. The evacuated disks provide the initial free disk space for volumes to be moved to disk partitions.
sync
command to the data on the volume.
format
command.
If there is not enough free space for the partition, add a new disk to the system for the first volume removed. Subsequent volumes can use the free space generated by the removal of this first volume.
dd
.
# dd if=/dev/vx/dsk/
diskgroup
/lhome of=/dev/dsk/c2t2d2s7
where c2t2d2
is the disk outside of Volume Manager and s7
is the newly created partition.
/etc/vfstab
with an entry for the newly created partition.
To check if there are still some subdisks remaining on a particular disk, use the vxprint
command.
# vxprint -F '%sdnum'
diskname
If the output is not 0, there are still some subdisks on this disk that you need to remove. If the output is 0, remove the disk from VERITAS Volume Manager control.
Use the free space created for adding the data from the next volume you want to remove.
vxprint
command.
If any volumes remain open, repeat the steps listed above.
This example shows how to move the data on a volume to a disk partition. In the example, there are three disks: disk1
and disk2
are subdisks on volume vol01
and disk3
is a free disk. The data on vol01
is copied to disk3
using vxevac
.
These are the contents of the disk group voldg
before the data on vol01
is copied to disk3
.
DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
dg voldg default default 115000
1017856044.1141.hostname.veritas.com
dm disk1 c1t12d0s2 sliced 2591 17900352 -
dm disk2 c1t14d0s2 sliced 2591 17899056 -
dm disk3 c1t3d0s2 sliced 2591 17899056 -
v vol1 - ENABLED ACTIVE 4196448 ROUND - fsgen
pl pl1 vol1 ENABLED ACTIVE 4196448 CONCAT - RW
sd sd1 pl1 disk1 0 2098224 0 c1t12d0 ENA
sd sd2 pl1 disk2 0 2098224 2098224 c1t14d0 ENA
# /etc/vx/bin/vxevac -g voldg disk1 disk3
DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
dg voldg default default 115000
1017856044.1141.hostname.veritas.com
dm disk1 c1t12d0s2 sliced 2591 17900352 -
dm disk2 c1t14d0s2 sliced 2591 17899056 -
dm disk3 c1t3d0s2 sliced 2591 17899056 -
v vol1 - ENABLED ACTIVE 4196448 ROUND - fsgen
pl pl1 vol1 ENABLED ACTIVE 4196448 CONCAT - RW
sd disk3-01 pl1 disk3 0 2098224 0 c1t3d0 ENA
sd sd2 pl1 disk2 0 2098224 2098224 c1t14d0 ENA
# /etc/vx/bin/vxevac -g voldg disk2 disk3
DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
dg voldg default default 115000
1017856044.1141.hostname.veritas.com
dm disk1 c1t12d0s2 sliced 2591 17900352 -
dm disk2 c1t14d0s2 sliced 2591 17899056 -
dm disk3 c1t3d0s2 sliced 2591 17899056 -
v vol1 - ENABLED ACTIVE 4196448 ROUND - fsgen
pl pl1 vol1 ENABLED ACTIVE 4196448 CONCAT - RW
sd disk3-01 pl1 disk3 0 2098224 0 c1t3d0 ENA
sd disk3-02 pl1 disk3 2098224 2098224 2098224 c1t3d0 ENA
Remove the evacuated disks from VERITAS Volume Manager control.
c1t3d0s2 sliced disk3 voldg online
c1t12d0s2 sliced disk1 voldg online
c1t14d0s2 sliced disk2 voldg online
Verify that the evacuated disks have been removed from VERITAS Volume Manager control.
c1t3d0s2 sliced disk3 voldg online
Check to see whether the volume you want to move first is mounted.
/vol1 on /dev/vx/dsk/voldg/vol1
read/write/setuid/log/nolargefiles/dev=12dc138 on Wed Apr 3 10:13:11 2002
Create a partition on free disk space of the same size as the volume. In this example, a 2G partition is created on disk1
(c1t12d0s1
).
0. c0t0d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0
1. c1t3d0 <QUANTUM-ATLASIV9SCA-0808 cyl 13814 alt 2 hd 4 sec 324>
/sbus@1f,0/SUNW,fas@2,8800000/sd@3,0
2. c1t9d0 <QUANTUM-ATLASIV9SCA-0808 cyl 13814 alt 2 hd 4 sec 324>
/sbus@1f,0/SUNW,fas@2,8800000/sd@9,0
3. c1t10d0 <QUANTUM-ATLASIV9SCA-0808 cyl 13814 alt 2 hd 4 sec 324>
/sbus@1f,0/SUNW,fas@2,8800000/sd@a,0
4. c1t11d0 <QUANTUM-ATLASIV9SCA-0808 cyl 13814 alt 2 hd 4 sec 324>
/sbus@1f,0/SUNW,fas@2,8800000/sd@b,0
5. c1t12d0 <QUANTUM-ATLASIV9SCA-0808 cyl 13814 alt 2 hd 4 sec 324>
/sbus@1f,0/SUNW,fas@2,8800000/sd@c,0
6. c1t14d0 <QUANTUM-ATLASIV9SCA-0808 cyl 13814 alt 2 hd 4 sec 324>
/sbus@1f,0/SUNW,fas@2,8800000/sd@e,0
7. c1t15d0 <QUANTUM-ATLASIV9SCA-0808 cyl 13814 alt 2 hd 4 sec 324>
/sbus@1f,0/SUNW,fas@2,8800000/sd@f,0
Specify disk (enter its number): 5
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
select - select a predefined table
modify - modify a predefined partition table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
Part Tag Flag Cylinders Size Blocks
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 2.00gb
Ready to label disk, continue? y
Current partition table (unnamed):
Total disk cylinders available: 13814 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
1 unassigned wm 0 - 3236 2.00GB (3237/0/0) 4195152
Copy the data on vol01
to the newly created disk partition.
# dd if=/dev/vx/dsk/voldg/vol01 of=/dev/dsk/c1t12d0s1
In the /etc/vfstab
file, remove the following entry.
/dev/vx/dsk/voldg/vol1 /dev/vx/rdsk/voldg/vol1 /vol1 vxfs 4 yes rw
Replace it with an entry for the newly created partition.
/dev/dsk/c1t12d0s1 /dev/rdsk/c1t12d0s1 /vol01 vxfs 4 yes rw
# mount -F vxfs /dev/dsk/c1t12d0s1 /vol01
Remove vol01
from VERITAS Volume Manager.
# vxedit -rf rm /dev/vx/dsk/voldg/vol01
To complete the procedure, follow Steps 10 through 12 in the previous section, Moving volumes to disk partitions.
To shut down VERITAS Volume Manager