Managing Linux Filesystems

Rank and File

SSHFS for Remote Filesystems

Mounting a filesystem locally via SSH is not rocket science with sshfs. You don't even need root privileges because it is a Filesystem in Userspace. As shown in Listing 3, a call to sshfs is sufficient to mount the /home/tktest directory locally on server 192.168.56.105. You can work with the target directory as with any other normal directory, even though it is on the remote server.

Listing 3

Mount /home/tktest Directory

$ sshfs tktest@192.168.56.105:/home/tktest ./sshdir/
tktest@192.168.56.105's password:
$ cat /proc/mounts | grep ssh
tktest@192.168.56.105:/home/tktest /home/user/tmp/sshdir fuse.sshfs rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0

Conclusion

As an alternative to the simple block devices featured so far, you can create stackable block devices that offer additional features, such as the Logical Volume Manager (LVM) already discussed, software RAID (MD/RAID), a distributed replicated block device (DRBD), or device mapper targets.

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus