Creating A Browseable Virtual File Archive In Linux

In Linux, there are many ways to create a virtual file archive. A virtual file archive is a storage file which immitates an inode storage device, meaning its similar to what a physical drive can do but contained in a single archive. So how do we create this virtual file archive? What we will be using is the most primitive way to create a virtual file archive using Linux built in tool set.

The secret to happiness is freedom…​ And the secret to freedom is courage.
— Thucydides.

Prerequisites

The tooling that we will be using is already built in Linux. To be transparent what I’m currently using is Arch Linux.

  • dd
  • losetup
  • mount

So what do we do now?

Create the file that will be using as file archive.

dd if=/dev/zero of=gem.bin bs=1024 count=0 seek=1G

Setup a loop block device to handle input/output (emulating physical drives).

losetup /dev/loop0 gem.bin

Create the mountable directory.

mkdir -p /mnt/vfa

Mount the loop block device to the mountable directory.

mount -t ext3 /dev/loop0 /mnt/vfa

So guys, if you like this article hit like and subscribe.
Hope you guys, enjoyed this article and as always live life!

Popular posts from this blog

Top Three DNS Providers That Provides Good Service in SEA (Southeast Asia)

Sending Email Using MailKit in ASP.NET Core Web API

Dirty Logging With Serilog For ASP.NET 5