nas:build_a_linux_nas:mount_the_raid_array
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
nas:build_a_linux_nas:mount_the_raid_array [2021/09/25 16:14] – created peter | nas: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 | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Set Permissions of the Mount ===== | ||
+ | |||
+ | <code bash> | ||
+ | chmod 0777 /mnt/nas | ||
+ | </ | ||
+ | |||
+ | <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. | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Check how much disk space is available in the RAID ===== | ||
+ | |||
+ | <code bash> | ||
+ | df -h /mnt/nas | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | ===== Check the Mount ===== | ||
+ | |||
+ | <code bash> | ||
+ | lsblk | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | NAME | ||
+ | sda 8:0 0 232.9G | ||
+ | ├─sda1 | ||
+ | ├─sda2 | ||
+ | ├─sda3 | ||
+ | ├─sda4 | ||
+ | sdb 8:32 | ||
+ | ├─md0 | ||
+ | sdc 8:48 | ||
+ | ├─md0 | ||
+ | sdd 8:64 | ||
+ | ├─md0 | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Test writing to the mounted array ===== | ||
+ | |||
+ | <code bash> | ||
+ | sudo touch / | ||
+ | ls -al /mnt/nas/ | ||
+ | </ | ||
+ | |||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Ensure the array always get mounted on boot ===== | ||
+ | |||
+ | <code bash> | ||
+ | echo '/ | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | /dev/md0 /mnt/nas ext4 defaults, | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | 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> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
nas/build_a_linux_nas/mount_the_raid_array.1632586477.txt.gz · Last modified: 2021/09/25 16:14 by peter