Difference between revisions of "Fedora Arm Secondary Architecture/NFS Configuration"

From CDOT Wiki
Jump to: navigation, search
(Steps to Perform)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Fedora ARM Secondary Architecture]]
+
[[Category:Fedora ARM Secondary Architecture]][[Category:Winter 2010 SBR600]]
  
There are a couple of steps you must perform to be able to use the NFS share on hong kong.
+
= Goal =
 +
To configure a VM or physical ARM machine to use the NFS share on HongKong (assuming a private network connection).
 +
 
 +
= Steps to Perform =
 +
 
 +
On the ARM machine (VM or hardware device):
  
 
1. Edit your "/etc/fstab" and change the following lines file system to "auto" from "nfs":
 
1. Edit your "/etc/fstab" and change the following lines file system to "auto" from "nfs":
  /dev/root               /                       nfs    defaults       1 1
+
  /dev/root / '''auto'''  defaults 1 1
  
 
2. Use yum to install "rpcbind" and "nfs-utils" and make sure that the "rpcbind" and "nfs" services are started at boot:
 
2. Use yum to install "rpcbind" and "nfs-utils" and make sure that the "rpcbind" and "nfs" services are started at boot:
Line 14: Line 19:
 
  mkdir /share
 
  mkdir /share
  
4. Create an <code>/etc/hosts</code> entry for HongKong using both the hostname and the FQDN:
+
4. Create an <code>/etc/hosts</code> entry for HongKong using both the hostname and the FQDN - chose only one line from the following:
 
  echo "192.168.122.1 hongkong hongkong.proximity.on.ca" >>/etc/hosts  # VMs only
 
  echo "192.168.122.1 hongkong hongkong.proximity.on.ca" >>/etc/hosts  # VMs only
 
  echo "192.168.1.254 hongkong hongkong.proximity.on.ca" >>/etc/hosts  # physical hardware only
 
  echo "192.168.1.254 hongkong hongkong.proximity.on.ca" >>/etc/hosts  # physical hardware only
  
 
5. Create an fstab entry to mount the <code>/share</code> directory from HongKong:
 
5. Create an fstab entry to mount the <code>/share</code> directory from HongKong:
  echo "mount hongkong:/share /share nfs defaults,noauto 0 0" >>/etc/fstab
+
  echo "hongkong:/share /share nfs defaults,noauto 0 0" >>/etc/fstab
  
 
6. Test that you can successfully mount the share:
 
6. Test that you can successfully mount the share:
Line 29: Line 34:
 
  echo "mount /share" >>/etc/rc.d/rc.local
 
  echo "mount /share" >>/etc/rc.d/rc.local
  
9. Optional/recommended: Reboot your vm to make sure the nfs share is properly mounted at boot. To restart your vm log into hongkong as root and run the following commands. As an example i will use arm-001-002, replace this with your VM. First, on the VM:
+
9. Create a link for Koji:
 +
ln -s /share/koji /mnt/koji
 +
 
 +
9. Optional/recommended: Reboot your vm to make sure the nfs share is properly mounted at boot. To restart your vm log into hongkong as root and run the following commands. As an example i will use ''arm-001-999'', replace this with your VM. First, on the VM:
 
  poweroff
 
  poweroff
 
Then on the host (HongKong):
 
Then on the host (HongKong):
  virsh destory arm-001-002
+
  virsh destory ''arm-001-999''
  virsh start arm-001-002
+
  virsh start ''arm-001-999''

Latest revision as of 18:28, 21 April 2010


Goal

To configure a VM or physical ARM machine to use the NFS share on HongKong (assuming a private network connection).

Steps to Perform

On the ARM machine (VM or hardware device):

1. Edit your "/etc/fstab" and change the following lines file system to "auto" from "nfs":

/dev/root  /  auto  defaults  1 1

2. Use yum to install "rpcbind" and "nfs-utils" and make sure that the "rpcbind" and "nfs" services are started at boot:

yum install rpcbind nfs-utils
chkconfig rpcbind on
chkconfig nfs on

3. Create the /share folder to mount the HongKong NFS share.

mkdir /share

4. Create an /etc/hosts entry for HongKong using both the hostname and the FQDN - chose only one line from the following:

echo "192.168.122.1 hongkong hongkong.proximity.on.ca" >>/etc/hosts  # VMs only
echo "192.168.1.254 hongkong hongkong.proximity.on.ca" >>/etc/hosts  # physical hardware only

5. Create an fstab entry to mount the /share directory from HongKong:

echo "hongkong:/share /share nfs defaults,noauto 0 0" >>/etc/fstab

6. Test that you can successfully mount the share:

mount /share

7. If it mounts correctly it will give no output. Run the "mount" command to check that it has been successful.

8. Add a line to /etc/rc.d/rc.local to mount the share automatically at boot time (note: this will fail if the NFS share is not available at boot, but the boot will proceed. The alternate approach of mounting at boot time via /etc/fstab will cause the boot to stall/fail if the NFS share is not available at boot):

echo "mount /share" >>/etc/rc.d/rc.local

9. Create a link for Koji:

ln -s /share/koji /mnt/koji

9. Optional/recommended: Reboot your vm to make sure the nfs share is properly mounted at boot. To restart your vm log into hongkong as root and run the following commands. As an example i will use arm-001-999, replace this with your VM. First, on the VM:

poweroff

Then on the host (HongKong):

virsh destory arm-001-999
virsh start arm-001-999