1

This answer states:

A mounted network share will have a deviceId which is why you can create a symlink to a mounted location.

So, if "a mounted network share will have a deviceId", files mounted with sshfs will have a physical device associated with them, like any other filesystem would do. I mounted a remote directory in the local system (Ubuntu 14.04) with

sshfs user@remotehost:/remote/directory /home/local/directory

In the output of mount of the local system a corresponding line is correctly displayed:

user@remotehost:/remote/directory on /home/local/directory type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

For all the files in /home/local/directory/, stat outputs Device: 30h/48d. But neither in /sys/dev/block, nor in /sys/dev/char there is such a local device with major number 3!

So, what kind of device is it where can I find it in my local system?

BowPark
  • 4,895

1 Answers1

2

Sshfs uses FUSE, the File System in UserSpace infrastructure, so it's not associated to a block device at all (and of course not to a character device, either). I don't know how the device number stats output is related to that kernel infrastructure, if it is related at all and not just random content.

dirkt
  • 32,309
  • I updated my question with a link. Have a look, if it can be useful. – BowPark Mar 01 '17 at 09:55
  • The question in your link is about symlinks (which do have real inodes in a real filesystem), not about inodes represented by fuse. So it's completely unrelated, and not useful. – dirkt Mar 01 '17 at 09:59
  • It states: «a mounted network share will have a deviceId which is why you can create a symlink to a mounted location». I think the first part of the sentence is relevant here. – BowPark Mar 01 '17 at 10:24
  • 2
    @BowPark As dirkt explains, the deviceId value is does not identify an actual block device. It's a made-up value to have something in the deviceId field. – Gilles 'SO- stop being evil' Mar 01 '17 at 22:31