Virtual file system (VFS) or Virtual filesystem switch is an abstraction layer on top of a more concrete file system. The purpose of a VFS is to allow for client applications to access different types of concrete file systems in a uniform way. A VFS can for example be used to access local and network storage devices transparently without the client application noticing the difference. Or it can be used to bridge the differences in Windows, Mac OS and Unix filesystems, so that applications could access files on local file systems of those types without having to know what type of file system they’re accessing.
More info about VFS:
- You can learn more about Linux VFS here
- Vnodes: An Architecture for Multiple File System Types in Sun UNIX
- Book Understanding the Linux Kernel 2nd Ed
Under Linux you can create a Virtual File System as follows
Use dd command to create a VFS disk image (5 MB):
$ dd if=/dev/zero of=/tmp/vfs-disk count=10240
Format your disk image with mkfs.ext3 command:
$ mkfs.ext3 /tmp/vfs-disk
When prompted for confirmation type ‘y’ to format VFS disk image.
Mounting VFS with a loopback device:
# mkdir -p /mnt/vfs0
# mount -o loop=/dev/loop0 /tmp/vfs-disk /mnt/vfs0
It will act as a normal file system. You can take this image to other computer and mount it.
🐧 0 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |