12.3. Preparing NFS Storage
Set up NFS shares that will serve as a data domain and an export domain on a Red Hat Enterprise Linux 6 server. It is not necessary to create an ISO domain if one was created during the Red Hat Enterprise Virtualization Manager installation procedure.
- Install nfs-utils, the package that provides NFS tools:
# yum install nfs-utils
- Configure the boot scripts to make shares available every time the system boots:
# chkconfig --add rpcbind # chkconfig --add nfs # chkconfig rpcbind on # chkconfig nfs on
- Start the rpcbind service and the nfs service:
# service rpcbind start # service nfs start
- Create the data directory and the export directory:
# mkdir -p /exports/data # mkdir -p /exports/export
- Add the newly created directories to the
/etc/exportsfile. Add the following to/etc/exports:/exports/data *(rw) /exports/export *(rw)
- Export the storage domains:
# exportfs -r
- Reload the NFS service:
# service nfs reload
- Create the group
kvm:# groupadd kvm -g 36
- Create the user
vdsmin the groupkvm:# useradd vdsm -u 36 -g 36
- Set the ownership of your exported directories to 36:36, which gives vdsm:kvm ownership. This makes it possible for the Manager to store data in the storage domains represented by these exported directories:
# chown -R 36:36 /exports/data # chown -R 36:36 /exports/export
- Change the mode of the directories so that read and write access is granted to the owner, and so that read and execute access is granted to the group and other users:
# chmod 0755 /exports/data # chmod 0755 /exports/export