Difference between revisions of "How to move PlayOnLinux virtual drives to another disk"

From PlayOnLinux
Jump to: navigation, search
(Variants (more advanced, and not detailed here):)
(Step 1 : prerequisites)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
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 ):
 
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: ===
+
== Howto ==
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:  
+
=== Step 1 : prerequisites ===
 +
# '''Drive space''': it need enough disk space to store the actual content of your ~/.PlayOnLinux directory.
 +
# '''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'''.
 +
# Be sure '''PlayOnLinux is not running'''
 +
# Doing some '''backups''' at that point can't hurt
  
'''ext2''', '''ext3''', '''ext4''', '''btrfs''', '''reiserfs''', xfs''', '''jfs''', etc. should be fine. '''FAT''' and '''NTFS''' will not work using this method.
+
=== Step 2 : moving ~/.PlayOnLinux ===
 
 
# Be sure '''PlayOnLinux''' is not running
 
# Doing some backups at that point can't hurt
 
 
# 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:
 
# 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:
 
# Use GNU's '''cp -a'''; Say you want to move PlayOnLinux's files inside '''/mnt/extradisk/mysecondhome/''', type
 
# Use GNU's '''cp -a'''; Say you want to move PlayOnLinux's files inside '''/mnt/extradisk/mysecondhome/''', type
Line 15: Line 16:
 
</pre>
 
</pre>
 
(using '''tar''', '''cpio''', and other *nix-ish backup software should do, if you prefer using those).
 
(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:
 
* Once you're confident the files have been moved over, '''rm -rf''' the source directory:
 
<pre style="color: white; background-color: black">$ rm -rf ~/.PlayOnLinux
 
<pre style="color: white; background-color: black">$ rm -rf ~/.PlayOnLinux
 
</pre>
 
</pre>
 +
 +
=== 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
 
* Put a '''symlink''' where the source was, pointing to the new location. Example; say you moved '''~/.PlayOnLinux''' to '''/mnt/extradisk/mysecondhome/.PlayOnLinux'''. then use
 
<pre style="color: white; background-color: black">$ ln -s /mnt/extradisk/mysecondhome/.PlayOnLinux ~/.PlayOnLinux
 
<pre style="color: white; background-color: black">$ ln -s /mnt/extradisk/mysecondhome/.PlayOnLinux ~/.PlayOnLinux
 
</pre>
 
</pre>
  
=== Variants (more advanced, and not detailed here): ===
+
== 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 '''~/.PlayOnLinux/wineprefix''' instead of '''~/.PlayOnLinux''' if you prefer moving around only the virtual drives (not installed Wine versions, resource files, temporary directory, etc.).

Latest revision as of 16:13, 14 August 2019

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 ):

Howto

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.