summaryrefslogtreecommitdiff
path: root/hurd/libstore/examples
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2009-05-20 09:34:58 +0200
committerThomas Schwinge <tschwinge@gnu.org>2009-05-20 09:43:33 +0200
commit1fa5485bc29dc9f62bc5f4874dfd09daec539ca1 (patch)
tree3eb6ec7626a8f130d9082f990ce7adab2b399d6e /hurd/libstore/examples
parent52473c478efac9c86918e4e2ff6e7d575bc61918 (diff)
hurd/libstore/examples/ramdisk: New file.
Explain how to create a simple ramdisk based on the zero store routed through the copy store. Notice a ext2fs bug.
Diffstat (limited to 'hurd/libstore/examples')
-rw-r--r--hurd/libstore/examples/ramdisk.mdwn32
1 files changed, 32 insertions, 0 deletions
diff --git a/hurd/libstore/examples/ramdisk.mdwn b/hurd/libstore/examples/ramdisk.mdwn
new file mode 100644
index 00000000..069319fb
--- /dev/null
+++ b/hurd/libstore/examples/ramdisk.mdwn
@@ -0,0 +1,32 @@
+[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+ $ settrans --create --active ramdisk0 /hurd/storeio -T copy zero:32M
+ $ mkfs.ext2 -F -b 4096 ramdisk0
+ [...]
+ $ settrans --active --orphan ramdisk0 /hurd/ext2fs.static ramdisk0
+ $ df -h ramdisk0/
+ df: Warning: cannot read table of mounted file systems
+ Filesystem Size Used Avail Use% Mounted on
+ - 32M 1.1M 30M 4% /media/data/home/tschwinge/ramdisk0
+
+This uses [[settrans]] and [[storeio]] to create a ramdisk of 32 MiB by routing
+a thusly sized [[zero store|zero]] through the [[copy store|copy]], connecting
+that to the `ramdisk0` node, create a `ext2` filesystem on it, and replace the
+translator running on the `ramdisk0` node with a instance of the [[`ext2fs`
+translator|translator/ext2fs]] running on the same node ([[translator
+stacking|translator/stacking]]).
+
+It is a [[!taglink open_issue_hurd]] why this does only work with
+`ext2fs.static`, but not the dynamically linked `ext2fs` (`settrans:
+/hurd/ext2fs: Translator died`).
+
+A (better) alternative would be using the [[`tmpfs`
+translator|translator/tmpfs]], but that one is broken at the moment.