• Export to OpenOffice
  • Export to PDF

Network Attached Storage

Network Attached Storage(NAS) is a file level storage solution that can provide several computers and network attached devices access to files. One way I use a NAS server is to provide my family with access to downloaded movies and music. I also use a NAS server to serve up installation files for my Windows PXE installer . Here is one way to build a NAS server…

NAS Server: Built on a Raspberry Pi

Building the server

Update and install necessary packages

sudo apt-get update
sudo apt-get install samba samba-common-bin ntfs-3g

Make a directory to mount our USB drive then mount the USB drive

sudo apt-get install ntfs-3g
mkdir /media/usbshare
sudo mount -t ntfs-3g /dev/sda1 /media/usbshare/

Note: If your drive is not NTFS replace ntfs-3g with vfat Mount your USB drive at startup by editing you fstab file. Always make a backup

sudo cp /etc/fstab /etc/fstab.backup
sudo nano /etc/fstab
   Add the following to your fstab file:
      /dev/sda1 /media/usbshare ntfs-3g rw,defaults 0 0
   Note: use fdisk to find your usb drive. In this case mine was sda1
sudo chmod 775 /media/usbshare

Reboot and make sure your usb drive mounts correctly Next, create a samba user and edit the smb.conf file

sudo smbpasswd -a "YourUsername"
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
sudo nano /etc/samba/smb.conf
  Find and edit/add the following lines:
      workgroup = "YourWorkGroup"    #Commonly "WORKGROUP"#
      security = user
      socket options = TCP_NODELAY
      path = /media/usbshare
      comment = "Your Comment"
      valid users = "YourUser"
      writeable = yes
      browseable = yes
testparm    #makesure your config is good#

If you find you hard drives going into standby (having to spin up every time you access them). Run this command to keep them spinning all the time.

hdparm -S 0 /dev/sdb

There are other options just run the following to see the full list

man hdparm

Connecting to your network share



  • Export to OpenOffice
  • Export to PDF