pmxcfs as shared script storage?

Q-wulf

Renowned Member
Mar 3, 2013
613
40
93
my test location
Is it possible to use the Proxmox Cluster file system as a place to store execute-able scripts that shall be available on all nodes in the cluster ?

i.e. /etc/pve/my_executable_script.sh

my problem is that i just simply can not go and "chmod +x /etc/pve/my_executable_script.sh"

anyone know a work around ? Or is this not possible at all ?
 
You can store files, but you cannot set execute permissions. Maybe you can store a local script with exec permissions, which includes the script from /etc/pve/
 
you mean like this ?

Code:
cp -rp world.sh /etc/pve/
cp: failed to preserve ownership for ‘/etc/pve/world.sh’: Function not implemented


Code:
rsync -a world.sh /etc/pve/
rsync: chgrp "/etc/pve/world.sh" failed: Function not implemented (38)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

I also tried this:
Code:
ln -s /etc/pve/world.sh /home/world.sh
chmod +x world.sh
chmod: changing permissions of ‘world.sh’: Function not implemented


edit: nvm the "spoiler" - I just re-read this:
Maybe you can store a local script with exec permissions, which includes the script from /etc/pve/

Seems to work:

nano /etc/pve/ceph-config/world.sh
Code:
#!/bin/bash
        echo "executing world.sh"
        echo "Hello World"
        echo "finished world.sh execution"


nano /home/world_wrapper.sh
Code:
#!/bin/bash
#!/bin/bash
        echo"starting wrapping operations"
        source  /etc/pve/ceph-config/world.sh
        echo"finished wrapping operations"
chmod +x /home/world_wrapper.sh

Code:
./home/world_wrapper.sh
starting wrapping operations
executing world.sh
Hello World
finished world.sh execution
finished wrapping operations


Thanks Dietmar

Now i can finally store my ceph-related config scripts, like e.g. Crush location script in /etc/pve/ceph-config/