BCV Quick Reference


Command Quick Reference Guide for

Symmetrix Local Replication “TimeFinder Solutions”







1. SymCli

EMC - Base SymCli

List symcli commands

symcli –v

List this hosts devices

syminq

Create symapi database

symcfg discover

Create regular device

group

symdg create <group name>

Create an R1 device group

symdg –type RDF1 create <namedg>

Create an R2 device group

symdg –type RDF2 create <namedg>

List symcli gatekeepers

symgate list

Define a symcli

gatekeeper

symgate define dev xxx

Add devices to a device

group

symld –g <namedg> add dev xxx

Display verbose output of

a device group

symdg show <namedg>

Delete a device group

symdg –f –g <namedg> delete

Give verbose output for a

Symmetrix device

symdev show <device>

List BCVs this host owns

symbcv list pd

Associate BCVs with a

device group

symbcv –g <group name> associate <device>

Display general Symm

information.

symcfg list

Display RA/RF

information.

symcfg –RA all list

Control RA/RF link.

symcfg –RA all <online/offline>

Display Symmetrix

statistics.

symstat –type <-g dgname> -i <#> -

c<#>

2. EMC-SRDF

EMC – SRDF – Command Line Interface

List RDF devices this host

owns

symrdf list pd

Show RDF state of

devices in a group

symrdf –g <namedg> query

Perform an SRDF

establish

symrdf –g <namedg> establish

Perform an SRDF restore

symrdf –g <namedg> restore

Perform an SRDF split

symrdf –g <namedg> split

Perform an SRDF suspend

symrdf –g <namedg> suspend

Peform an SRDF resume

symrdg –g <namedg> resume

List the SRDF devices in

the local Symmetrix

symrdf list

Perform an SRDF failover

symrdf –g <namedg> failover

Perform an SRDF failback

symrdf –g <namedg> failback

Perform an SRDF update

symrdf –g <namedg> update

Set the SRDF method for

synchronizing volumes

symrdf –g <namedg> set mode sync

Set device group pairs to

domino mode

symrdf –g <namedg> set domino on

Set device group pairs to

adaptive copy disk mode.

symrdf –g <namedg> set acp_disk skew xx



3. EMC-TimeFinder

EMC - TimeFinder Command Line Interface

Perform a full establish

between 1 BCV pair in a

device group

symmir –g <namedg> –full establish DEV xxx

bcv DEV xxx

Query the TimeFinder

state of pairs in a device

group

symmir –g <namedg> query

Perform a TimeFinder split

on one BCV in a device

group

symmir –g <namedg> split DEV xxx

Perform a full restore on

the BCV pairs in a device

group

symmir –g <namedg> –full restore

Perform a full establish on

the BCV pairs in the

device group

symmir –g <namedg> –full establish

Query the multi-BCV pair

states in the device group

symmir –g <namedg> query –multi

Perform a consistent

instant split on the

devices in the device

group which comprise an

Oracle database.

symmir -g <namedg> split -instant -dbtype

oracle



4. Veritas

Disk Operations - Veritas

Initialize the disk vxdisksetup –i <device>

vxdiskadd <device>

vxdiskadm option 1 “Add or Initialize one or

more disks”

Uninitialize disk

vxdiskunsetup <device>

List disks

vxdisk list

List disk header

vxdisk list <diskname/device>

Ready disks for VxVM

vxdctl enable

Disk Group Operations - Veritas

Create disk group

vxdg init diskgroup diskname=<device>

Add disk to disk group

vxdg –g diskgroup adddisk diskname=<device>

Deport disk group

vxdg deport diskgroup

Import disk group

vxdg import diskgroup

Destroy disk group

vxdg destroy diskgroup

List disk group

vxdg list

List specific disk group

details

vxdg list diskgroup

Remove disk from disk

group

vxdg –g diskgroup rmdisk diskname

Subdisk Operations - Veritas

Create a subdisk vxmake –g diskname sd subdiskname diskname

offset length

Remove a subdisk

vxedit – g diskgroup rm subdisk_name

Display subdisk info vxprint –st

vxprint –l subdisk_name

Associate a subdisk to a

plex

vxsd assoc plex_name subdisk_name

Dissociate a subdisk

vxsd disk subdisk_name

Plex Operations - Veritas

Create a plex vxmake –g diskgroup plex plex_name

sd=subdisk_name

Associate a plex to a Vol vxplex –g diskgroup att volume_name

plex_name

Dissociate a plex

vxplex dis plex_name

Remove a plex

vxedit –g diskgroup rm plex_name

List all plexes

vxprint –lp

Detach a plex

vxplex –g diskgroup det plex_name

Attach a plex vxplex –g diskgroup att volume_name

plex_name

Volume Operations - Veritas

Create a volume vxassist –g diskgroup make vol_name size

layout=format disk_name

