Updated Nov 17, 2024
I have the following Synology NAS's:
Model | Year | Bays | RAID | Capacity |
---|---|---|---|---|
DS220+ | 2020 | 2 | 1 | 10.5 |
DS1819+ | 2019 | 8 | 5 | 26.2 |
DS1511+ | 2011 | 5 | 5 | 10 |
Synology usually supports their NAS's for at least 10 years. Unfortunately, my DS1511+ is no longer supported. It does not receive security updates. It runs DiskStation 6.2. It is stuck at SMB 2.0, and its file system is ext4, and not Btrfs (B-Trees File System).
Btrfs is a modern file system the focuses on fault tolerance and snapshots.
Regards of which method is use, to mount a drive via the Common Internet File System (cifs), the cifs utilities must be installed:
sudo apt install cifs-utils
You can enter the parameters for mounting a shared drive into /etc/fstab with the noauto,users options. Noauto will prevent the share from being mounted on startup, and users will allow any user (regular or sudoer) to mount the drive [1].
Example fstab entry:
//NAS_IP/Shared_Folder /media/mounting-point-directory cifs username=NAS_user_name,noauto,users,vers=3.0,rw
With this code in the /etc/fstab file, any user can mount the drive with:
mount /media/mounting-point-directory
Similarly, to unmount the drive:
umount /media/mounting-point-directory
On Debian LXDE and the Raspberry Pi OS, you can set the "Desktop Preferences" to show mounted drives on the desktop.
The methods below for mounting a share are for sudoer users only and are not as good as this method.
For this to work with Federa 39, you have to set the setuid flag on "mount.cifs:.
sudo chmod u+s /bin/mount sudo chmod u+s /bin/umount sudo chmod u+s /usr/sbin/mount.cifs
On Debian and the Raspbery PI OS, the setuid flag is alreadt set.
The Common Internet File System (cifs) is a Linux implementation of the Server Message Block (SMB) protocol developed by Microsoft. It is a secure protocol.
If cifs-utils is not installed, install it:
sudo apt install cifs-utils
The command line for mounting a Synology NAS with cifs is:sudo mount -t cifs -o username=NAS_user_name,domain=WORKGROUP,password=NAS_passwd,vers=3.0,rw,uid=1000,gid=1000 //192.168.xxx.xxxx/shared_folder /home/user_name/mounting_point_directory
umount NOT unmount .
To unmount a drive:
sudo umount mounting-point-directory
The Network File System (nfs) was developed by Sun Microsystems. It is very popular with Linux community. However, it is not a secure protocol. It does not require a username and password. The command line for mounting a Synology NAS with nfs is:
sudo mount 192.168.xxx.xxxx:/volume1/shared_folder /home/user_name/mounting_point_directory
Note that in the mount statement for nfs, there is a colon after the IP address, and that volume1 is included in the full address of the shared Folder.
If you know the drives name, you can unmount the drive via:
sudo umount drive_name
To determine the drive_name, see next section.
Many Linux distros do not have lsblk installed. To install on Debian or Ubuntu:
sudo apt install util-linux
-a | all |
-l | list |
-f | filesystem types |
list block is not listing network drives mounted with cifs (Microsoft SMB).
fdisk -l (list partitions)
format disk list is not listing network drives mounted with cifs (Microsoft SMB).
findmnt
findmnt DOES list drives mounted with cifs (Microsoft SMB).
lsusb list usb drives