Web lists-archives.com

Re: A Basic Mount Observation




On 5/7/19 12:02 PM, Cindy Sue Causey wrote:
I didn't fully *cognitively* grasp what you're saying, BUT I did grasp
enough to attempt the following via xfce4-terminal:

$ cd /mountpoint
$ ls
$ *(anticipated) crickets*
$ sudo (YEAH, I KNOW!) mount LABEL=buster-backup /mountpoint
$ ls
$ *mammoth-sized crickets*

I would never have thought to do it this way.  It always made more sense to be in the directory just above the actual mount point.  Say I have a directory /mnt/tom.  I would:

cd  /mnt

mount /dev/whatever tom

ls tom

... would show the contents of what was just mounted if there were no errors. 

If you have the following line in /etc/fstab (and the fuse programs necessary):

sshfs#sue@cindyslaptop:/home/sue                         /mnt/sue         fuse        user,noauto,rw    0       0

and run:

cd /mnt

mount sue

ls sue

... would show sue's directory on cindyslaptop.  Notice that since there is an entry for /mnt/sue in fstab you only need to mount the directory /mnt/sue.

I use this to mount a directory on a remote machine locally after setting up public key authentication so it doesn't even ask for a password.   This could also be used with file systems in /dev but they would always need to be the same name (like /dev/sdc1) or some other way to identify the exact drive to be mounted like the drives UUID. 


...Bob