<content/> represents a data stored on block device. Every <block_device/> has a content.
There are four types of contents:
filesystem
mapper source
none
hidden
Contents are manipulated by changing <content/> tag of <block_device/>, and submitting <block_device/> to Storage Module using “modify_bd” function.
Content properties are changed by modifying <properties/> tag.
Content is replaced, by some other content, by moving <content_template/> from <available_contents/> to <new_content/>, see bellow. It is module's responsibility to populate <available_contents/> with appropriate content_templates.
Content XML description:
<content type="content type" ... other content identifying attributes ...> <properties/> <available_contents> <content_template/> <content_template/> </available_contents> <new_content/> </content>
Every <content/> has a “type”. Type can be one of:
“filesystem” - in which case “fs_type” attribute will be present. Currently supported filesystem types are: “swap”, “extended_fs” and “gfs”
“mapper_source” - in which case “mapper_type” and “mapper_id” attributes will be present. They define <mapper/> whose source this content is.
“none” - meaning that either useless data is present, or module is not able to properly detect it.
“hidden” - internal use, eg extended partition
<properties/> tag, which has
variables for children.
Some
properties can be mutable; modifying them and sending
<block_device/> to Storage Module will commit changes to the
disk.
Contents have different set of properties defined.
Example of properties for Extended Filesystem:
<properties>
<var mutable="true" name="block_size" type="int_select" valid_values="1024;2048;4096" value="4096"/> <var mutable="true" name="dir_index" type="boolean" value="true"/> <var mutable="true" name="has_journal" type="boolean" value="true"/> <var illegal_chars="| \ /?.," max_length="16" min_length="0" mutable="true" name="label" reserved_words="" type="string" value=""/> <var mutable="true" name="fstab" type="boolean" value="false"/> <var mutable="true" name="mount" type="boolean" value="false"/> <var illegal_chars=";? *!" max_length="128" min_length="0" mutable="true" name="mountpoint" reserved_words="/;/boot;/dev/pts;/dev/shm;/proc;/sys;/usr;/music/remote;/music/local;/media/cdrecorder;/proc/bus/usb;/proc/sys/fs/binfmt_misc;/var/lib/nfs/rpc_pipefs;/home;/misc;/home/boston;/dev;/selinux" type="string" value=""/>
</properties>
<new_content/>, to which one of available content templates is moved. After submitting block device to Storage Module, current content will be replaced with this one.
<available_contents/>
contains none, one or more <content_template/>s
which can replace current content.
To replace
current content, grab one of <content_template/>s, modify its
properties, move it to <new_content/> and submit
<block_device/> to Storage Module.