08-30-2011 03:04 PM
Apologies for what is probably a basic question: How do I know I have a mirror?
I set up a disk group and added two disks with the intent that I have the content mirrored between the two. I don't have any training and the support from the vendor we bought the software from doesn't leave me feeling confident. I ran the following commands:
vxdiskadm Select 1) Add or initialize one or more disks Select disk devices to add: [<pattern-list>,all,list,q,?] disk_2 disk_3 Continue operation? y Which disk group? oraldgbl01 Create a new group named oraldgbl01? y Create the disk group as a CDS disk group? y Use default disk names for these disks? n Add disks as spare disks for oraldgbl01? n Exclude disks from hot-relocation use? n Add site tag to disks? n A new disk group will be created named oraldgbl01 and the selected disks will be added to the disk group with disk names that you will specify interactively. disk_2 disk_3 Continue with operation? y The following disk devices appear to have been initialized already. The disks are currently available as replacement disks. Output format: [Device_Name] disk_2 disk_3 Use these devices? Y The following disks you selected for use appear to already have been initialized for the Volume Manager. Please use vxdisk -f init if you want to reinitialize these disks. Enter disk name for disk_2 [<name>,q,?] oraldisk1 VxVM NOTICE V-5-2-120 Creating a new disk group named oraldgbl01 containing the disk device disk_2 with the name oraldisk1. Enter disk name for disk_3 [<name>,q,?] oraldisk2 VxVM NOTICE V-5-2-88 Adding disk device disk_3 to disk group oraldgbl01 with disk name oraldisk2. Add or initialize other disks? n Volume Manager Support Operations Menu: VolumeManager/Disk 1 Add or initialize one or more disks ... Select an operation to perform: q Goodbye. /> vxassist -g oraldgbl01 make u01 150g /> /> mkfs -F vxfs -o bsize=8192,largefiles /dev/vx/rdsk/oraldgbl01/u01 version 7 layout 314572800 sectors, 19660800 blocks of size 8192, log size 8192 blocks largefiles supported /> /> mkdir u01 /> /> mount -F vxfs -o largefiles /dev/vx/dsk/oraldgbl01/u01 /u01 /> cd /u01 /u01> df -h . Filesystem size used avail capacity Mounted on /dev/vx/dsk/oraldgbl01/u01 150G 70M 149G 1% /u01 /u01> /u01> vxdisk list DEVICE TYPE DISK GROUP STATUS disk_0 auto:none - - online invalid disk_1 auto:none - - online invalid disk_2 auto:cdsdisk oraldisk1 oraldgbl01 online disk_3 auto:cdsdisk oraldisk2 oraldgbl01 online eva80000_0 auto:cdsdisk - - online eva80000_1 auto:cdsdisk - - online eva80000_2 auto:cdsdisk - - online eva80000_3 auto:cdsdisk - - online eva80000_4 auto:cdsdisk - - online eva80000_5 auto:cdsdisk - - online /u01> vxprint Disk group: oraldgbl01 TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dg oraldgbl01 oraldgbl01 - - - - - - dm oraldisk1 disk_2 - 585846704 - - - - dm oraldisk2 disk_3 - 585846704 - - - - v u01 fsgen ENABLED 314572800 - ACTIVE - - pl u01-01 u01 ENABLED 314572800 - ACTIVE - - sd oraldisk1-01 u01-01 ENABLED 314572800 0 - - - /u01>
It looks to me like the 150G volume I created is just spanning the two disks and is not actually mirrored on both of them. Comments?
Ken
Solved! Go to Solution.
08-30-2011 03:22 PM
You do not have a mirror and it does not even span both disks - the volume is entirely on oraldisk1.
You can mirror this onto oraldisk2 using:
vxassist -g oraldgbl01 mirror u01 oraldisk2
Or you can remove volume and re-create using:
vxassist -g oraldgbl01 make u01 150g layout=mirror
For a mirror you should see 2 plex records in vxprint so something like:
v u01 fsgen ENABLED 314572800 - ACTIVE - -
pl u01-01 u01 ENABLED 314572800 - ACTIVE - -
sd oraldisk1-01 u01-01 ENABLED 314572800 0 - -
pl u01-02 u01 ENABLED 314572800 - ACTIVE - -
sd oraldisk2-01 u01-01 ENABLED 314572800 0 - -
08-30-2011 03:20 PM
"vxprint -ht u01" suggests the volume is not even spread across disk_2 and disk_3 but entirely contained on disk_2:
/u01> vxprint -ht u01
Disk group: oraldgbl01
V NAME RVG/VSET/CO 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
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
EX NAME ASSOC VC PERMS MODE STATE
SR NAME KSTATE
v u01 - ENABLED ACTIVE 314572800 SELECT - fsgen
pl u01-01 u01 ENABLED ACTIVE 314572800 CONCAT - RW
sd oraldisk1-01 u01-01 oraldisk1 0 314572800 0 disk_2 ENA
08-30-2011 03:22 PM
You do not have a mirror and it does not even span both disks - the volume is entirely on oraldisk1.
You can mirror this onto oraldisk2 using:
vxassist -g oraldgbl01 mirror u01 oraldisk2
Or you can remove volume and re-create using:
vxassist -g oraldgbl01 make u01 150g layout=mirror
For a mirror you should see 2 plex records in vxprint so something like:
v u01 fsgen ENABLED 314572800 - ACTIVE - -
pl u01-01 u01 ENABLED 314572800 - ACTIVE - -
sd oraldisk1-01 u01-01 ENABLED 314572800 0 - -
pl u01-02 u01 ENABLED 314572800 - ACTIVE - -
sd oraldisk2-01 u01-01 ENABLED 314572800 0 - -
08-30-2011 08:16 PM
To check whether you have mirror for a volume, you should see 2 plex (line starts with pl) mainly with the same size (this is important) .... so ideally on a mirrored volume, you would see two plexes with the same size & the overall volume size will be same as well (highlighted below)
in the example above:
v u01 fsgen ENABLED 314572800 - ACTIVE - -
pl u01-01 u01 ENABLED 314572800 - ACTIVE - -
sd oraldisk1-01 u01-01 ENABLED 314572800 0 - -
pl u01-02 u01 ENABLED 314572800 - ACTIVE - -
sd oraldisk2-01 u01-01 ENABLED 314572800 0 - -
If you want to mirror the existing volume, you can use the commands given by mike above ..
G
08-31-2011 07:15 AM
That's awesome, thanks. I ran the following:
/u01> vxassist -g oraldgbl01 mirror u01 oraldisk2
And now I see exactly what was expected:
/u01> vxprint -ht u01 Disk group: oraldgbl01 ... v u01 - ENABLED ACTIVE 314572800 SELECT - fsgen pl u01-01 u01 ENABLED ACTIVE 314572800 CONCAT - RW sd oraldisk1-01 u01-01 oraldisk1 0 314572800 0 disk_2 ENA pl u01-02 u01 ENABLED ACTIVE 314572800 CONCAT - RW sd oraldisk2-01 u01-02 oraldisk2 0 314572800 0 disk_3 ENA