How to move PlayOnLinux virtual drives to another disk

From PlayOnLinux
Revision as of 16:13, 14 August 2019 by Dadu042 (talk | contribs) (Step 1 : prerequisites)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

There have been several requests for this feature over the years, but nothing has been implemented yet.

However, you can manage disk space the Unix way, which requires no special application support (taken from ):


Step 1 : prerequisites

  1.  Drive space: it need enough disk space to store the actual content of your ~/.PlayOnLinux directory.
  2.  The filesystem type used for the drive should support POSIX semantics (file rights, symlinks,...) for Wine to work correctly: ext2, ext3, ext4, btrfs, reiserfs, xfs, jfs, etc. should be fine. FAT and NTFS will not work using this method.
  3. Be sure PlayOnLinux is not running
  4. Doing some backups at that point can't hurt

Step 2 : moving ~/.PlayOnLinux

  1. Move ~/.PlayOnLinux to the target filesystem, using some tool that, again, preserves all POSIX filesystem semantics. Copy then remove will give you some extra safety, so I suggest:
  2. Use GNU's cp -a; Say you want to move PlayOnLinux's files inside /mnt/extradisk/mysecondhome/, type
$ cp -av ~/.PlayOnLinux /mnt/extradisk/mysecondhome/

(using tar, cpio, and other *nix-ish backup software should do, if you prefer using those).

Step 3 : deleting ~/.PlayOnLinux

  • Once you're confident the files have been moved over, rm -rf the source directory:
$ rm -rf ~/.PlayOnLinux

Step 4 : creating a symbolic link

  • Put a symlink where the source was, pointing to the new location. Example; say you moved ~/.PlayOnLinux to /mnt/extradisk/mysecondhome/.PlayOnLinux. then use
$ ln -s /mnt/extradisk/mysecondhome/.PlayOnLinux ~/.PlayOnLinux

Variants (more advanced, and not detailed here):

  • Move ~/.PlayOnLinux/wineprefix instead of ~/.PlayOnLinux if you prefer moving around only the virtual drives (not installed Wine versions, resource files, temporary directory, etc.).
  • Move specific virtual drives ~/.PlayOnLinux/wineprefix/PrefixName instead; This will give you more flexibility, but this can only be done after they've been created, and removal from PlayOnLinux may just remove the symlink, not the remote virtual drive, so keep in mind that creation and removal of virtual drives won't be fully automatic any longer if you go that path
  • Use mount instead of symlink. The target directory should be the root directory of a new filesystem, and instead of creating a symlink, create a directory and use it as a mount point for the new filesystem. To make it permanent, add mount instructions to /etc/fstab
  • (Linux only) Use mount --bind instead of mount. Target directory does not need to be the root of a filesystem, but it's otherwise similar to above instructions using mount.