vxmake –g diskgroup vol vol_name len=size

plex plex_name

Remove a volume

vxedit –g diskgroup rm vol_name

Display a volume vxprint –g diskgroup –vt volume_name

vxprint –g diskgroup –l volume_name

Change volume attributes vxedit –g diskgroup set field=value

volume_name

vxvol field=value ,, volume_name

Resize a volume vxassist –g disgroup growto volume_name

new_length

vxassist –g disgroup growby volume_name

new_length

vxassist –g disgroup shrinkto volume_name

new_length

vxassist –g disgroup shrinkby volume_name

new_length



Change volume read

policy

vxvol –g diskgroup rdpol round vol_name

vxvol –g diskgroup rdpol perfer vol_name

perferrred_plex_name

vxvol –g diskgroup rdpol select vol_name

Start/Stop volumes

Start all vol

Start all vol in a dg

Stop a vol

Stop all vol

Recover a vol

vxvol start volume_name

vxvol startall

vxvl –g diskgroup startall

vxvol stop volume_name

vxvol stopall

vxrecover –an volume_name

List unstartable vol’s

vxinfo volume_name

Mirror an existing plex vxassist –g diskgroup mirror volume_name

vxmake –g diskgroup plex plex_name

sd=subdisk_name

vxplex –g diskgroup att volume_name

plex_name

Snapshot a volume vxassist –g diskgroup –g snapshot

volume_name

vxassist –g diskgroup snapshot volume_name

new_vol

Add a log to a volume

vxassist –g diskgroup addlog volume_name

Installing - Veritas

View license keys vxlicense -p

Add a license key

vxlicense -c

Install VxFS packages pkgadd –d path_name product_packages

Example

# pkgadd –d /cdrom/CD_name/pkgs VRTSlic

VRTSvxfs

Remove VxFS packages pkgrm product_packages

Example

# pkgrm VRTSlic VRTSvxfs

List all inst. packages

pkginfo

List all Vx inst packages

pkging |grep VRTS

Display package details pkginfo –l product_package

Example

# pkginfo –l VRTSvxfs

Setting up a File system- Veritas

Create a Veritas file

system

Options

-o N

-o largefiles

-o version=n

-o bsize=size

-o logsize=size

mkfs [-F vxfs] [grneric_options] [-o

specific_options] special [size]

Example

mkfs –F vxfs /dev/vx/rdsk/datadg/datavol

Check VxFS structure without writing to

device.

Create VxFS that supports large files.

Create VxFS with different layout version.

Create VXFS with a specific block size.

(block size bytes)

Create a VxFS with a specific logging area

size.

Mount a VX file system mount [-F vxfs] ] [grneric_options] [-o

specific_options]

[-r] special mount point

Example

mount –F vxfs /dev/vx/dsk/d_dg/d_vol

/mount_point

List mounted file systems mount –v

df –k (sun)

bdf (hp)

List mounted file systems

in the vfstab format

mount -p

Unmount a mounted file

system

umount [special mount point]

Example

umount /mount_point

Unmount all mounted file

systems

umount –a

Determine the file system

type

fstyp [-v] special

Example

fstyp /dev/dsk/c0t1d1s0

Report free disk blocks df [-F vxfs] ] [grneric_options] [-o s]

and inodes [special mount point]

Example

fstyp /mount_point

Check / Repair a file

system

fsck [-F vxfs] ] [grneric_options] [-y | Y]

[-n |N] special

Example

fsck –F vxfs /dev/vx/rdsk/d_dg/d_vol

OnLine Adminstration- Veritas

Resize a Veritas file

system

