Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Using BEMCLI to list current storage state ?

Created: 01 Oct 2013 • Updated: 05 Oct 2013 | 5 comments
Dominique Epp's picture
This issue has been solved. See solution.

I need to determine current state of storage devices in a storage pool, i.e. online or offline, using BEMCLI.

The following command does not list this information and I can't find the way to resolve the issue.

PS H:\> Get-BEDiskStorageDevice -Name "*samedi*"

Name                                StorageType          Active   Paused   Disabled Servers
----                                -----------          ------   ------   -------- -------
USB dernier samedi de l'an          DiskStorageDevice    False    False    False    {FOR-MGMT}
USB dernier samedi du trimestre     DiskStorageDevice    False    False    False    {FOR-MGMT}
USB 1er samedi                      DiskStorageDevice    False    False    False    {FOR-MGMT}
USB 3e samedi                       DiskStorageDevice    False    False    False    {FOR-MGMT}
USB 4e samedi                       DiskStorageDevice    False    False    False    {FOR-MGMT}
USB 5e samedi                       DiskStorageDevice    False    False    False    {FOR-MGMT}
USB 2e samedi                       DiskStorageDevice    False    False    False    {FOR-MGMT}

In abvove example the 3rd disk listed is in effect online and I need a specific command to determine this via a script.

Operating Systems:

Comments 5 CommentsJump to latest comment

Srivishnu's picture

Hi Dominique,

If you want to find the online status of a Device try 

H:\>New-BEBackupDefinition -TestRunCheckMediaAvailable

This Should Show if Media is Available online 

For more help Download BEMCLI_en.chm from http://kbdownload.symantec.com/resources/sites/BUSINESS/content/live/DOCUMENTATION/5000/DOC5438/en_US/BEMCLI_en.chm?__gda__=1380671397_61c7a3ef582759211131c4cbefd99360

And Navigate to the option Shown in Image Attached 

Regards,

Srivishnu.K

BEMCLI.JPG
pkh's picture

This is not true.  The New-BEBackupDefinition cmdlet just create a new backup definition.  It does not check the device status.

pkh's picture

To get the storage status, you need to do the following.

1) Inventory the storage device using

Submit-BEInventoryJob | Wait-BEJob

you would have to submit an inventory job for each storage device

2) the above step will return a job history object which is the same object as if you run 

Get-BEJobHistory

Your script can then check the Jobstatus.  If the job succeeds, the storage is online.  Otherwise, it is offline.

Biker_Dude's picture

This command will return the State of the device:

Get-BEDiskStorageDevice "<insert_disk_storage_name_here>" | Select-Object -ExpandProperty Servers

Third from the top of the return data will be 'IsOnline'.

SOLUTION
Dominique Epp's picture

Great !  Thanks to Biker-Dude for his perfect answer !