Trying to get machine-readable storage data on a live CD results in an unhandled exception:
vyos@vyos:~$ sudo ${vyos_op_scripts_dir}/storage.py show --raw Traceback (most recent call last): File "/usr/libexec/vyos/op_mode/storage.py", line 72, in <module> res = vyos.opmode.run(sys.modules[__name__]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/vyos/opmode.py", line 263, in run res = func(**args) ^^^^^^^^^^^^ File "/usr/libexec/vyos/op_mode/storage.py", line 65, in show return _get_raw_data() ^^^^^^^^^^^^^^^ File "/usr/libexec/vyos/op_mode/storage.py", line 48, in _get_raw_data out = _get_system_storage(only_persistent=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/libexec/vyos/op_mode/storage.py", line 40, in _get_system_storage res = cmd(cmd_str) ^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 155, in cmd raise OSError(code, feedback) PermissionError: [Errno 1] failed to run command: df -h -t ext4 --output=source,size,used,avail,pcent returned: exit code: 1
An additional problem is that the raw output is different from the formatted version — the raw version only returns data for persistent storage, while the formatted version prints information about all filesystems, including tmpfs and the like.
I believe the command should not be available on live CD at all, and should always only show persistent FS information.