When we <code>stat()</code> a file we can get on which device it resides by checking the <code>st_dev</code> value. However, kernel exposes the device value in some more places. In particular, the device is shown in the <code>/proc/$pid/[mounts|mountinfo]</code> files and in the <code>/proc/$pid/s?maps</code> ones. Moreover, the sock-diag subsystem recently added into the kernel, reveals the device (and inode) on which a unix socket is bound. | When we <code>stat()</code> a file we can get on which device it resides by checking the <code>st_dev</code> value. However, kernel exposes the device value in some more places. In particular, the device is shown in the <code>/proc/$pid/[mounts|mountinfo]</code> files and in the <code>/proc/$pid/s?maps</code> ones. Moreover, the sock-diag subsystem recently added into the kernel, reveals the device (and inode) on which a unix socket is bound. |