]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - sys-utils/losetup.8
su: change error message
[thirdparty/util-linux.git] / sys-utils / losetup.8
index 60e9ff04ff3d8f1e33da6d7a1de14cb420984770..c31d7475f4d8eee861b4d428a2e99fdef53d7151 100644 (file)
@@ -7,7 +7,7 @@ Get info:
 .sp
 .in +5
 .B losetup
-.I loopdev
+[\fIloopdev\fP]
 .sp
 .B losetup -l
 .RB [ \-a ]
@@ -31,12 +31,6 @@ Detach all associated loop devices:
 .B "losetup \-D"
 .sp
 .in -5
-Print the name of the first unused loop device:
-.sp
-.in +5
-.B "losetup \-f"
-.sp
-.in -5
 Set up a loop device:
 .sp
 .in +5
@@ -45,6 +39,8 @@ Set up a loop device:
 .IR offset ]
 .RB [ \-\-sizelimit
 .IR size ]
+.RB [ \-\-sector\-size
+.IR size ]
 .in +8
 .RB [ \-Pr ]
 .RB [ \-\-show ]  " \-f" | \fIloopdev\fP
@@ -87,7 +83,10 @@ for non-root users.  See also \fB\-\-list\fR.  The old output format (as printed
 without \fB--list)\fR is deprecated.
 .TP
 .BR \-d , " \-\-detach " \fIloopdev\fR...
-Detach the file or device associated with the specified loop device(s).
+Detach the file or device associated with the specified loop device(s). Note
+that since Linux v3.7 kernel uses "lazy device destruction".  The detach
+operation does not return EBUSY error anymore if device is actively used by
+system, but it is marked by autoclear flag and destroyed later.
 .TP
 .BR \-D , " \-\-detach\-all"
 Detach all associated loop devices.
@@ -109,9 +108,16 @@ makes sense only with \fB\-\-find\fP.
 Show the status of all loop devices associated with the given \fIfile\fR.
 .TP
 .BR \-o , " \-\-offset " \fIoffset
-The data start is moved \fIoffset\fP bytes into the specified file or device.
+The data start is moved \fIoffset\fP bytes into the specified file or device.  The \fIoffset\fP
+may be followed by the multiplicative suffixes; see above.
 .IP "\fB\-\-sizelimit \fIsize\fP"
-The data end is set to no more than \fIsize\fP bytes after the data start.
+The data end is set to no more than \fIsize\fP bytes after the data start.  The \fIsize\fP
+may be followed by the multiplicative suffixes; see above.
+.TP
+.BR \-b , " \-\-sector-size " \fIsize
+Set the logical sector size of the loop device in bytes (since Linux 4.14). The
+option may be used when create a new loop device as well as stand-alone command
+to modify sector size of the already existing loop device.
 .TP
 .BR \-c , " \-\-set\-capacity " \fIloopdev
 Force the loop driver to reread the size of the file associated with the
@@ -141,6 +147,9 @@ print info about all devices.  See also \fB\-\-output\fP, \fB\-\-noheadings\fP,
 Specify the columns that are to be printed for the \fB\-\-list\fP output.
 Use \fB\-\-help\fR to get a list of all supported columns.
 .TP
+.B \-\-output\-all
+Output all available columns.
+.TP
 .BR \-n , " \-\-noheadings"
 Don't print headings for \fB\-\-list\fP output format.
 .IP "\fB\-\-raw\fP"
@@ -179,7 +188,7 @@ loop control device
 The following commands can be used as an example of using the loop device.
 .nf
 .IP
-# dd if=/dev/zero of=~/file.img bs=1MiB count=10
+# dd if=/dev/zero of=~/file.img bs=1024k count=10
 # losetup --find --show ~/file.img
 /dev/loop0
 # mkfs -t ext2 /dev/loop0