User Tools

Site Tools


nas:build_a_linux_nas:mount_the_raid_array

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
nas:build_a_linux_nas:mount_the_raid_array [2021/09/25 16:14] – created peternas:build_a_linux_nas:mount_the_raid_array [2021/09/26 12:04] (current) – [Ensure the array always get mounted on boot] peter
Line 1: Line 1:
 ====== NAS - Build a Linux NAS - Mount the RAID Array ====== ====== NAS - Build a Linux NAS - Mount the RAID Array ======
 +
 +===== Mount the Array =====
 +
 +<code bash>
 +sudo mkdir /mnt/nas
 +sudo mount /dev/md0 /mnt/nas
 +</code>
 +
 +----
 +
 +===== Set Permissions of the Mount =====
 +
 +<code bash>
 +chmod 0777 /mnt/nas
 +</code>
 +
 +<WRAP info>
 +**NOTE:** This will allow all users to have access to this location.
 +
 +  * This could be restricted to only specific users or groups as required.
 +
 +</WRAP>
 +
 +----
 +
 +===== Check how much disk space is available in the RAID =====
 +
 +<code bash>
 +df -h /mnt/nas
 +</code>
 +
 +returns:
 +
 +<code bash>
 +</code>
 +
 +----
 +
 +
 +===== Check the Mount =====
 +
 +<code bash>
 +lsblk
 +</code>
 +
 +returns:
 +
 +<code bash>
 +NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
 +sda                      8:0    0 232.9G  0 disk 
 +├─sda1                   8:   0  1007K  0 part 
 +├─sda2                   8:   0   512M  0 part /boot/efi
 +├─sda3                 253:28       8G  0 part [SWAP]
 +├─sda4                 253:29      58G  0 part /
 +sdb                      8:32    14.6T  0 disk 
 +├─md0                    9      0  14.6T  0 raid5 /mnt/nas
 +sdc                      8:48    14.6T  0 disk 
 +├─md0                    9      0  14.6T  0 raid5 /mnt/nas
 +sdd                      8:64    14.6T  0 disk 
 +├─md0                    9      0  14.6T  0 raid5 /mnt/nas
 +</code>
 +
 +----
 +
 +===== Test writing to the mounted array =====
 +
 +<code bash>
 +sudo touch /mnt/nas/test
 +ls -al /mnt/nas/
 +</code>
 +
 +returns:
 +
 +<code bash>
 +total 24
 +drwxr-xr-x 3 root root 4096 Feb 14 11:19 .
 +drwxr-xr-x 4 root root 4096 Feb 14 11:19 ..
 +drwx------ 2 root root 16384 Feb 14 11:19 lost+found
 +-rw-r--r-- 1 root root 0 Feb 14 11:19 test
 +</code>
 +
 +----
 +
 +===== Ensure the array always get mounted on boot =====
 +
 +<code bash>
 +echo '/dev/md0 /mnt/nas ext4 defaults,nofail 0 0' | sudo tee -a /etc/fstab
 +</code>
 +
 +returns:
 +
 +<code bash>
 +/dev/md0 /mnt/nas ext4 defaults,nofail 0 0
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  This adds an entry into the **/etc/fstab** file.
 +
 +The **x-gvfs-show** option can also be used, which will let you see the RAID in the sidebar of the gnome file manager.
 +
 +<code bash>
 +/dev/md0  /mnt/nas ext4 defaults,x-gvfs-show 0 0
 +</code>
 +
 +</WRAP>
 +
  
nas/build_a_linux_nas/mount_the_raid_array.1632586477.txt.gz · Last modified: 2021/09/25 16:14 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki