Highlighted

EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

Hello.

I have a problem! During using EMC_Celerra 6.0.36-4 emulator I have found that "nas_cel" command via SSH is not work properly.

While connecting from my software using SSH to EMC Celerra server with login nasadmin or root and trying to execute command  "/nas/bin/nas_cel -interconnect -list" I have a response "NAS_DB environment not defined".  At the same time the command "/nas/bin/nas_cs -info" works properly from my software and I receive normal responce.

I tried to add the following to the /etc/environment file in EMC server:

PATH=/nas/bin  

export NAS_DB=/nas

and the responce to the command "/nas/bin/nas_cel -interconnect -list" was the following:

"id name source_server   destination_system   destination_server Error 10234: data mover : server_2 is not responding".

But if I use directly the command line of EMC server for the same commands everything works properly.

This is a part of result of command "env" in my EMC server:

"PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/nasadmin/bin:/nas/bin

INPUTRC=/etc/inputrc

PWD=/home/nasadmin

LANG=en_US.UTF-8

SHLVL=1

HOME=/home/nasadmin

NAS_DB=/nas

LOGNAME=nasadmin

"

Еhanks in advance.

0 Kudos
1 Solution

Accepted Solutions

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

Hello all.

I fixed my problem with "NAS_DB environment not defined". I insert "NAS_DB=/nas " before my command and it is worked. I use libssh2 and it is set up environment not correctly, I think.

Thank you guys for help.

0 Kudos
13 Replies
urle
1 Nickel

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

In that case and for cronjobs I simply include nasadmins profile into the script:

local_script:

     #!/bin/sh

     . /home/nasadmin/.bash_profile

     server_export server_2 .P cifs -l

Then use ssh nasadmin@celerra:local_script

or - if you want to keep the env locally:

enable PermitUserEnvironment in ssh_config

add environment file with VAR=VALUE in .ssh directory

urle

0 Kudos

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

Hello, urle.

Thanks for the reply.

Unfortunately I do not understand your answer exactly. What happens after the commands "server_export server_2 .P cifs -l" ?  How it helps me to execute "nas_cel" command?
Can you answer with more details because I'm not good understanding in Linux and ssh.

0 Kudos
urle
1 Nickel

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

login as nasadmin into the box

> mkdir /home/nasadmin/bin

> chmod 755 /home/nasadmin/bin

create a scriptfile /home/nasadmin/bin/do_nas_cel:

     #!/bin/sh

      . /home/nasadmin/.bash_profile

      /nas/bin/nas_cel -interconnect -list

> chmod 755 /home/nasadmin/bin/do_nas_cel

Then from the external box use the command

# ssh nasadmin@your_celerra:/home/nasadmin/bin/do_nas_cel

and you should see the expected output.

Cheers, urle

0 Kudos

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

Thanks for your answer.

I did what you advised me. I see that the script works correctly but in my program I receive in response an empty string. I think the problem in ssh library or in my code that uses this library.


I want to ask you one more question. Can I get interconnect id (like "nas_cel -interconnect -list") by other way? For example by xml api or other command by ssh..? I need this id for "nas_copy" checkpoint.

Best regards,

Michael.

0 Kudos
urle
1 Nickel

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

Did you try it from commandline on the external host? If you've got output by the nas_cel command when invoked directly via your code you should see some output when invoking the script.

For xml-api I have to pass over - I did it never by myself.

Sorry, urle

0 Kudos

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

When I connect by ssh in.. "mRemoteNG" for example - I see correct output from commands nas_cel,  /nas/bin/nas_cel, from your script.. from any command and with any login(root, nasadmin). But from my code - empty output by the nas_cel -interconnect -list

Trying to find a problem..

Thank you, urle.

0 Kudos
Rainer_EMC
5 Rhenium

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

You cant get Replicator info via XMLAPI

For scripting I recommend the (undocumented) nas_replicate –report option

0 Kudos

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

Hello, Rainer_EMC.

nas_replicate –report it is interesting command, but how it helps me?

[nasadmin@MiK_emulator_01 ~]$ nas_replicate -report

"id","name","object","remoteSystem","dartInterconnect","peerInterconnect","localRole","sourceMover","sourceInterface",

"destinationMover","destinationInterface","isCopy","destinationDataPort","destinationControlPort","sourceControlPort",

"sourceStatus","destinationStatus","networkStatus","maxTimeOutOfSync","lastSyncTime","nextTransferSizeKB",

"curTransferRateKB","curReadRateKB","curWriteRateKB","curTransferTotalSizeKB","curTransferRemainSizeKB",

"curTransferEstEndTime","curTransferIsFullCopy","curTransferSourceDataPort","prevTransferRateKB",

"prevReadRateKB","prevWriteRateKB","avgTransferRateKB","avgReadRateKB","avgWriteRateKB","sourceFilesystem",

"destinationFilesystem","sourceVdm","destinationVdm","sourceLun","destinationLun","sourceTarget","destinationTarget",

"appData","latestSrcSnap","latestDstSnap","curTransferSnap","waitingSnaps","internalSnaps"

0 Kudos
umichklewis
3 Zinc

Re: EMC_Celerra emulator: problem with "nas_cel" command via SSH

Jump to solution

nas_replicate -report generates a list of all replication sessions, separated by commas.  If you import this into Excel and delimit on the commas, you get nice columns describing the state of every replication session (filesystem, VDM, loopback, etc.), including the Celerra interconnects used by each replication. Granted, you will only see the interconnects for which you have active replications configured, so you won't see anything for interconnects that exist, but have no replications set up.

0 Kudos