Linux gurus, I need some help ...dekardy???

AVForums

Help Support AVForums:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Now Playing

AVForums Super Veteran
Joined
May 25, 2010
Messages
1,208
Reaction score
15
Location
South Africa
Setting up an LMS machine for my folks and wanting to run the database off ramdisk.

I create the ramdisk at boot time via fstab:
tmpfs      /mnt/ramdisk tmpfs    defaults,size=4096M,uid=logitechms,gid=logitechms 0    0

I then use a service to execute a script to copy the database to ramdisk:
sync-lms-to-ramdisk.service
Code:
[Unit]
Description=Copy LMS data data directory to ramdisk
After=network.target
Before=logitechmediaserver-git.service

[Service]
ExecStart=/usr/bin/sync-lms-to-ramdisk.sh

[Install]
WantedBy=multi-user.target

/usr/bin/sync-lms-to-ramdisk.sh reads as follows:
Code:
#! /bin/sh 
# /usr/bin/sync-lms-to-ramdisk.sh
#

chown logitechms:logitechms /mnt/ramdisk/
rsync -av /musiclib/lmscache/ /mnt/ramdisk/
exit 0

On startup the cache folder is copied and LMS fires up and fails because /mnt/ramdisk reverts ownership to root:root rather than logitechms:logitechms as originally configured.

Tips as to what to do to get it sorted would be much appreciated.
 
Top