How to get cluster storage status (enabled/disabled) by API ?

Sep 14, 2020
54
6
13
46
Please,

Can i get the storage status (enabled/disabled) via pvesh?

I can put this information in:
Code:
pvesh put /storage/{storage}/disable <boolean>

I can get some information in:
Code:
pvesh get /storage/{storage}

But, can i get the information about if the storage is disabled or not?

Would it be possible for me to know if all the data that was sent to the storage was committed?

I need to know this information so after confirming that the storage (rbd) is really unused (disabled and committed) I can then safely disable / shut down ceph (monitors, osds and nodes) in a script that I'm writing.

Tanks a lot!
 
hi,

But, can i get the information about if the storage is disabled or not?
yes, if the output printed disable:1 means the storage is disabled.

maybe this command will helpful
Bash:
pvesh get storage --output-format yaml
 
Dear Moayad

Tankyou for your reply.

What version of Ceph and Proxmox did you test this command for?

Why here, I'm using Ceph Nautilus and Proxmox 6.2-4 and it didn't work. See the output of the suggested command, below:

Code:
root@pve-11:~# pvesh get storage --output-format yaml
---
-
  content: rootdir
  digest: 98060b8e3d8e423fd9dfb8a0d52cf7bb35e6e14a
  krbd: 0
  pool: ceph_pool0
  shared: 1
  storage: ceph0_ct
  type: rbd
-
  content: images
  digest: 98060b8e3d8e423fd9dfb8a0d52cf7bb35e6e14a
  krbd: 0
  pool: ceph_pool0
  shared: 1
  storage: ceph0_vm
  type: rbd
-
  content: images,rootdir
  digest: 98060b8e3d8e423fd9dfb8a0d52cf7bb35e6e14a
  storage: local-lvm
  thinpool: data
  type: lvmthin
  vgname: pve
-
  content: vztmpl,backup,iso
  digest: 98060b8e3d8e423fd9dfb8a0d52cf7bb35e6e14a
  path: /var/lib/vz
  storage: local
  type: dir

As we can see, using the suggested command, there was no information about whether the storage is disabled or not.

There is no "disabled" field in the command output.

Any suggestion?
 
'disable' is only set for disabled storages, enabled storages (the default) have the field omitted.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!