RHEL6 – Mount: Could Not Find Any Free Loop Device

LoopSo I ran into this one today on RHEL 6.0 when trying to mount up a few additional isos on one of my remote kickstart servers.  I have actually run into this issue before in RHEL 5 ( see here) however being that this particular kickstart server was built using RHEL 6.0 and not RHEL 5 I figured that there was probably a new process to resolve as RHEL 6 no longer uses the traditional /etc/modprobe.conf.

Note that a loop device is a pseudo device that makes a file accessible as a block device. In this case, the iso is the file.

So here is how you fix it.

First run the following command to increase the total number of loop devices to the max number of 256.

MAKEDEV -v /dev/loop

Then you need to make sure that this command runs at boot time, so stick it in /etc/rc.local. I think you can also pass this kernel option to the OS at boot in the /etc/grub.conf however I have not tried it.

RHEL6 – Quick and Dirty NFS How To

Cobra1So if you are reading this you many not be aware of the fact that I already put up a post on NFS on RHEL6 (you can find it here). However that post is basically just a redirect to another blog post that I ran into on the subject. And despite the fact that its very well written, and has no apparent spelling mistakes, or inapropriate comments about NFS, I felt the need to draft my own post. At this point I really cannot seem to remember anything technical if I don't put up a blog post on the subject. After all I have been doing so for over 4 years, so why stop now.

Anyway, now that I got all that out of the way, lets sit down on brass tacks.

First lets create a directory to be shared on our NFS Server

# mkdir -p /shared/nfs

Now lets change the unix perms so that its wide open

# chmod 777 /shared/nfs

Now lets add our new nfs share to /etc/exports/. In this example I am sharing it out to my local /24 network.


 Now restart NFS service

# service nfs restart

Now verify that you are now sharing via NFS with showmount

# showmount -e localhost

Export list for localhost:

If you are running iptables on your nfs host you are going to need to do a bit more to get nfs to work

If you go by the book, you are going to need to run to open several ports, the commands below will open up what you need.

# iptables -I INPUT -m multiport -p tcp –dport 111,662,875,892,2049,32803 -j ACCEPT

# iptables -I INPUT -m multiport -p udp –dport 111,662,875,892,2049,32769 -j ACCEPT

The fast and cheap way is to just allow all from your nfs client

# iptables -I INPUT -s -j ACCEPT

Now lets go over to the host that we intend to mount our nfs filesystem on and run our showmount command again

# showmount -e
Export list for

Now manually mount your share as seen below

mount -t nfs /mnt

Now add your share to /etc/fstab so that its mounted persistently across reboots. /mnt                    nfs     defaults        0 0

Just to be sure that everything is correct, unmount /mnt and mount /mnt. This way you will catch any errors in your fstab. Probably not a bad idea to touch a file under your new nfs mount too, just to make sure that its writeable.