/usr/lib/fs/fs_type/fsadm [-b newsize] [-r

rawdev mount_point

Example

/usr/lib/fs/fs_type/fsadm –b 1024000 –r

/dev/vx/rdsk/d_dg/d_vol /mount_point

/etc/vx/bin/vxresize [-bsx] [-F vxfs] [ -g

diskgroup] volume new_length

Example

/etc/vx/bin/vxresize –F vxfs –g d_dg 5g

Dump a file system

vxdump [options] mount_point

Restore a file system

vxrestore [options] mount_point

Create a snapshot file

system

mount [-F vxfs] –o snapof=source,

[snapsize=size] destination snap_mount_point

Example

mount –F vxfs –o snapof=/dev/dsk/cxtxdxsx

snapsize=32768 /dev/dsk/cxtxdxsx /snapmount

mount –F vxfs –o

snapof=/dev/vx/rdsk/d_dg/d_vol

/dev/vx/dsk/d_dg/snapvol /snapmount

Backup a snapshot file

system

vxdump [options] snap_mount_point

Example

vxdump –cf /dev/rmt/00m /snapmount

Create a storage

Checkpoint

fsckptadm [-nruv] create ckpt_name

mount_point

List storage checkpoints

fsckptadm [-clv] list mount_points

Remove a storage

checkpoint

fsckptadm [-sv]remove ckpt_name mount_point

Mount a storage

checkpoint

mount –F vxfs –o ckpt=ckpt_name

pseudo_device mount_pt umount mount_point

umount a storage

checkpoint

umount mount_point

Change checkpoint

attributes

fsckptadm [-sv] set [nodata | nomount |

remove ckpt_name

Upgrade the Vxfs layout vxupgrade [-n new_version] [-r rawdev]

mount_point

vxupgrade –n 4 /mnt

Display layout ver num

vxupgrade /mnt

5. Oracle

SQL - Oracle

Startup or shut down the

oracle database from the

internal account

SQL> connect internal - startup/shutdown

List from a table SQL > select from

<> where ;

SQL > select tablespace_name,status from

dba_tablespaces;

SQL> select username from dba_users;

Create an asci control file SQL> alter database backup controlfile to

trace;

List the Oracle data files

SQL> select * from v$datafile;

List the table structure

SQL> desc
<>;

Delete all records from a

table

SQL> truncate table
<>;

Add a record to a table SQL> insert into table


<>(‘xxx’,’xxx’,null);

Modify an existing record

in a table

SQL> update
<> set =

where = ;

Remove a record from a

table

SQL> delete from
<> where

name> = ;

To list the archive file list

SQL> archive log list

To activate Oracle archive SQL> connect / as sysdba

shutdown

startup mount

alter database archivelog;

alter database open;

Invoke the sql loader

utility

# sqlldr

file>



6. IBM – AIX (LVM)

IBM – AIX – (Volume Groups, Logical Volumes and

Filesystem Creation)

Initialize Physical Volume

chdev –l hdisk# –a pv=yes

(AIX will automatically add a PVID to a disk when it is added to a

Volume Group, therefore this step is not necessary)

Create Volume Group

smitty mkvg or mkvg –y myvg –s 16 hdisk#

(The VGDA information is recorded on all the physical volumes)

Add additional Physical

Volumes to Volume Group

(optional)

extendvg myvg hdisk# hdisk#

Create Logical Volume

smitty mklv or mklv –y mylv myvg 16

Add File System to

Logical Volume

smitty crfs or crfs –v jfs –d mylv –m /myfs

Mount a File System

mount /myfs

Unmount a File System

mount /myfs

IBM – AIX – (Activate, Deactivate, Export, Import and

Remove Volume Groups)

Activate Volume Group

varyonvg myvg

Deactivate Volume Group

varyoffvg myvg

Export Volume Group

exportvg myvg

Import Volume Group

importvg -y myvg –f /dev/hdisk#

IBM – AIX – (Accessing BCV data on the same host as the

source volume)

Use the recreatevg utility to resolve the duplicate PVIDs on the BCVs

and to create the Volume Group, logical volume and file system on

the BCVs while preserving the existing data.

# recreatevg -y mybcvvg -Y mybcv_ -L /mybcv

hdisk# hdisk#

The –y option specifies the name of the Volume Group on the BCVs

The –Y option specifies the pre-fix to be added to the names of the

logical volumes that exist in the Volume Group on the BCVs.

The –L option specifies the directory under which the mount point

for the file system on the BCVs are to be created.



7. HPux (LVM)

HPux (Volume Groups, Logical Volumes and File System

Creation)

Initialize Physical Volume

pvcreate /dev/rdsk/c1t1d0

Create Volume Group

Create directory entry in /dev for Volume Group

mkdir /dev/myv

Create group file for Volume Group

mknod /dev/myvg/group c 64 0x010000 (Make sure

VG minor number is unique)

Create Volume Group structures on disk

vgcreate -s 16 /dev/myvg /dev/dsk/c1t0d0

Add additional Physical

Volumes to Volume Group

(optional)

vgextend /dev/myvg /dev/dsk/c1t0d1

/dev/dsk/c1t0d2

Create Logical Volume

lvcreate -l 16 -n mylv /dev/myvg

Add File System to

Logical Volume

newfs /dev/myvg/rmylv

Mount a File System

mkdir /myfs

mount /dev/myvg/mylv /myfs

Unmount a File System

umount /myfs

HPux (Activate, Deactivate, Export, Import and Remove

Volume Groups)

Activate Volume Group

vgchange -a y myvg

Deactivate Volume Group

vgchange -a n myvg

Export Volume Group

vgexport mystdvg

Import Volume Group

vgimport myvg /dev/dsk/c#t#d#

/dev/dsk/c#t#d#

HPux (Accessing BCV data on the same host as the

source volume)

Change the Volume Group ID on all the BCVs that make up your

Volume Group. Note: The “raw” device file must be used in the

command line.

# vgchgid /dev/rdsk/c#t#d# /dev/rdsk/c#t#d#

************************************************************


Comments

Popular Posts