qvm-volume.rst 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. .. program:: qvm-volume
  2. :program:`qvm-volume` -- Qubes volume and block device managment
  3. ================================================================
  4. Synopsis
  5. --------
  6. | :command:`qvm-volume` *COMMAND* [-h] [--verbose] [--quiet] [options] [arguments]
  7. Description
  8. -----------
  9. .. TODO Add description
  10. Options
  11. -------
  12. .. option:: --help, -h
  13. Show help message and exit
  14. .. option:: --verbose, -v
  15. Increase verbosity.
  16. .. option:: --quiet, -q
  17. Decrease verbosity.
  18. Commands
  19. --------
  20. list
  21. ^^^^
  22. | :command:`qvm-volume list` [-h] [--verbose] [--quiet] [-p *POOL_NAME*] [*VMNAME* [*VMNAME* ...]]
  23. List block devices. By default the internal devices are hidden. When the
  24. stdout is connected to a TTY `qvm-volume list` will print a pretty table by
  25. omitting redundant data. This behaviour is disabled when `--full` option is
  26. passed or stdout is redirected to a pipe or file.
  27. .. option:: -p, --pool
  28. list volumes from specified pool
  29. .. option:: --full
  30. print domain names
  31. .. option:: --all
  32. List volumes from all qubes. You can use :option:`--exclude` to limit the
  33. qubes set. Don't forget — internal devices are hidden by default!
  34. .. option:: --exclude
  35. Exclude the qube from :option:`--all`.
  36. aliases: ls, l
  37. info
  38. ^^^^
  39. | :command:`qvm-volume info` [-h] [--verbose] [--quiet] *VMNAME:VOLUME* [*PROPERTY*]
  40. Show information about given volume - all properties and available revisions
  41. (for `revert` action). If specific property is given, only its value is printed.
  42. For list of revisions use `revisions` value.
  43. aliases: i
  44. config
  45. ^^^^^^
  46. | :command:`qvm-volume config` [-h] [--verbose] [--quiet] *VMNAME:VOLUME* *PROPERTY* *VALUE*
  47. Set property of given volume. Properties currently possible to change:
  48. - `rw` - `True` if volume should be writeable by the qube, `False` otherwise
  49. - `revisions_to_keep` - how many revisions (previous versions of volume)
  50. should be keep. At each qube shutdown its previous state is saved in new
  51. revision, and the oldest revisions are remove so that only
  52. `revisions_to_keep` are left. Set to `0` to not leave any previous versions.
  53. aliases: c, set, s
  54. resize
  55. ^^^^^^
  56. | :command:`qvm-volume resize` [-h] [--force|-f] [--verbose] [--quiet] *VMNAME:VOLUME* *NEW_SIZE*
  57. Resize the volume with *VMNAME:VOLUME* TO *NEW_SIZE*
  58. If new size is smaller than current, the tool will refuse to continue unless
  59. `--force` option is used. One should be very careful about that, because
  60. shrinking volume without shrinking filesystem and other data inside first, will
  61. surely end with data loss.
  62. .. option:: -f, --force
  63. Force operation even if new size is smaller than the current one.
  64. aliases: extend
  65. revert
  66. ^^^^^^
  67. | :command:`qvm-volume revert` [-h] [--verbose] [--quiet] *VMNAME:VOLUME*
  68. Revert a volume to previous revision.
  69. aliases: rv, r
  70. import
  71. ^^^^^^
  72. | :command:`qvm-volume import` [-h] [--size=SIZE|--no-resize] [--verbose] [--quiet] *VMNAME:VOLUME* *PATH*
  73. Import file *PATH* into volume *VMNAME:VOLUME*. Use `-` as *PATH* to import from
  74. stdin.
  75. The tool will try to resize volume to match input size before the import. In
  76. case of importing from stdin, you may need to provide size explicitly with
  77. `--size` option. You can keep previous volume size by using `--no-resize`
  78. option.
  79. A specific use case is importing empty data to clear private volume:
  80. | :command:`qvm-volume` import --no-resize some-vm:private /dev/null
  81. Old data will be stored as a revision, subject to `revisions_to_keep` limit.
  82. .. option:: --size
  83. Provide the size explicitly, instead of using *FILE* size.
  84. .. option:: --no-resize
  85. Do not resize volume before the import.
  86. Authors
  87. -------
  88. | Joanna Rutkowska <joanna at invisiblethingslab dot com>
  89. | Rafal Wojtczuk <rafal at invisiblethingslab dot com>
  90. | Marek Marczykowski <marmarek at invisiblethingslab dot com>
  91. | Bahtiar `kalkin-` Gadimov <bahtiar at gadimov dot de>
  92. .. vim: ts=3 sw=3 et tw=80