File: add-ext4-workshop.txt

package info (click to toggle)
libconfig-model-perl 2.021-3%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,104 kB
  • sloc: perl: 20,550; makefile: 11
file content (101 lines) | stat: -rw-r--r-- 3,568 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Practical workshop for Config::Model
-------------------------------------------

Objevtive of this workshop:
- improve fstab model (MyFstab class) to support ext4 

- open file fstab/MyFstab.pl with favorite text editor
  This file contains a Perl data structure which describes
  the MyFstab configuration class. Note that no backend are 
  specified. Read and write are handled in test script (old demo)
 
- open model graphical editor
  $ config-model-edit -model MyFstab

- Open class Fs -> element -> fs -> type
                                    cargo -> config_class_name
  What do these parameters (type and cargo) mean? 
  Which class is to be explored next to better understand the structure
  of /etc/fstab configuration?

- explore next class (MyFstab::FsLine)
   MyFstab::FsLine -> element -> fs_vfstype -> type
                                               value_type
                                               choice
   What are there choices ? 
   How are these choices connected with fstab(5) man page ?

- In MyFstab::FsLine, what is the element representing the mount options ?

- explore this element:
  note the type: what does this mean ?
  open follow item: f1 is a variable name. The value of this variable
    is extracted from the tree using the path shown.
  open rules: 
    * formula ($f1 eq 'ext3') is a test condition related to ext3 
    * When this condition is satisfied, the parameters associated with
     this formula are applied. Look for applied parameter

- create new MyFstab::Ext4FsOpt 
  open class mentioned by the rule above with edit (or right-click)
  select ext3 class
  click on keep
  replace 3 by 4
  click copy

- open ext4 class -> element

- open mkfs.ext4 man page 
  * Note that ext4 features all ext3 and ext2 options
  * look for 'extended_options' in this man page.
    These are 3 integer and 2 booleans parameters

- Arrange Ext4 to offer all ext3 options
  open MyFstab::Ext4Options -> include
  set include to MyFstab::Ext3FsOpt
  
- create these elements:
  * open/edit Ext4options->element
    select journalling-mode click 'remove selected'
    type 'stride' in entry click add, repeat for other elements
  
  * open/edit stride
    In type drop-down box, select 'leaf'
    in value_type box, select integer
    cut'n'paste description from man page, paste on 'description' item in tree,
    in right part of window, click edit , cleanup, store (in tree)
  
  * open/edit Ext4options->element
    select stride
    enter stripe-width -> copy
    open/edit stripe-width -> description, click delete
    cut'n'paste man page in value field, cleanup, store

- Now it's time to offer the relevant choice
    open/edit class MyFstab::Fsline element fs_fstype choice 
    enter 'ext4' in entry beside 'push item'. click 'push item'

- And enter the relevant rules in fs_mntopts
    open/edit class MyFstab::Fsline element fs_mntopts rules
    select copy ext3 entry in ext4 
    (if modif does not show up (bug) -> close and open tree)

- In menu bar, click Model-> test
  open fs -> empty, which is normal -> no fstab file is read

  if problem with Model->test, 
   run 'config-edit -model MyFstab -model_dir lib/Config/Model/models'

- add a new file system to test ext4
  * add a new label (suggests mount point): home 
  * open label
  * set fs_spec to /dev/sda1
  * set fs_file to /home
  * fs_vfstype to ext4
    Note the new available mount options, including the stripe parameter 
   (for ext4) and journalling_mode (ext3)


Remember: it's a demo, there's no code to write back fstab.. yet