apcupsd help "Read-only file system error"

fals3illusion

New Member
Oct 16, 2023
11
2
3
I just upgraded my proxmox ve server to new hardware and I am having trouble getting my APC UPS's working on a debian lxc with apcupsd.

This is the main resource I followed along with a lot other research to finally get it working on the old system. Everything was working before I moved to a new pve server.
https://wiki.debian.org/apcupsd#Installation

in my lxc config I am passing through
lxc.mount.entry: /dev/usb dev/usb none bind,optional,create=dir

I have 6 UPS's that are all on 1 hub connected to one of my USB ports on the back of my pve server..
I have a rules file
nano /etc/udev/rules.d/ups.rules


Code:
# Back-UPS RS Middle 1500MS Shelf -- middleShelf
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", SYMLINK+="usb/ups-middleShelf"

# Smart-UPS Right 1000 Shelf -- rightShelf
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", SYMLINK+="usb/ups-rightShelf"

# Smart-UPS Left 1500 Shelf -- leftShelf
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", SYMLINK+="usb/ups-leftShelf"

# Smart-UPS Top SRT Rack -- topSRTrack
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", SYMLINK+="usb/ups-topSRTrack"

# Smart-UPS Middle SRT Rack -- middleSRTrack
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", SYMLINK+="usb/ups-middleSRTrack"

# Smart-UPS Bottom SRT Rack -- bottomSRTrack
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", SYMLINK+="usb/ups-bottomSRTrack"


then using this command udevadm trigger --verbose --sysname-match=hiddev*
I am trying to map /SYMLINK the ups's and I am getting this error.

/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.3/1-11.3.1/1-11.3.1.1/1-11.3.1.1:1.0/usbmisc/hiddev3
hiddev3: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.3/1-11.3.1/1-11.3.1.1/1-11.3.1.1:1.0/usbmisc/hiddev3/uevent': Read-only file system

I have tried to change permissions but not working with.

chown 100000:100000 /dev/usb

root@apc-node-red:/dev/usb# ls
hiddev0 hiddev1 hiddev2 hiddev3 hiddev4 hiddev5 hiddev6
root@apc-node-red:/dev/usb# chown 100000:100000 /dev/usb
root@apc-node-red:/dev/usb# ls -l /dev/usb
total 0
crw------- 1 root root 180, 0 Jun 17 16:25 hiddev0
crw------- 1 root root 180, 1 Jun 17 16:25 hiddev1
crw------- 1 root root 180, 2 Jun 17 16:25 hiddev2
crw------- 1 root root 180, 3 Jun 17 16:25 hiddev3
crw------- 1 root root 180, 4 Jun 17 16:25 hiddev4
crw------- 1 root root 180, 5 Jun 17 16:25 hiddev5
crw------- 1 root root 180, 6 Jun 17 16:25 hiddev6
root@apc-node-red:/dev/usb#

Any idea how I can try and fix this?

Thanks!
 
Last edited:
I just upgraded my proxmox ve server to new hardware and I am having trouble getting my APC UPS's working on a debian lxc with apcupsd.

This is the main resource I followed along with a lot other research to finally get it working on the old system. Everything was working before I moved to a new pve server.
https://wiki.debian.org/apcupsd#Installation

in my lxc config I am passing through
lxc.mount.entry: /dev/usb dev/usb none bind,optional,create=dir

I have 6 UPS's that are all on 1 hub connected to one of my USB ports on the back of my pve server..
I have a rules file
nano /etc/udev/rules.d/ups.rules


Code:
# Back-UPS RS Middle 1500MS Shelf -- middleShelf
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", GROUP="100000", MODE="0666", SYMLINK+="usb/ups-middleShelf"

# Smart-UPS Right 1000 Shelf -- rightShelf
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", GROUP="100000", MODE="0666", SYMLINK+="usb/ups-rightShelf"

# Smart-UPS Left 1500 Shelf -- leftShelf
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", GROUP="100000", MODE="0666", SYMLINK+="usb/ups-leftShelf"

# Smart-UPS Top SRT Rack -- topSRTrack
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", GROUP="100000", MODE="0666", SYMLINK+="usb/ups-topSRTrack"

# Smart-UPS Middle SRT Rack -- middleSRTrack
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", GROUP="100000", MODE="0666", SYMLINK+="usb/ups-middleSRTrack"

# Smart-UPS Bottom SRT Rack -- bottomSRTrack
KERNEL=="hiddev*", ATTRS{manufacturer}=="American Power Conversion", ATTRS{serial}=="SerialXXX", OWNER="root", GROUP="100000", MODE="0666", SYMLINK+="usb/ups-bottomSRTrack"


then using this command udevadm trigger --verbose --sysname-match=hiddev*
I am trying to map /SYMLINK the ups's and I am getting this error.

/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.3/1-11.3.1/1-11.3.1.1/1-11.3.1.1:1.0/usbmisc/hiddev3
hiddev3: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.3/1-11.3.1/1-11.3.1.1/1-11.3.1.1:1.0/usbmisc/hiddev3/uevent': Read-only file system

I have tried to change permissions but not working with.

chown 100000:100000 /dev/usb

root@apc-node-red:/dev/usb# ls
hiddev0 hiddev1 hiddev2 hiddev3 hiddev4 hiddev5 hiddev6
root@apc-node-red:/dev/usb# chown 100000:100000 /dev/usb
root@apc-node-red:/dev/usb# ls -l /dev/usb
total 0
crw------- 1 root root 180, 0 Jun 17 16:25 hiddev0
crw------- 1 root root 180, 1 Jun 17 16:25 hiddev1
crw------- 1 root root 180, 2 Jun 17 16:25 hiddev2
crw------- 1 root root 180, 3 Jun 17 16:25 hiddev3
crw------- 1 root root 180, 4 Jun 17 16:25 hiddev4
crw------- 1 root root 180, 5 Jun 17 16:25 hiddev5
crw------- 1 root root 180, 6 Jun 17 16:25 hiddev6
root@apc-node-red:/dev/usb#

Any idea how I can try and fix this?

Thanks!
I found a workaround, that makes it work.
Not sure if this is correct and not supposed to do it on the host level or if I it is best practice to only do it on the container level.

On the proxmox HOST, I created my ups.rules files after, then I ran the udevadm trigger --verbose --sysname-match=hiddev* and it linked all of the files and it started communicating!
 

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!