I had the “pleasure” of setting up an NFS share today on CentOS 5 for the first time. It was actually surprisingly easy to accomplish:
Configure the Server
- Make a folder on the sharing server that has oodles of space, I didn’t bother to setup quotas.
- bash# mkdir /raid5_san/shared
- Edit /etc/exports, insert the ip addresses of any machines that will need to access the share like this:
- bash# vi /etc/exports
- Add in: /raid5_san/shared 192.168.69.1/255.255.255.255(rw,sync)
- Save
- Edit /etc/hosts.allow
- bash# vi /etc/hosts.allow
- Add this line:
portmap: 192.168.69.1/255.255.255.255
- Save
- Start nfs and portmap
- bash# /etc/init.d /nfs start
- bash# /etc/init.d/portmap start
- Make sure that portmap and nfs are set to autostart. You can set this by running /usr/sbin/ntsysv (assuming default scripts are already there in /etc/init.d).
Configure the Client(s)
- Start portmap
- bash# /etc/init.d/portmap start
- Mount the nfs folder
- bash# mount 192.168.69.2:/raid5_san/shared /mnt
- Check /var/log/messages for any error that might occur
- bash# tailf /var/log/messages
- Use mount to check if the folder is mounted properly
- bash# mount
- This should be the output:
- 192.168.69.2:/raid5_san/shared on /mnt type nfs (rw,addr=192.168.0.1)
- Edit /etc/fstab to mount the shared folder on boot
- bash# vi /etc/fstab
- Add this line
- 192.168.69.2:/raid5_san/shared /mnt nfs rw,hard,intr 0 0
- Save
You can use ‘man exports’ to see the options available for /etc/exports
Thanks to linuxwave, I tweaked their instructions a bit.
4 Comments
Florancet
Great job on this piece! Its both informative and engaging. Im eager to hear your thoughts. Check out my profile!
оздс м1 д 333
Одним из перспективных направлений в развитии ОЗДС является использование инновационных технологий. Например, это могут быть системы мониторинга на основе датчиков, автоматизированные системы ловли и уничтожения дератов, системы искусственного интеллекта для анализа данных и оптимизации работы системы. Инновационные технологии могут значительно повысить эффективность и точность ОЗДС, снизить затраты и минимизировать воздействие на окружающую среду.
виджет на экран андроид
Я хотел бы выразить признательность автору за его глубокое понимание темы и его способность представить информацию во всей ее полноте. Я по-настоящему насладился этой статьей и узнал много нового!
https://stranovedus.ru/
Я хотел бы выразить признательность автору этой статьи за его объективный подход к теме. Он представил разные точки зрения и аргументы, что позволило мне получить полное представление о рассматриваемой проблеме. Очень впечатляюще!