[sheepdog] [PATCH 7/9] Doc. "Sheepdog Advanced" add chapter "vdi read and write"
Valerio Pachera
sirio81 at gmail.com
Fri Oct 11 17:53:16 CEST 2013
Signed-off-by: Valerio Pachera <sirio81 at gmail.com>
---
doc/vdi_read_and_write.rst | 61 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100644 doc/vdi_read_and_write.rst
diff --git a/doc/vdi_read_and_write.rst b/doc/vdi_read_and_write.rst
new file mode 100644
index 0000000..5ec4c80
--- /dev/null
+++ b/doc/vdi_read_and_write.rst
@@ -0,0 +1,61 @@
+VDI Read And Write
+==================
+
+To read a vdi means to send its content in the output standard.
+It's analogous to 'cat mydisk.img' or 'dd if=mydisk.img'.
+You can use it to create raw images of your vdi.
+
+::
+
+ dog vdi read myvdi > /media/nas/myvdi.img
+
+Note that all virtuall space will be read, so if you vdi size is 10G and only
+2G are used, myvdi.img size will be 10G anyway.
+
+Viceversa, 'write' function will read from standard input end write to vdi.
+
+::
+
+ dog vdi write myvdi < /media/nas/myvdi.img
+
+*Note:* vdi write will not create a vdi, you have to do it first.
+
+*Note 2:* you can also specifie an offset and lenght.
+You can specify the unit of misure (K,M,G)(case insensitive).
+Default is byte.
+
+**Another example:**
+
+::
+
+ dog vdi read myvdi $((2048*412)) $((204800*512)) | gzip -c > /media/nas/myvdi_sda1.img.gz
+
+This is going to save the first partition of the vdi in a compressed file.
+This is the partition shown using sectors and MB.
+
+::
+
+ cfdisk -P t /dev/sda
+ Partition Table for /dev/sda
+
+ ---Starting---- ----Ending----- Start Number of
+ # Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors
+ -- ----- ---- ---- ----- ---- ---- ---- ----- ----------- -----------
+ 1 0x80 32 33 0 0x07 223 19 12 2048 204800
+ 2 0x00 223 20 12 0x07 218 28 6078 206848 97449984
+ 3 0x00 218 29 6078 0x8E 47 46 60801 97656832 879114240
+ 4 0x00 0 0 0 0x00 0 0 0 0 0
+
+
+ Disk Drive: /dev/sda
+ Size: 500107862016 bytes, 500.1 GB
+ Heads: 255 Sectors per Track: 63 Cylinders: 60801
+
+ Name Flags Part Type FS Type [Label] Size (MB)
+ ----------------------------------------------------------------------------
+ Pri/Log Free Space 1,05 *
+ sda1 Boot Primary ntfs [Riservato per il] 104,86 *
+ sda2 Primary ntfs 49894,40 *
+ sda3 Primary LVM2_member 450106,50 *
+ Pri/Log Free Space 1,08 *
+
--
1.7.10.4
More information about the sheepdog
mailing list