Expand/nas: Difference between revisions
Jump to navigation
Jump to search
Agent Kith (talk | contribs) mNo edit summary |
Agent Kith (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{{abox|This page is still work in progress}} | {{abox|This page is still work in progress}} | ||
=== Introduction === | ===Introduction=== | ||
<br /> | This article shows the steps that will convert your Snakeoil computer into a basic NAS.<br /> | ||
=== | ===NFS-Server=== | ||
<br /> | Short for [[wikipedia:Network_File_System|Network File Systems (NFS)]]. This is the standard file sharing protocol used in Linux computers. You'll need a custom kernel to get this working. | ||
#Download a custom Snakeoil Kernel with NFS server support. For example, the NAS kernel in this [https://www.snakeoil-os.net/forums/Thread-Snakeoil-1-x-x-4-4-9-rt17-Series thread]. | |||
#Reboot the computer and verify you're on the NFS kernel | |||
#SSH into your Snakeoil PC | |||
#Run this command:<syntaxhighlight lang="bash"> | |||
sudo apt update; sudo apt install nfs-kernel-server -y | |||
</syntaxhighlight>This will install the tools needed to run your NFS server | |||
#Create a file /etc/exports, an example:<syntaxhighlight lang="bash"> | |||
/media/music 192.168.100.0/24(ro,nosync,no_subtree_check) | |||
</syntaxhighlight>192.168.100.0/24 is an example of a subnet. Modify this to suit your home network setup. NFS options are enclosed in the brackets (). ro means ReadOnly. Refer [http://manpages.ubuntu.com/manpages/xenial/man5/exports.5.html here] for other NFS options. | |||
#Next, run the follow command to export your shares:<syntaxhighlight lang="bash"> | |||
sudo exportfs -a | |||
</syntaxhighlight> | |||
#Finally, restart nfs-server:<syntaxhighlight lang="bash"> | |||
sudo systemctl restart nfs-kernel-server | |||
</syntaxhighlight> | |||
===How to mount the exported NFS share=== | |||
To mount the NFS shares exported from your Snakeoil PC, find out the IP address of your Snakeoil PC (e.g. If your Snakeoil PC is 192.168.100.20, and you have exported /media/music). | |||
# For NFS3, the share will be:<syntaxhighlight lang="bash"> | |||
192.168.100.20:/media/music | |||
</syntaxhighlight> | |||
# For NFS4, the share will be:<syntaxhighlight lang="bash"> | |||
192.168.100.20:/music | |||
</syntaxhighlight><br /> | |||
# | |||
# | |||
[[Category:Expand]] | [[Category:Expand]] |
Latest revision as of 15:47, 18 September 2020
Introduction
This article shows the steps that will convert your Snakeoil computer into a basic NAS.
NFS-Server
Short for Network File Systems (NFS). This is the standard file sharing protocol used in Linux computers. You'll need a custom kernel to get this working.
- Download a custom Snakeoil Kernel with NFS server support. For example, the NAS kernel in this thread.
- Reboot the computer and verify you're on the NFS kernel
- SSH into your Snakeoil PC
- Run this command:This will install the tools needed to run your NFS server
sudo apt update; sudo apt install nfs-kernel-server -y
- Create a file /etc/exports, an example:192.168.100.0/24 is an example of a subnet. Modify this to suit your home network setup. NFS options are enclosed in the brackets (). ro means ReadOnly. Refer here for other NFS options.
/media/music 192.168.100.0/24(ro,nosync,no_subtree_check)
- Next, run the follow command to export your shares:
sudo exportfs -a
- Finally, restart nfs-server:
sudo systemctl restart nfs-kernel-server
To mount the NFS shares exported from your Snakeoil PC, find out the IP address of your Snakeoil PC (e.g. If your Snakeoil PC is 192.168.100.20, and you have exported /media/music).
- For NFS3, the share will be:
192.168.100.20:/media/music
- For NFS4, the share will be:
192.168.100.20:/music