4.1. Accessing Virtuozzo Storage Clusters via NFS¶
To access a Virtuozzo Storage Cluster via NFS, you need to:
Create and mount a ploop with the ext4 file system.
Set up an NFS share using either the standard
exportfs
command or the/etc/exports
file.Access the NFS share on the remote computer.
The following sections describe these steps in detail.
4.1.1. Preparing the Ploop¶
Loopback block devices (ploops) allow you to attach any Virtuozzo Storage file as a block device and format it to a conventional file system like ext4. Since Virtuozzo Storage is not optimized for small files and does not use a POSIX-compliant file system, you can use ploops with ext4 when you need the aforementioned functionality.
To prepare the ploop, do the following:
Load the required modules:
# modprobe ploop pfmt_ploop1 pio_kaio
Create the ploop:
# mkdir /vstorage/ploop0 # ploop init -s 1g -t ext4 /vstorage/ploop0/img0
This command creates a 1 GB ploop with the ext4 file system.
Mount the ploop:
# mkdir /mnt/ploop0 # ploop mount -m /mnt/ploop0 /vstorage/ploop0/DiskDescriptor.xml
(Optional) Set up a permanent ploop mount using /etc/fstab:
# cat >> /etc/fstab <<EOF /vstorage/ploop0/DiskDescriptor.xml /mnt/ploop0 ploop defaults 0 0 EOF