There are multiple methods to mount Storage box in your Linux server, we will explain 2 of them:
a. Mount via CIFS/SMB b. WebDAV Mount
a. Mount via CIFS/SMB: 1. Run the below command to install Ubuntu: # sudo apt install sshfs -y RedHat: # sudo dnf install fuse-sshfs -y
2. Create a mount Directory. # sudo mkdir -p /mnt/storagebox_smb
3. Create a credential file. # vi /etc/storagebox.creds username=USERNAME password=PASSWORD
4. Set the correct permission. #sudo chmod 600 /etc/storagebox.creds
5. Run below command to mount the storage box. mount -t cifs //HOSTNAME/USERNAME /mnt/storagebox_smb \ -o vers=3.0,credentials=/etc/storagebox.creds,uid=0,gid=0,file_mode=0777,dir_mode=0777,sec=ntlmssp
6. Check the mount. # df -h | grep storagebox
7. For auto mount, please add below line in /etc/fstab file. //HOSTNAME/USERNAME /mnt/storagebox_smb cifs vers=3.0,credentials=/etc/storagebox.creds,uid=0,gid=0,file_mode=0777,dir_mode=0777,sec=ntlmssp 0 0
b. WebDAV Mount 1. Run the below command to install davfs2 On Ubuntu: # sudo apt install davfs2 -y On RedHat/Rocky/AlmaLinux/CentOS: # sudo dnf install davfs2 -y
2. Create a directory on which you want to mount. # sudo mkdir -p /mnt/storagebox
3. Add details of a storage box in the secrets file: # vi /etc/davfs2/secrets
FULL_URL_WITH_HTTPS USERNAME PASSWORD
4. Save it and set correct permission. # sudo chmod 600 /etc/davfs2/secrets
5. Add below line in /etc/davfs2/davfs2.conf # vi /etc/davfs2/davfs2.conf use_locks 0 ignore_dav_header 1
6. Mount using below command. # sudo mount -t davfs FULL_URL_WITH_HTTPS /mnt/storagebox
7. Verify mount. df -h | grep storagebox
8. For auto mount, please add below line in /etc/fstab file. FULL_URL_WITH_HTTPS /mnt/storagebox davfs rw,_netdev 0 0
Comments (0)
Leave a Reply
Your email address and mobile will not be published.