4th Floor, 4 Tabernacle Street London EC2A 4LU

Copying a filesystem with Veritas

Copying a filesystem with Veritas

This procedure is to create an exact copy of a Veritas filesystem.

You will need enough spare disks in your volume group, and ideally anything using the filesystem should be killed.

create a mirror

# vxassist -g tier3dg mirror tier3fs

# vxprint tier3fs
Disk group: tier3dg

TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
v  tier3fs      fsgen        ENABLED  23068672 -        ACTIVE   -       -
pl tier3fs-01   tier3fs      ENABLED  23068672 -        ACTIVE   -       -
sd tier3dg01-01 tier3fs-01   ENABLED  23068672 0        -        -       -
pl tier3fs-02   tier3fs      ENABLED  23068672 -        ACTIVE   -       -
sd tier3dg02-01 tier3fs-02   ENABLED  23068672 0        -        -       -

Disassociate the new plex

# vxplex -g tier3dg dis tier3fs-02

# vxprint -rth
...
dg tier3dg      default      default  84000    1256573785.57.snv24003

dm tier3dg01    c1t5006048C53697741d4s2 auto 65536 104789248 NOHOTUSE
dm tier3dg02    c1t5006048C53697741d5s2 auto 65536 104789248 NOHOTUSE

pl tier3fs-02   -            DISABLED -        23068672 CONCAT    -        RW
sd tier3dg02-01 tier3fs-02   tier3dg02 0       23068672 0         c1t5006048C53697741d5 ENA

v  tier3fs      -            ENABLED  ACTIVE   23068672 SELECT    -        fsgen
pl tier3fs-01   tier3fs      ENABLED  ACTIVE   23068672 CONCAT    -        RW
sd tier3dg01-01 tier3fs-01   tier3dg01 0       23068672 0         c1t5006048C53697741d4 ENA

Make a new volume with the free plex

# vxmake -g tier3dg vol newvol len=23068672 plex=tier3fs-02

# vxprint -rth
...
dg tier3dg      default      default  84000    1256573785.57.snv24003

dm tier3dg01    c1t5006048C53697741d4s2 auto 65536 104789248 NOHOTUSE
dm tier3dg02    c1t5006048C53697741d5s2 auto 65536 104789248 NOHOTUSE

v  newvol       -            DISABLED EMPTY    23068672 ROUND     -        gen
pl tier3fs-02   newvol       DISABLED EMPTY    23068672 CONCAT    -        RW
sd tier3dg02-01 tier3fs-02   tier3dg02 0       23068672 0         c1t5006048C53697741d5 ENA

v  tier3fs      -            ENABLED  ACTIVE   23068672 SELECT    -        fsgen
pl tier3fs-01   tier3fs      ENABLED  ACTIVE   23068672 CONCAT    -        RW
sd tier3dg01-01 tier3fs-01   tier3dg01 0       23068672 0         c1t5006048C53697741d4 ENA

Start the new volume

# vxvol -g tier3dg start newvol

# vxprint -rth
...
dg tier3dg      default      default  84000    1256573785.57.snv24003

dm tier3dg01    c1t5006048C53697741d4s2 auto 65536 104789248 NOHOTUSE
dm tier3dg02    c1t5006048C53697741d5s2 auto 65536 104789248 NOHOTUSE

v  newvol       -            ENABLED  ACTIVE   23068672 ROUND     -        gen
pl tier3fs-02   newvol       ENABLED  ACTIVE   23068672 CONCAT    -        RW
sd tier3dg02-01 tier3fs-02   tier3dg02 0       23068672 0         c1t5006048C53697741d5 ENA

v  tier3fs      -            ENABLED  ACTIVE   23068672 SELECT    -        fsgen
pl tier3fs-01   tier3fs      ENABLED  ACTIVE   23068672 CONCAT    -        RW
sd tier3dg01-01 tier3fs-01   tier3dg01 0       23068672 0         c1t5006048C53697741d4 ENA

Mount it

# mount /dev/vx/dsk/tier3dg/newvol /mnt

# df -k | grep tier3dg
/dev/vx/dsk/tier3dg/tier3fs 11353996   11281 11229176     1%    /tier3fs
/dev/vx/dsk/tier3dg/newvol 11353996