graysky2 / profile-sync-daemon

Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Other
910 stars 88 forks source link

psd not copying profile to tmpfs #206

Closed sriedel closed 6 years ago

sriedel commented 7 years ago

I've just installed psd as per archlinux wiki, started the systemd user service and restarted firefox, however I cannot see the profile directory where psd p says it should be, and iotop still shows lots of firefox indexdb and mozStore traffic.

 $ psd p
Profile-sync-daemon v6.31 on Arch Linux

 Systemd service is currently active.
 Systemd resync-timer is currently active.
 Overlayfs v23 is currently active.

Psd will manage the following per /home/sr/.config/psd/psd.conf:

 browser/psname:  firefox/firefox
 owner/group id:  sr/1000
 sync target:     /home/sr/.mozilla/firefox/ub6a2kzj.default
 tmpfs dir:       /run/user/1000/sr-firefox-ub6a2kzj.default
 profile size:    135M
 overlayfs size:  
 recovery dirs:   none

 browser/psname:  chromium/chromium
 owner/group id:  sr/1000
 sync target:     /home/sr/.config/chromium
 tmpfs dir:       /run/user/1000/sr-chromium
 profile size:    51M
 overlayfs size:  
 recovery dirs:   none

$ ls -l  /run/user/1000/sr-firefox-ub6a2kzj.default
ls: cannot access '/run/user/1000/sr-firefox-ub6a2kzj.default': No such file or directory

The contents of my config file:

#
# $XDG_HOME_CONFIG/psd/psd.conf
#
# For documentation, refer to the psd man page or the wiki page
# https://wiki.archlinux.org/index.php/Profile-sync-daemon

## NOTE the following:
## To protect data from corruption, in the event that you do make an edit while
## psd is active, any changes made will be applied the next time you start psd.

# Uncomment and set to "yes" to use overlayfs instead of a full copy to reduce
# the memory costs and to improve sync/unsync operations. Note that your kernel
# MUST have this module available in order to use this mode
#
USE_OVERLAYFS="yes"

# List browsers separated by spaces to include in the sync. Useful if you do not
# wish to have all possible browser profiles sync'ed which is the default if
# this variable is left commented.
#
# Possible values:
#  chromium
#  chromium-dev
#  conkeror.mozdev.org
#  epiphany
#  firefox
#  firefox-trunk
#  google-chrome
#  google-chrome-beta
#  google-chrome-unstable
#  heftig-aurora
#  icecat
#  inox
#  luakit
#  midori
#  opera
#  opera-beta
#  opera-developer
#  opera-legacy
#  otter-browser
#  qupzilla
#  qutebrowser
#  palemoon
#  rekonq
#  seamonkey
#  surf
#  vivaldi
#  vivaldi-snapshot
#
BROWSERS="firefox firefox-trunk google-chrome chromium"

# Uncomment and set to "no" to completely disable the crash recovery feature.
#
# The default is to create crash recovery backups if the system is ungracefully
# powered-down due to a kernel panic, hitting the reset switch, battery going
# dead, etc. Some users keep very diligent backups and don't care to have this
# feature enabled.
#USE_BACKUPS="yes"

# Uncomment and set to an integer that is the maximum number of crash recovery
# snapshots to keep (the oldest ones are delete first).
#
# The default is to save the most recent 5 crash recovery snapshots.
#BACKUP_LIMIT=5

And the output of the systemctl status:

$ systemctl --user status psd.service
● psd.service - Profile-sync-daemon
   Loaded: loaded (/usr/lib/systemd/user/psd.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2017-06-18 12:55:31 CEST; 19min ago
     Docs: man:psd(1)
           man:profile-sync-daemon(1)
           https://wiki.archlinux.org/index.php/Profile-sync-daemon
  Process: 31827 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 31827 (code=exited, status=0/SUCCESS)
   CGroup: /user.slice/user-1000.slice/user@1000.service/psd.service

Jun 18 12:55:31 plinth systemd[985]: Starting Profile-sync-daemon...
Jun 18 12:55:31 plinth systemd[985]: Started Profile-sync-daemon.

Is there something I'm overlooking that I need to do (pointing firefox at the ramdisk profile in the profile manager for things to start working? Creating an initial copy by hand?)

graysky2 commented 7 years ago

Is this still an issue?

jonasc commented 6 years ago

I'm not the original poster but I have the same issue. I installed the current git version (as a user) on Debian 9.3 and enabled the psd.service unit

% systemctl --user status psd.service
● psd.service - Profile-sync-daemon
   Loaded: loaded (/home/mi/$USER/.config/systemd/user/psd.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2018-02-06 16:44:43 CET; 29min ago
     Docs: man:psd(1)
           man:profile-sync-daemon(1)
           https://wiki.archlinux.org/index.php/Profile-sync-daemon
  Process: 3107 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 3107 (code=exited, status=0/SUCCESS)
   CGroup: /user.slice/user-203887.slice/user@203887.service/psd.service

Feb 06 16:44:43 torus systemd[3079]: Starting Profile-sync-daemon...
Feb 06 16:44:43 torus systemd[3079]: Started Profile-sync-daemon.

My config:

% grep -v '^#\|^$' .config/psd/psd.conf 
USE_OVERLAYFS="no"
BROWSERS="firefox"
USE_BACKUPS="yes"
BACKUP_LIMIT=5

Running psd sync manually, however, copies the files to the ramdisk and creates symlinks as expected.

jonasc commented 6 years ago

Sorry for the wrong call - I just figured out that the systemd units in have hard-coded paths to /usr/bin and I had to direct them to the local installation in my home folder. Now everything works like a charm…

graysky2 commented 6 years ago

OK, closing.