Expand/nas: Difference between revisions

From Snakeoil OS Reference
Jump to navigation Jump to search
Line 8: Line 8:
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.
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].
#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
#Reboot the computer and verify you're on the NFS kernel
# SSH into your Snakeoil PC
#SSH into your Snakeoil PC
# run this command:<syntaxhighlight lang="bash">
#Run this command:<syntaxhighlight lang="bash">
apt update; apt install nfs-kernel-server -y
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>
</syntaxhighlight>
#  
#Finally, restart nfs-server:<syntaxhighlight lang="bash">
#  
sudo systemctl restart nfs-kernel-server
</syntaxhighlight>
 
=== How to mount the exported NFS share ===
<br />
 
#


#  
#


==== New Kernel ====
You'll need
[[Category:Expand]]
[[Category:Expand]]

Revision as of 14:19, 18 September 2020

!icon.png This page is still work in progress


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.

  1. Download a custom Snakeoil Kernel with NFS server support. For example, the NAS kernel in this thread.
  2. Reboot the computer and verify you're on the NFS kernel
  3. SSH into your Snakeoil PC
  4. Run this command:
    sudo apt update; sudo apt install nfs-kernel-server -y
    
    This will install the tools needed to run your NFS server
  5. Create a file /etc/exports, an example:
    /media/music 192.168.100.0/24(ro,nosync,no_subtree_check)
    
    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.
  6. Next, run the follow command to export your shares:
    sudo exportfs -a
    
  7. Finally, restart nfs-server:
    sudo systemctl restart nfs-kernel-server
    

How to mount the exported NFS share