Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple device arguments to dasdfmt, and allow them to be formatted in parallel. #115

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions dasdfmt/dasdfmt.8
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
dasdfmt \- formatting of DASD (ECKD) disk drives.

.SH SYNOPSIS
\fBdasdfmt\fR [-h] [-t] [-v] [-y] [-p] [-P] [-m \fIstep\fR]
\fBdasdfmt\fR [-h] [-t] [-v] [-y] [-p] [-Q] [-P] [-m \fIstep\fR]
.br
[-r \fIcylinder\fR] [-b \fIblksize\fR] [-l \fIvolser\fR] [-d \fIlayout\fR]
.br
[-L] [-V] [-F] [-k] [-C] [-M \fImode\fR] \fIdevice\fR
[-L] [-V] [-F] [-k] [-C] [-M \fImode\fR] \fIdevice\fR [\fIdevice\fR]

.SH DESCRIPTION
\fBdasdfmt\fR formats a DASD (ECKD) disk drive to prepare it
\fBdasdfmt\fR formats one or several DASD (ECKD) disk drives to prepare it
for usage with Linux for S/390.
The \fIdevice\fR is the node of the device (e.g. '/dev/dasda').
Any device node created by udev for kernel 2.6 can be used
(e.g. '/dev/dasd/0.0.b100/disc').
It is possible to specify up to 512 devices.
.br

\fBWARNING\fR: Careless usage of \fBdasdfmt\fR can result in
Expand Down Expand Up @@ -95,7 +96,7 @@ Do not use this option if you are using a 3270 console,
running in background or redirecting the output to a file.

.TP
\fB-P\fR or \fB--percentage\fR
\fB-Q\fR or \fB--percentage\fR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's sad that both p and P are taken, but please don't change the behaviour of an established command line option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already warned you about this, so no surprise here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but still wanted to mentioned that we shouldn't change it.

Print one line for each formatted cylinder showing the number of the
cylinder and percentage of formatting process.
Intended to be used by higher level interfaces.
Expand Down Expand Up @@ -157,6 +158,18 @@ devices, counting the base device and all alias devices.
Specify blocksize to be used. \fIblksize\fR must be a positive integer
and always be a power of two. The recommended blocksize is 4096 bytes.

.TP
\fB-P\fR \fInumdisks\fR or \fB--max_parallel\fR=\fInumdisks\fR
markkp marked this conversation as resolved.
Show resolved Hide resolved
Specify the number of disks to be formatted in parallel.
\fInumdisks\fR specifies the number of formatting processed,
independent on the overall number of disks to be formatted.
The maximum value for \fInumdisks\fR is 512. Default is 1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the default value should be numdev and the number the user can set should
be an optional parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to think about that. I think that might be an unexpected change for some people.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have in mind that at one point we could allow the user to specify ranges of devices. Just like for other tools
like zdev. So, one could just do dasdfmt -b 4096 -y -p -n 0.0.9300-0.9330 and all devices would
automatically be formatted in parallel.
The number to specify the amount of devices that should be formatted in parallel would be optional.
That way the user doesn't need to bother with counting the amount of devices but still has the option to limit
it if resources are a constraint.

.br
Using this option can decrease overall processing time when formatting
several disks. Please note that the I/O throughput will dramatically
increase when using this option. Use with care.
.br

.TP
\fB-l\fR \fIvolser\fR or \fB--label\fR=\fIvolser\fR
Specify the volume serial number or volume identifier to be written
Expand Down
Loading