Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mounting disk/file into ling #139

Open
kansi opened this issue Oct 24, 2015 · 4 comments
Open

Mounting disk/file into ling #139

kansi opened this issue Oct 24, 2015 · 4 comments

Comments

@kansi
Copy link

kansi commented Oct 24, 2015

I wanted to know if I can mount disk or files into LING VM and read & write to them ?

I tried mounting by specifying the disk = ['file:/tmp/file.dat,hda,rw'] or disk = ['phy:/dev/sda3,hda,rw'] in the domain_config but I am not sure how to check if it worked and how to create files onto it ?
I know that I will need to use 9p to achieve the read write part but not sure how to access the disk ?

@EarlGray
Copy link
Contributor

There is only a rudimentary support for disks (Xen vbd devices): check out core/arch/xen/ol_disk.c (you have to uncomment LING_CONFIG_DISK in the top-level Makefile to build Ling with the disk outlet support). ol_disk a port type that allows you to read and write blocks of data from a block device, but there is no filesystem implementations except 9p protocol to access other 9p servers (see apps/kernel/src/9p_mounter.erl).

Xen implementation of file module is a stub that falls back into a read-only image in RAM, created by railing at build time.

So, if you want a persistent storage in the current state, set up a 9p server elsewhere and communicate with it. In case you are ready to implement some filesystem functionality, your contributions will be appreciated.

@kansi
Copy link
Author

kansi commented Oct 24, 2015

Can you explain how can I go about implementing filesystem functionality ? (Just trying to see how hard it can be !)

@kansi
Copy link
Author

kansi commented Oct 24, 2015

isn't GooFs http://erlangonxen.org/blog/goofs-simple-filesystem the solution I am looking for.

@maximk
Copy link
Contributor

maximk commented Oct 24, 2015

I would recommend you try diod (the standard 9p server) and connect to it from inside LING. Alternatively, you can use the (non-standard) GooFS. Note that you will not be able to read the GooFS partition from Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants