Previous Topic: Work-around for AppLogic Microsoft Product Key Injection Utility for Windows 2012Next Topic: Working with Controller Volume Streams - 3tsrv sd get


Working with Application Volume Streams - ctlmeta

Summary: the CTL Meta command is used when you have all your volume streams in error. When all your volume streams are in an error state, your application will not start. With CTL Meta you can mark one volume stream as ok. So that you can start your application again.

Stop automated vol repairs for 2 hours: 3t vol repair --suspend time=120

root@xeex tmp# 3t vol info set1:WIN08EM.boot

Name : set1:WIN08EM.boot

Comment :

UUID : 5f2fbefe-dfb3-42ae-8198-3ffa020855e7

Size : 100.00 GB

State : error

Filesystem : none

Mount State : available

Mounted Device : none

Current Users : 0

Time Created : Thu Dec 23 15:53:08 2010

Time Written : Thu Dec 23 14:53:03 2010

Time Accessed : Wed Aug 31 04:46:15 2011

Number Mirrors : 2

Mirrors :

Server State

srv1 error

srv2 error

When the customer tries to start the application, it will fail as no volume streams are available. In the above case server2 had a harddisk crash and for some reason the stream on server1 went into error state as well.

Now if you are (almost) sure that server1 its stream is ok you can manually alter stream state.

The full path of the ctlmeta is:/usr/local/applogic/bin/ctlmeta

The full path where you can find the volume descriptor files:/var/applogic/volumes/

*To extract the volume stream info to plain text do the following:

  1. cd /var/applogic/volumes/
  2. allocate your right volume stream info file, in this case the filename is set1.class.WIN08EM.boot. You can deduce the filename from the vol list command Name : set1:WIN08EM.boot
  3. cp -p set1.class.WIN08EM.boot /tmp
  4. cd /tmp
  5. cp -p set1.class.WIN08EM.boot set1.class.WIN08EM.boot.org
  6. /usr/local/applogic/bin/ctlmeta cmd=read meta_file=set1.class.WIN08EM.boot > set1.class.WIN08EM.boot.udl

To edit the file

  1. vi set1.class.WIN08EM.boot.udl

    and change the synced paramater to 1 for the stream that you believe is the good one. If you see anything listed after the share_id= then the volume may still be in use or mounted. You need to doublecheck to ensure this volume is not mounted or in use anywhere before proceeding. In some cases (rare) there will be mount points listed in the share_id field even though the volume is not mounted, in this case you can safely delete everything so that it shows share_id = "". Be careful not to introduce extra spaces or line breaks as this will corrupt the volume. You should never update the meta data with anything in this field.

    mirror v-0fa2ca39-1750-4104-a1e2-23434ad22e1a: server = srv1, synced = 0, share_id = "proto=nbd 192.168.20.1 63015;proto=local /dev/

    mirror v-ab3ac489-847e-422f-89ef-4c021d89d636: server = srv2, synced = 1, share_id = "proto=nbd 192.168.20.2 63012;proto=local /dev/ 8.20.252 63012

    to

    mirror v-0fa2ca39-1750-4104-a1e2-23434ad22e1a: server = srv1, synced = 1, share_id = ""

    mirror v-ab3ac489-847e-422f-89ef-4c021d89d636: server = srv2, synced = 0, share_id = ""

    and then save and exit vi. cat the file to verify it looks correct:

  2. cat set1.class.WIN08EM.boot.udl

To write the changes back to the original file

  1. /usr/local/applogic/bin/ctlmeta cmd=write meta_file=set1.class.WIN08EM.boot udl_file=set1.class.WIN08EM.boot.udl
  2. /usr/local/applogic/bin/ctlmeta cmd=read meta_file=set1.class.WIN08EM.boot
  3. verify the output looks as you want it
  4. cp -p set1.class.WIN08EM.boot /var/applogic/volumes/

To check the status of the volume stream

root@xeex tmp# 3t vol info set1:WIN08EM.boot

Name : set1:WIN08EM.boot

Comment :

UUID : 5f2fbefe-dfb3-42ae-8198-3ffa020855e7

Size : 100.00 GB

State : degraded

Filesystem : ntfs08

Mount State : available

Mounted Device : none

Current Users : 0

Time Created : Thu Dec 23 15:53:08 2010

Time Written : Thu Dec 23 14:53:03 2010

Time Accessed : Wed Aug 31 04:52:45 2011

Number Mirrors : 2

Mirrors :

Server State

srv1 ok

srv2 error

Try to start the application again

Verify with customer that the volume stream you choose was indeed the correct one with there recent data. If not, go back through and try the other (if available). Once customer has verified you can resume automated vol repairs (3t vol repair --resume). Once the repair is started there is no way to retrieve the old data off the other stream so make sure its the correct one