How to move PlayOnLinux virtual drives to another disk

From PlayOnLinux
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 https://www.playonlinux.com/en/topic-10841-PoL_Directory_Location.html ):

Prerequisites:

A filesystem with enough disk space to store the actual content of your ~/.PlayOnLinux directory. The filesystem type used 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.

  1. Be sure PlayOnLinux is not running
  2. Doing some backups at that point can't hurt
  3. 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:
  4. 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).

  • Once you're confident the files have been moved over, rm -rf the source directory:
$ rm -rf ~/.PlayOnLinux
  • 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.