diff options
author | Karel Zak | 2009-05-29 21:46:00 +0200 |
---|---|---|
committer | Karel Zak | 2009-05-29 21:46:00 +0200 |
commit | d34ac93a61984a9144f832582aab99e0a70f4e3b (patch) | |
tree | dad9c7f1554c7e2948d3703be02a58befde6c890 /mount/losetup.8 | |
parent | mount: use TAG parsing function from libblkid (diff) | |
download | kernel-qcow2-util-linux-d34ac93a61984a9144f832582aab99e0a70f4e3b.tar.gz kernel-qcow2-util-linux-d34ac93a61984a9144f832582aab99e0a70f4e3b.tar.xz kernel-qcow2-util-linux-d34ac93a61984a9144f832582aab99e0a70f4e3b.zip |
losetup: add --set-capacity
The LOOP_SET_CAPACITY allows to resize loop device size.
Example:
# blockdev --getsize64 /dev/loop0
10485760
# dd if=/dev/zero of=/home/images/aaa.img count=10 bs=1M oflag=append conv=notrunc
# blockdev --getsize64 /dev/loop0
10485760
# ./losetup --set-capacity /dev/loop0
# blockdev --getsize64 /dev/loop0
20971520
CC: J. R. Okajima <hooanon05@yahoo.co.jp>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/losetup.8')
-rw-r--r-- | mount/losetup.8 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mount/losetup.8 b/mount/losetup.8 index eae58043b..66631b724 100644 --- a/mount/losetup.8 +++ b/mount/losetup.8 @@ -48,7 +48,14 @@ Setup loop device: .RB [ \-r ] .RB { \-f [ \-\-show ] | \fIloopdev\fP } .I file +.sp .in -13 +Resize loop device: +.sp +.in +5 +.B "losetup \-c" +.I loopdev +.in -5 .ad b .SH DESCRIPTION .B losetup @@ -75,6 +82,8 @@ and finds the module that knows how to perform that encryption. .SH OPTIONS .IP "\fB\-a, \-\-all\fP" show status of all loop devices +.IP "\fB\-c, \-\-set-capacity\fP \fIloopdev\fP +force loop driver to reread size of the file associated with the specified loop device .IP "\fB\-d, \-\-detach\fP \fIloopdev\fP [\fIloopdev\fP ...]" detach the file or device associated with the specified loop device(s) .IP "\fB\-e, \-E, \-\-encryption \fIencryption_type\fP" |