is it possible to view HDD S.M.A.R.T info from a unprivileged ct ?

lxiosjao

Member
Mar 21, 2021
62
1
13
Hello,
I would like to monitor my sata hdds from a LXC ct (web service) but I have to access S.M.A.R.T information.
Is it possible to do this from a ct ?
I dont want to install the web service on the pve host.

It would be nice if the ct don't have the right to r/w on hdd (read S.M.A.R.T info only)
Hdds are in a zpool.

I tried to add this in the /etc/pve/lxc/101.conf
Code:
lxc.cgroup.devices.allow: b 8:1 rwm
lxc.mount.entry: /dev/sde dev/sde none bind,optional,create=file



Code:
root@ct:~# smartctl -a /dev/sde
...

Probable ATA device behind a SAT layer
Try an additional '-d ata' or '-d sat' argument.
Read Device Identity failed: Permission denied
...

As you can see, smartctl can't read the device identity.
What do you think ?
Thanks
 
Last edited:
Hdds are in a zpool.
I tried to add this in the /etc/pve/lxc/101.conf
Code:
lxc.cgroup.devices.allow: b 8:1 rwm
lxc.mount.entry: /dev/sde dev/sde none bind,optional,create=file
Why even?

Either do it in privileged container or do it the proper way via nagios tools or ssh ......
 
I would run a cron job on the host which dumped the smart values into a text file that is accessible to the container.
 

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!