Placing /vz partition to external storage (NAS, NFS)

Sometimes it is need to place /vz partition on external storage. How to perform this procedure on Parallels Virtuozzo Containers system?

Here are exact steps:

1. Make sure that external storage is available as device in /dev/ directory (via e.g. NFS or ISCSI layer)

2. Mount this storage under e.g. mount point /vzs using required options and filesystem type:
# mount /dev/ext_storage_dev_name /vzs

3. Stop Virtuozzo:
# service vz stop

4. Copy all content from /vz to /vzs:
# cp -a /vz/* /vzs/

5. Unmount old /vz directory and /vzs directory:
# umount /vz
# umount /vzs

6. Edit in the file /etc/fstab line for /vz entry to mount external storage under /vz mount point.

7. mount /vz again:
# mount /vz

8. Start Virtuozzo:
# service vz start

2 comments

Leave a Reply to dino Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.