-
Mount USB Drive
Mount USB Drive
get drive mount (/dev/sda1)
sudo cat /proc/mounts
df -h
get mount information
sudo blkid /dev/sda1
note UUID and the TYPE
vor NTFS, run:
sudo apt install ntfs-3g
mount:
sudo mkdir -p /mnt/usb1
give our pi user ownership
sudo chown -R pi:pi /mnt/usb1
modify the fstab file
sudo nano /etc/fstab
add
UUID=[UUID] /mnt/usb1 [TYPE] defaults,auto,users,rw,nofail,noatime 0 0
sudo umount /dev/sda1
sudo mount -a
sudo reboot
-
NFS Server
NFS Server
sudo apt-get install nfs-kernel-server -y
sudo mkdir /mnt/usb1
sudo chown -R pi:pi /mnt/nfsshare
sudo find /mnt/usb1/ -type d -exec chmod 755 {} \;
sudo find /mnt/usb1/ -type f -exec chmod 644 {} \;
user
id pi
sudo nano /etc/exports
mount
/mnt/usb1 *(rw,all_squash,insecure,async,no_subtree_check,anonuid=1000,anongid=1000)
-
NFS Client
NFS Client
sudo apt install nfs-common
mount ("Backup" directory)
sudo mount -t nfs -o proto=tcp,port=2049 192.168.6.3:/mnt/usb1/Backup /mnt
-
cp -r SOURCEDIR DESTINATIONDIR
-
Mounting at Boot with fstab
sudo nano /etc/fstab
add
NFSSERVERIP:/DIRECTORYTOMOUNT /mnt nfs auto 0 0
save and
sudo reboot