| 1 | == How to save a disk image from one node == |
| 2 | |
| 3 | Once you have the image prepared the way you want it. On the node run: |
| 4 | |
| 5 | {{{ |
| 6 | console> ssh root@sdr2-lg1.sb1.cosmos-lab.org |
| 7 | root@sdr-console: ./prepare.sh |
| 8 | }}} |
| 9 | |
| 10 | This will remove udev rules (to prevent renaming of interfaces) and dump log files to lower the size of the image. It also shutdown the node. |
| 11 | |
| 12 | Once the node has been shutdown, to save the existing disk image running on the node, use the ''omf save'' command: |
| 13 | |
| 14 | {{{ |
| 15 | console> omf save -n sdr2-lg1.sb1.cosmos-lab.org |
| 16 | }}} |
| 17 | |
| 18 | The output of this image saving process will look like the following: |
| 19 | |
| 20 | {{{ |
| 21 | |
| 22 | INFO NodeHandler: OMF Experiment Controller 5.4 (git c005675) |
| 23 | INFO NodeHandler: Slice ID: pxe_slice |
| 24 | INFO NodeHandler: Experiment ID: pxe_slice-2013-02-06t14.14.46-05.00 |
| 25 | INFO NodeHandler: Message authentication is disabled |
| 26 | INFO Experiment: load system:exp:stdlib |
| 27 | INFO property.resetDelay: resetDelay = 230 (Fixnum) |
| 28 | INFO property.resetTries: resetTries = 1 (Fixnum) |
| 29 | INFO Experiment: load system:exp:eventlib |
| 30 | INFO Experiment: load system:exp:saveNode |
| 31 | INFO property.node: node = "node1-1.sb1.orbit-lab.org" (String) |
| 32 | INFO property.pxe: pxe = "1.1.6" (String) |
| 33 | INFO property.domain: domain = "grid.orbit-lab.org" (String) |
| 34 | INFO property.started: started = "false" (String) |
| 35 | INFO property.image: image = nil (NilClass) |
| 36 | INFO property.resize: resize = nil (NilClass) |
| 37 | WARN exp: Saving only works for ext2/ext3 partitions and MBR (msdos) partition tables. Saving any other filesystem or partition table type will produce a 0 byte image. |
| 38 | INFO Topology: Loading topology 'node1-1.sb1.orbit-lab.org'. |
| 39 | INFO Experiment: Resetting resources |
| 40 | INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb1.orbit-lab.org) [0 sec.] |
| 41 | . |
| 42 | . |
| 43 | . |
| 44 | INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb1.orbit-lab.org) [80 sec.] |
| 45 | INFO ALL_UP: Event triggered. Starting the associated tasks. |
| 46 | INFO node1-1.sb1.orbit-lab.org: |
| 47 | INFO node1-1.sb1.orbit-lab.org: - Saving image of '/dev/sda' on node 'node1-1.sb1.orbit-lab.org' |
| 48 | INFO node1-1.sb1.orbit-lab.org: to the file 'bob-node-node1-1.sb1.orbit-lab.org-2013-02-06-14-16-23.ndz' on host '10.10.0.42' |
| 49 | INFO node1-1.sb1.orbit-lab.org: |
| 50 | INFO property.started: started = "true" (String) |
| 51 | INFO exp: |
| 52 | INFO exp: - Saving process started at: Wed Feb 06 14:16:27 -0500 2013 |
| 53 | INFO exp: (this may take a while depending on the size of your image) |
| 54 | INFO Experiment: DONE! |
| 55 | INFO ExecApp: Application 'commServer' finished |
| 56 | INFO run: Experiment sb1_2008_07_20_23_38_04 finished after 9:19 |
| 57 | done. |
| 58 | |
| 59 | }}} |
| 60 | |
| 61 | At the end of the ''saving'' process, you will have disk image file with the name: ''"bob-node-sdr2-lg1.sb1.cosmos-lab.org-2013-02-06-14-16-23.ndz"'' in the directory ''"/export/omf/omf-images"'' on the machine with the host name ''"frisbee"''. These information are all provided in the output displayed above. |
| 62 | |
| 63 | You can then reload this disk image on a node (or nodes) using the ''omf load'' command. |