How to add a Dirty Region Log (DRL) to an existing volume using vxassist and vxmake

book

Article ID: 100004713

calendar_today

Updated On:

Resolution

 
Considering an example as below wherein the below volume (mirvol) in question is without a DRL:
 
# vxprint -th mirvol
 
v mirvol - ENABLED ACTIVE 20480 SELECT - fsgen
pl mirvol-01 mirvol ENABLED ACTIVE 20800 CONCAT - RW
sd c2t0d19s2-05 mirvol-01 c2t0d19s2 158080 20800 0 c3t18d19 ENA
pl mirvol-02 mirvol ENABLED ACTIVE 20800 CONCAT - RW
sd c2t15d0s2-04 mirvol-02 c2t15d0s2 42640 20800 0 c3t18d27 ENA
 
To add a DRL log, run the below command
 
# vxassist -g addlog
 
e.g.
 
# vxassist -g testdg addlog mirvol
 
Verify the DRL log using  # vxprint -th mirvol
Disk group: sundg
 
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
 
v mirvol - ENABLED ACTIVE 20480 SELECT - fsgen
pl mirvol-01 mirvol ENABLED ACTIVE 20800 CONCAT - RW
sd c2t0d19s2-05 mirvol-01 c2t0d19s2 158080 20800 0 c3t18d19 ENA
pl mirvol-02 mirvol ENABLED ACTIVE 20800 CONCAT - RW
sd c2t15d0s2-04 mirvol-02 c2t15d0s2 42640 20800 0 c3t18d27 ENA
pl mirvol-03 mirvol ENABLED ACTIVE LOGONLY CONCAT - RW <----
sd c2t0d19s2-06 mirvol-03 c2t0d19s2 34176 33 LOG c3t18d19 ENA <----
 
The bottom two lines of the volume now reflect the log's presence
 
There may be reasons when a DRL needs to be set to a specific size and on a specific disk.
 
If this is the case, then it is best to make the log subdisk using the vxmake command since this command offers more flexibility.
 
For instance, the following command can be run again to add an additional DRL
 
# vxassist -g testdg addlog mirvol
 
 # vxprint -th mirvol
Disk group: sundg
 
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
 
v mirvol - ENABLED ACTIVE 20480 SELECT - fsgen
pl mirvol-01 mirvol ENABLED ACTIVE 20800 CONCAT - RW
sd c2t0d19s2-05 mirvol-01 c2t0d19s2 158080 20800 0 c3t18d19 ENA
pl mirvol-02 mirvol ENABLED ACTIVE 20800 CONCAT - RW
sd c2t15d0s2-04 mirvol-02 c2t15d0s2 42640 20800 0 c3t18d27 ENA
pl mirvol-03 mirvol ENABLED ACTIVE LOGONLY CONCAT - RW
sd c2t0d19s2-06 mirvol-03 c2t0d19s2 34176 33 LOG c3t18d19 ENA
pl mirvol-04 mirvol ENABLED ACTIVE LOGONLY CONCAT - RW
sd c2t0d17s2-07 mirvol-04 c2t0d17s2 42496 33 LOG c3t18d17 ENA <--- new DRL
 
 
In the event where the secondary DRL log plex is not the same size as the primary DRL log plex (not the case here), or the log plex needs to be placed on an alternative disk, follow the procedure below (this makes use of the volume above):
 
1. Dissociate the secondary DRL plex from the volume:
 
# vxplex -g dis
 
# vxplex -g sundg dis mirvol-04
 
 
2. Remove the DRL plex:
 
# vxedit -g -rf rm
 
# vxedit -g sundg -rf rmmirvol-04
 
 
3. Create the DRL subdisk from the bottom up:
 
# vxmake -g sd ,,
 
# vxmake -g sundg sd newlogsdc3t0d29s2,8064000,33 (the values are derived from the command vxdg freeto determine where free space is available)
 
4. Create a plex from the DRL subdisk:
 
# vxmake -g plex log_sd=
 
# vxmake -g sundg plex newlogplexlog_sd=newlogsd
 
5. Associate the DRL plex to the volume:
 
# vxplex -g att
 
# vxplex -g sundg att mirvol newlogplex
 
 
The final vxprint reveals the log plex on a different disk as seen below in the last two lines
 
# vxprint -th mirvol
Disk group: sundg
 
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
 
v mirvol - ENABLED ACTIVE 20480 SELECT - fsgen
pl mirvol-01 mirvol ENABLED ACTIVE 20800 CONCAT - RW
sd c2t0d19s2-05 mirvol-01 c2t0d19s2 158080 20800 0 c3t18d19 ENA
pl mirvol-02 mirvol ENABLED ACTIVE 20800 CONCAT - RW
sd c2t15d0s2-04 mirvol-02 c2t15d0s2 42640 20800 0 c3t18d27 ENA
pl mirvol-03 mirvol ENABLED ACTIVE LOGONLY CONCAT - RW
sd c2t0d19s2-06 mirvol-03 c2t0d19s2 34176 33 LOG c3t18d19 ENA
pl newlogplex mirvol ENABLED ACTIVE LOGONLY CONCAT - RW
sd newlogsd newlogplex c3t0d29s2 8064000 33 LOG c3t18d29 ENA
 
 
 
 

 

Issue/Introduction

There are instances when a DRL log needs to be added to an already existing volume. This can be achieved using vxassist and vxmake cmdlets