Editing Ploop/Mount helpers
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
+ | <translate> | ||
+ | <!--T:1--> | ||
Despite the fact that ploop is not a file system, a trick exist | Despite the fact that ploop is not a file system, a trick exist | ||
to make it look and feel like so — i.e. to use usual <code>mount</code> | to make it look and feel like so — i.e. to use usual <code>mount</code> | ||
Line 4: | Line 6: | ||
This article describes how it works and can be used. | This article describes how it works and can be used. | ||
− | == Introduction == | + | == Introduction == <!--T:2--> |
+ | <!--T:3--> | ||
ploop is not a filesystem per se, but a kernel [[w:loop device]] driver, providing a way | ploop is not a filesystem per se, but a kernel [[w:loop device]] driver, providing a way | ||
to represent a ploop image (or a set of stacked images) as a | to represent a ploop image (or a set of stacked images) as a | ||
Line 13: | Line 16: | ||
container. | container. | ||
+ | <!--T:4--> | ||
Therefore a complete ploop mount consists of two steps: | Therefore a complete ploop mount consists of two steps: | ||
# "mount" ploop image(s) to create a ploop device (/dev/ploopNNNNN) | # "mount" ploop image(s) to create a ploop device (/dev/ploopNNNNN) | ||
# mount a filesystem residing on this ploop device to a mount point | # mount a filesystem residing on this ploop device to a mount point | ||
+ | <!--T:5--> | ||
For simplicity, these two are usually wrapped to be done together in one step (say when you use ploop mount with -m option). | For simplicity, these two are usually wrapped to be done together in one step (say when you use ploop mount with -m option). | ||
In reality, step 1 is kernel assembling a device out of image(s), and step 2 is the real mount. | In reality, step 1 is kernel assembling a device out of image(s), and step 2 is the real mount. | ||
− | == Mounting == | + | == Mounting == <!--T:6--> |
+ | <!--T:7--> | ||
You can use the following syntax to mount a ploop device and the filesystem inside it: | You can use the following syntax to mount a ploop device and the filesystem inside it: | ||
− | mount -t ploop [option ...] /path/to/DiskDescriptor.xml /mount/point | + | <!--T:8--> |
+ | mount -t ploop [option ...] /path/to/DiskDescriptor.xml /mount/point | ||
+ | <!--T:9--> | ||
The following options are supported: | The following options are supported: | ||
+ | <!--T:10--> | ||
<code>-r</code>, <code>-o ro</code> | <code>-r</code>, <code>-o ro</code> | ||
: mount read-only | : mount read-only | ||
+ | <!--T:11--> | ||
<code>-v</code>, <code>--verbose</code> | <code>-v</code>, <code>--verbose</code> | ||
: be more verbose | : be more verbose | ||
+ | <!--T:12--> | ||
<code>-f</code>, <code>--fake</code> | <code>-f</code>, <code>--fake</code> | ||
: do everything except for the actual mount | : do everything except for the actual mount | ||
+ | <!--T:13--> | ||
<code>-n</code>, <code>--no-mtab</code>, <code>-s</code> | <code>-n</code>, <code>--no-mtab</code>, <code>-s</code> | ||
: these options are deliberately ignored | : these options are deliberately ignored | ||
− | == Unmounting == | + | == Unmounting == <!--T:14--> |
+ | <!--T:15--> | ||
To unmount, DiskDescriptor can be specified: | To unmount, DiskDescriptor can be specified: | ||
− | umount /path/to/DiskDescriptor.xml | + | <!--T:16--> |
+ | umount /path/to/DiskDescriptor.xml | ||
+ | <!--T:17--> | ||
A mount point can be used as well: | A mount point can be used as well: | ||
− | umount /mount/point | + | <!--T:18--> |
+ | umount /mount/point | ||
− | == Limitations == | + | == Limitations == <!--T:19--> |
+ | <!--T:20--> | ||
Note that umount can only work if: | Note that umount can only work if: | ||
# /etc/mtab is a separate file (not a symlink to /proc/mounts); | # /etc/mtab is a separate file (not a symlink to /proc/mounts); | ||
# mounting was done using <code>mount</code> (not <code>ploop mount</code>). | # mounting was done using <code>mount</code> (not <code>ploop mount</code>). | ||
+ | <!--T:21--> | ||
Otherwise, umount binary will not be able to find <code>ploop</code> as the "filesystem" | Otherwise, umount binary will not be able to find <code>ploop</code> as the "filesystem" | ||
field in /etc/mtab, and will not call <code>umount.ploop</code> helper. As a result, | field in /etc/mtab, and will not call <code>umount.ploop</code> helper. As a result, | ||
file system will be unmounted, but ploop device itself will stay mounted. | file system will be unmounted, but ploop device itself will stay mounted. | ||
− | == Alternative == | + | == Alternative == <!--T:22--> |
+ | <!--T:23--> | ||
<code>ploop mount</code> and <code>ploop umount</code> commands, | <code>ploop mount</code> and <code>ploop umount</code> commands, | ||
as described in {{Man|ploop|8}} man page. | as described in {{Man|ploop|8}} man page. | ||
− | == See also == | + | == See also == <!--T:24--> |
+ | <!--T:25--> | ||
* [[Ploop]] | * [[Ploop]] | ||
* {{Bug|2817}} | * {{Bug|2817}} | ||
+ | </translate> | ||
[[Category: Storage]] | [[Category: Storage]] |