Trying a P2V again, this time using a physical Fedora system for the NFS RHEV Export
domain instead of the Storagetek NFS server. Everything else is the same. Same source
server, same conversion server, same v2v and p2v versions for now. The only variable
different is the RHEV Export NFS server.
Nothing is ever simple. For our new F16 NFS server, with the new systemd, the startup
rules have changed. For anyone else who needs to use an F16 system as an NFS server for
RHEV exports or maybe ISOs, here are some notes. YMMV, but this worked for me. Thanks to
several forums for the raw materials that went into the notes below.
- Greg
****************************************************
First things first. We need a usable text editor.
yum install nano
Now we should change selinux to "permissive".
[root@IT etc]# cd /etc/selinux
[root@IT selinux]# ls
config restorecond.conf restorecond_user.conf semanage.conf targeted
[root@IT selinux]# nano config
[root@IT selinux]# more config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
[root@IT selinux]#
Now install the packages we need for NFS.
yum install nfs-utils (This should pull in all the dependencies including rpcbind.)
yum install system-config-nfs
yum install system-config-nfs-docs
Set them to start at boot time. And open up all the firewall rules.
systemctl enable rpcbind.service
systemctl enable nfs-server.service
systemctl disable iptables.service
Start everything up for now.
systemctl stop iptables.service
systemsctl start rpcbind.service
systemctl start nfs-server.service
And now we can set up our NFS share and edit /etc/exports. Where is the best place to put
the NFS share we want?
[root@IT /]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 50G 2.7G 47G 6% /
devtmpfs 1.5G 0 1.5G 0% /dev
tmpfs 1.5G 240K 1.5G 1% /dev/shm
tmpfs 1.5G 40M 1.4G 3% /run
/dev/mapper/vg_it-lv_root 50G 2.7G 47G 6% /
tmpfs 1.5G 40M 1.4G 3% /run
tmpfs 1.5G 0 1.5G 0% /sys/fs/cgroup
tmpfs 1.5G 0 1.5G 0% /media
/dev/sde3 485M 56M 404M 13% /boot
/dev/mapper/vg_it-lv_home 212G 252M 201G 1% /home
[root@IT /]# ls /home
fredy lost+found
[root@IT /]# mkdir /home/RHEVexports
[root@IT /]# chown 36.36 /home/RHEVexports
[root@IT /]# ls -al /home total 32
drwxr-xr-x. 5 root root 4096 Dec 5 20:12 .
dr-xr-xr-x. 21 root root 4096 Dec 5 11:49 ..
drwx------. 25 fredy fredy 4096 Dec 5 11:49 fredy
drwx------. 2 root root 16384 Nov 29 06:32 lost+found
drwxr-xr-x. 2 36 36 4096 Dec 5 20:12 RHEVexports
[root@IT etc]# nano /etc/exports
[root@IT etc]# more /etc/exports
/home/RHEVexports *(rw,sync,nohide,no_root_squash)
[root@IT etc]# exportfs -av
exporting *:/home/RHEVexports
[root@IT etc]#
We decided /home/RHEVexports seems like a reasonable location. And now it's mountable
from a different system:
[root@Fedora16-64P2V log]# mkdir /mnt/stuff
[root@Fedora16-64P2V log]# mount -t nfs 175.10.0.95:/home/RHEVexports /mnt/stuff
[root@Fedora16-64P2V log]# cd /mnt/stuff
[root@Fedora16-64P2V stuff]# touch a.a
[root@Fedora16-64P2V stuff]# rm a.a
rm: remove regular empty file `a.a'? y
[root@Fedora16-64P2V stuff]# cd /
[root@Fedora16-64P2V /]# umount /mnt/stuff [root@Fedora16-64P2V /]#
Should be ready to use as the RHEV-M export domain now.