mounting devices

  • From: Robert Gifford <robertgif@xxxxxxxxx>
  • To: rumpkernel-users <rumpkernel-users@xxxxxxxxxxxxx>
  • Date: Fri, 12 Jun 2015 10:37:16 -0400

Hello!

I'm looking to mount a ram based filesystem as ext2. By registering the
filesystem with rump_pub_etfs_register as a block device within my
application, I am able to then make successful open, read and write calls.
(This device is simply a char array implemented at the rumpuser hypercall
level). I'm trying to mount the device to a new directory, /mnt.

Calling mount from my application however, results in errno 22, or an
invalid argument according to errno.h for NetBSD. Making a unikernel with
the mount_ext2fs application and adding the device and directory in that
program results in the same error.

An invalid argument error leads me to believe that I'm simply passing in
incorrect argument, but I can't spot anything that is off:

mount(MOUNT_EXT2FS, "/mnt", 0, &args, size)

The 0 represents no flags to be passed in.
args is a struct ufs_args which contains only the char pointer, fspec,
which I believe to be the location of the device you wish to mount:
"/dev/paws"

Am I missing some crucial step prior to mounting? I'm reaching out as I am
worried I am forgetting something important, but I will continue to walk
through the code with GDB.

I can always provide extra context information.

Thank you for any and all help / advice,

Robbie

Other related posts: