summaryrefslogtreecommitdiffstats
path: root/sys-utils/losetup.8
diff options
context:
space:
mode:
authorKarel Zak2019-01-22 11:50:20 +0100
committerKarel Zak2019-01-22 11:50:20 +0100
commit422f0e9f206a145c59a71333dad20d38cbbfc0c4 (patch)
tree3f63202271f075dc36b6a7582d633beb39f354f5 /sys-utils/losetup.8
parentlib/loopdev: set blocksize when create a new device (diff)
downloadkernel-qcow2-util-linux-422f0e9f206a145c59a71333dad20d38cbbfc0c4.tar.gz
kernel-qcow2-util-linux-422f0e9f206a145c59a71333dad20d38cbbfc0c4.tar.xz
kernel-qcow2-util-linux-422f0e9f206a145c59a71333dad20d38cbbfc0c4.zip
losetup: properly use --sector-size when create a new device
The --partscan functionality depends on sector size. Make sure sector size is set before we force kernel to scan the device for partitions. For example: losetup -f loopfile --sector-size 4KiB --partscan --show where 'loopfile' contains GPT with 4096 sectors. Reported-by: Jeffrey Ferreira <jeffpferreira@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/losetup.8')
-rw-r--r--sys-utils/losetup.84
1 files changed, 3 insertions, 1 deletions
diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8
index c31d7475f..1195c697e 100644
--- a/sys-utils/losetup.8
+++ b/sys-utils/losetup.8
@@ -124,7 +124,9 @@ Force the loop driver to reread the size of the file associated with the
specified loop device.
.TP
.BR \-P , " \-\-partscan"
-Force the kernel to scan the partition table on a newly created loop device.
+Force the kernel to scan the partition table on a newly created loop device. Note that the
+partition table parsing depends on sector sizes. The default is sector size is 512 bytes,
+otherwise you need to use use the option \fB\-\-sector\-size\fR together with \fB\-\-partscan\fR.
.TP
.BR \-r , " \-\-read\-only"
Set up a read-only loop device.