• t221006 (1/3)

    From Fleuger@21:1/5 to All on Thu Oct 6 19:30:36 2022
    Idem ici avec TextWrangler 4.5.12

    je le copie après le caractère trublion


    DISKUTIL(8) BSD System Manager's Manual DISKUTIL(8)

    NAME
    diskutil -- modify, verify and repair local disks

    SYNOPSIS
    diskutil [quiet] verb [options]

    DESCRIPTION
    diskutil manipulates the structure of local disks. It provides informa-
    tion about, and allows the administration of, the partitioning schemes,
    layouts, and formats of disks. This includes hard disks, solid state
    disks, optical discs, CoreStorage volumes, and AppleRAID sets. It gener-
    ally manipulates whole volumes instead of individual files and directo-
    ries.

    VERBS
    Each verb is listed with its description and individual arguments.

    list [-plist] [device]
    List disks. If no argument is given, then all disks and all
    of their partitions are listed.

    If -plist is specified, then a property list will be emitted
    instead of the normal user-readable output. If a device is
    specified, then instead of listing all families of whole disks
    and their partitions, only one such family is listed. In that
    case, specifying either the whole disk or any of its slices
    will work.

    A script could interpret the results of the diskutil list
    -plist output and use diskutil info -plist as well as diskutil
    listFilesystems -plist for more detailed information.

    See the DEVICES section below for the various forms that the
    device specification may take for this and all of the other
    diskutil verbs.

    The top-to-bottom appearance of partitions in diskutil list
    always indicates the on-disk ordering. BSD disk identifiers
    may, in certain circumstances, not appear in slice-numerical
    order when viewed this way. This is normal and is likely the
    result of a recent partition map editing operation in which
    volumes were kept mounted.

    info | information [-plist] device | -all
    Get detailed information about a specific whole disk or parti-
    tion. If -plist is specified, then a property list instead of
    the normal user-readable output will be emitted. If -all is
    specified, then all disks (whole disks and their partitions)
    are processed.

    activity
    Continuously display system-wide disk manipulation activity as
    reported by the Disk Arbitration framework until interrupted
    with a signal (e.g. by typing Control-C).

    This can be useful to watch system-wide activity of disks com-
    ing on-line or being ejected, volumes on disks being mounted
    or unmounted, volumes being renamed, etc. However, this out-
    put must never be parsed; programs should become Disk Arbitra-
    tion clients instead.

    For debugging information, such as the monitoring of applica-
    tions dissenting (attempting to deny) activities for disks for
    which they have registered an interest, you must use the log-
    ging features of the diskarbitrationd daemon. Programs needing
    this information must become Disk Arbitration clients.

    listFilesystems [-plist]
    Show the file system personalities available for formatting in
    diskutil when using the erasing and partitioning verbs. This
    is a subset of the complete set of personalities exported by
    the various file system bundles that may be installed in the
    system. Also shown are some shortcut aliases for common per-
    sonalities. See the FORMAT section below for more details.
    If -plist is specified, then a property list instead of the
    normal user-readable output will be emitted.

    unmount | umount [force] device
    Unmount a single volume. Force will force-unmount the volume
    (less kind to any open files; see also umount (8)).

    unmountDisk | umountDisk [force] device
    Unmount an entire disk (all volumes). Force will force-
    unmount the volumes (less kind to any open files; see also
    umount (8)). You should specify a whole disk, but all volumes
    of the whole disk are attempted to be unmounted even if you
    specify a partition.

    eject device
    Eject a disk. Media will become offline for the purposes of
    being a data store for file systems or being a member of con-
    structs such as software RAID or direct data. Additionally,
    removable media will become eligible for safe manual removal;
    automatically-removable media will begin its physical (motor-
    ized) eject sequence.

    mount [readOnly] [-mountPoint path] device
    Mount a single volume. If readOnly is specified, then the
    file system is mounted read-only, even if the volume's under-
    lying file system and/or device and/or media supports writing;
    even the super-user may not write to it; this is the same as
    the rdonly option to mount (8). If a -mountPoint is speci-
    fied, then that path, rather than the standard path of /Vol-
    umes/VolumeName, will be used as the view into the volume file
    content; a directory at that path must already exist.

    mountDisk device
    Mount an entire disk (all mountable volumes). You should
    specify a whole disk, but all volumes of the whole disk are
    attempted to be mounted even if you specify a partition.

    rename | renameVolume device name
    Rename a volume. Volume names are subject to file system-spe-
    cific alphabet and length restrictions.

    enableJournal device
    Enable journaling on an HFS+ volume. This works whether or
    not the volume is currently mounted (the volume is temporarily
    mounted if necessary). Ownership of the affected disk is
    required.

    disableJournal [force] device
    Disable journaling on an HFS+ volume. This normally works
    whether or not the volume is currently mounted (the volume is
    temporarily mounted if necessary). If the force option is
    specified, then journaling is disabled directly on disk; in
    this case, the volume must not be mounted. Ownership of the
    affected disk is required.

    moveJournal external journalDevice device
    Create a 512MB Apple_Journal partition using the journalDevice
    partition to serve as a journal for the volume device. For
    best results, journalDevice should be a partition on a differ-
    ent whole-disk than the volume itself.

    The journal for device will be moved externally onto the newly
    created Apple_Journal partition.

    Since the journalDevice you specify will invariably be larger
    than 512MB, a new HFS+ partition will be created following the
    Apple_Journal partition to fill the remaining space.

    Moving the journal works whether or not the volume is mounted,
    provided journaling is enabled on that volume. No errors are
    currently supported to flag attempts to move journals on vol-
    umes that do not have journaling enabled. If you have multi-
    ple volumes for which you want external journals, each must
    have its own external Apple_Journal partition. Ownership of
    the affected disks is required.

    moveJournal internal device
    Move the journal for device back locally (onto that same
    device). Ownership of the affected disk is required.

    enableOwnership device
    Enable ownership of a volume. The on-root-disk Volume Data-
    base at /var/db/volinfo.database is manipulated such that the
    User and Group ID settings of files, directories, and links
    (file system objects, or "FSOs") on the target volume are
    taken into account.

    This setting for a particular volume is persistent across
    ejects and injects of that volume as seen by the current OS,
    even across reboots of that OS, because of the entries in this
    OS's Volume Database. Note thus that the setting is not kept
    on the target disk, nor is it in-memory.

    For some locations of devices (e.g. internal hard disks), con-
    sideration of ownership settings on FSOs is the default. For
    others (e.g. plug-in USB disks), it is not.

    When ownership is disabled, Owner and Group ID settings on
    FSOs appear to the user and programs as the current user and
    group instead of their actual on-disk settings, in order to
    make it easy to use a plug-in disk of which the user has phys-
    ical possession.

    When ownership is enabled, the Owner and Group ID settings
    that exist on the disk are taken into account for determining
    access, and exact settings are written to the disk as FSOs are
    created. A common reason for having to enable ownership is
    when a disk is to contain FSOs whose User and Group ID set-
    tings, and thus permissions behavior overall, is critically
    important, such as when the plug-in disk contains system files
    to be changed or added to.

    See also the vsdbutil(8) command. Running as root is
    required.

    disableOwnership device
    Disable ownership of a volume. See enableOwnership above.
    Running as root is required.

    verifyVolume device
    Verify the file system data structures of a volume. The
    appropriate fsck program is executed and the volume is left
    mounted or unmounted as it was before the command. Ownership
    of the disk to be verified is required.

    repairVolume device
    Repair the file system data structures of a volume. The
    appropriate fsck program is executed and the volume is left
    mounted or unmounted as it was before the command. Ownership
    of the affected disk is required.

    verifyDisk device
    Verify the partition map layout of a whole disk intended for
    booting or data use on a Macintosh. The checks further
    include, but are not limited to, the integrity of the EFI Sys-
    tem Partition, the integrity of any Core Storage Physical Vol-
    ume partitions, and provisioning of space for boot loaders.
    Ownership of the disk to be verified is required; it must be a
    whole disk and must have a partition map.

    repairDisk device
    Repair the partition map layout of a whole disk intended for
    booting or data use on a Macintosh. The repairs further
    include, but are not limited to, the repair or creation of an
    EFI System Partition, the integrity of any Core Storage Physi-
    cal Volume partitions, and the provisioning of space for boot
    loaders. Ownership of the affected disk is required; it must
    be a whole disk and must have a partition map.

    eraseDisk format name [APM[Format] | MBR[Format] | GPT[Format]] device
    Erase an existing disk, removing all volumes and writing out a
    new partitioning scheme containing one new empty file system
    volume. If the partitioning scheme is not specified, then an
    appropriate one for the current machine is chosen. Format is
    discussed below in the section for the partitionDisk verb.
    Ownership of the affected disk is required.

    eraseVolume format name device
    Write out a new empty file system volume (erasing any current
    file system volume) on an existing partition. The partition
    remains but its data is lost. Format is discussed below in
    the section for the partitionDisk verb.

    If you specify Free Space for format, the partition itself is
    deleted (removed entirely) from the partition map instead of
    merely being erased. Ownership of the affected disk is
    required.

    reformat device
    Erase an existing volume by writing out a new empty file sys-
    tem of the same personality (type) and with the same volume
    name. Ownership of the affected disk is required.

    eraseOptical [quick] device
    Erase optical media (CD/RW, DVD/RW, etc.). Quick specifies
    whether the disc recording system software should do a full
    erase or a quick erase. Ownership of the affected disk is
    required.

    zeroDisk [force] device
    Erase a device, writing zeros to the media. The device can be
    a whole-disk or a partition. In either case, in order to be
    useful again, zero'd whole-disks will need to be (re)parti-
    tioned, or zero'd partitions will need to be (re)formatted
    with a file system, e.g. by using the partitionDisk,
    eraseDisk, or eraseVolume verbs. If you desire a more sophis-
    ticated erase algorithm or if you need to erase only free
    space not in use for files, use the secureErase verb. The
    force parameter causes best-effort, non-error-terminating,
    forced unmounts and shared-mode writes to be attempted; how-
    ever, this is still no guarantee against drivers which claim
    the disk exclusively. In such cases, you may have to first
    unmount all overlying logical volumes (e.g. CoreStorage or
    AppleRAID), or, if a disk is partially damaged in just the
    wrong way, even un-install a kext or erase the disk elsewhere.
    Ownership of the affected disk is required.

    randomDisk [times] device
    Erase a whole disk, writing random data to the media. Times
    is the optional (defaults to 1) number of times to write ran-
    dom information. The device can be a whole-disk or a parti-
    tion. In either case, in order to be useful again, randomized
    whole-disks will need to be (re)partitioned, or randomized
    partitions will need to be (re)formatted with a file system,
    e.g. by using the partitionDisk or eraseDisk verbs. If you
    desire a more sophisticated erase algorithm or if you need to
    erase only free space not in use for files, use the
    secureErase verb. Ownership of the affected disk is required.

    secureErase [freespace] level device
    Erase, using a secure method, either a whole-disk (including
    any and all partitions), or, only the free space (not in use
    for files) on a currently-mounted volume. Erasing a whole-
    disk will leave it useless until it is partitioned again.
    Erasing freespace on a volume will leave it exactly as it was
    from an end-user perspective, with the exception that it will
    not be possible to recover deleted files or data using utility
    software. If you need to erase all contents of a partition
    but not its hosting whole-disk, use the zeroDisk or randomDisk
    verbs. Ownership of the affected disk is required.

    Level should be one of the following:

    + 0 - Single-pass zero-fill erase.

    + 1 - Single-pass random-fill erase.

    + 2 - US DoD 7-pass secure erase.

    + 3 - Gutmann algorithm 35-pass secure erase.

    + 4 - US DoE algorithm 3-pass secure erase.

    partitionDisk device [numberOfPartitions] [APM[Format] | MBR[Format] |
    GPT[Format]] [part1Format part1Name part1Size part2Format
    part2Name part2Size part3Format part3Name part3Size ...]

    (re)Partition a disk, removing all volumes. All volumes on
    this disk will be destroyed. The device parameter specifies
    which whole disk is to be partitioned. The optional
    numberOfPartitions parameter specifies the number of parti-
    tions to create; if given then the number of parameter
    triplets (see below) is expected to match; else, the number of
    triplets alone given will determine the number of partitions
    created.

    The optional partitioning scheme parameter forces a particular
    partitioning scheme; if not specified, a suitable default is
    chosen. They are:

    + APM[Format] specifies that an Apple Partition Map
    scheme should be used. This is the traditional
    Apple partitioning scheme used to start up a Pow-
    erPC-based Macintosh computer, to use the disk as a
    non-startup disk with any Mac, or to create a multi-
    platform compatible startup disk.

    + MBR[Format] specifies that a Master Boot Record
    scheme should be used. This is the DOS/Windows-com-
    patible partitioning scheme.

    + GPT[Format] specifies that a GUID Partitioning Table
    scheme should be used. This is the partitioning
    scheme used to start up an Intel-based Macintosh
    computer.

    For each partition, a triplet of the desired file system for-
    mat, volume name, and size must be specified. Several other
    diskutil verbs allow these triplets as well (and for them, the
    numberOfPartitions parameter is also optional). The triplets
    must be as follows:

    + Format names are of the form jhfs+, HFS+, MS-DOS,
    etc.; a list of formattable file systems (more pre-
    cisely, specific file system personalities exported
    by the installed file system bundles) and common
    aliases is available from the listFilesystems verb.

    Format guides diskutil both in what partition type
    to set for the partitions (slices) as well as what
    file system structures to initialize therein, using
    the file system bundle's plist's FormatExecutable
    setting which usually points to the appropriate for-
    matter program such as newfs_hfs(8).

    You can specify a format of Free Space to skip an
    area of the disk.

    You can specify the partition type manually and
    directly with a format of %<human-readable partition
    type>% such as %Apple_HFS% or %<GPT partition type
    UUID constant>% such as
    %48465300-0000-11AA-AA11-00306543ECAC%; these imply
    a name of %noformat% (below). Human-readable types
    must be known to the system but UUID types (GPT
    scheme only) can be arbitrary.

    + Names are the initial volume names; they must con-
    form to file system specific restrictions.

    If a name of %noformat% is specified, then the par-
    tition is left blank such that the partition space
    is carved out, the partition type is set according
    to the file system format name or explicit type, the
    partition space is partially erased ("wiped"), but a
    file system structure is not initialized with any
    file system's formatter program (e.g. newfs_hfs(8);
    this is useful for setting up partitions that will
    contain user-defined (not necessarily file system)
    data.

    For a triplet whose format is Free Space or a
    directly-specified partition type, its name is
    ignored but a dummy name must nevertheless be
    present.

    + Sizes are floating point numbers followed by a let-
    ter or percent sign as described in the SIZES sec-
    tion at the end of this page (e.g. 165536000, 55.3T,
    678M, 75%, R).

    In addition to explicitly-requested partitions, space (gaps)
    might be allocated to satisfy certain filesystems' position
    and length alignment requirements; space might be allocated
    for possible future booter partition insertion; and indeed,
    actual booter partitions might be implicitly created.

    In particular, there is a rule that unrecognized partitions
    1GiB or larger automatically acquire booters. Thus, if you
    create an arbitrary partition with e.g. diskutil
    partitionDisk disk0 gpt %11112222-1111-2222-1111-111122221111%
    %noformat% 3gib jhfs+ Untitled r, then a booter partition will
    also be created. You can always delete that booter with
    diskutil eraseVolume "Free Space" dummy disk0s3.

    The last partition is usually automatically lengthened to the
    end of the partition map (disk). You can specify an exact
    size for your last partition by specifying it as the penulti-
    mate triplet and specifying an additional (last) triplet as
    Free Space. Or you can use the R (remainder) size specifier
    for one of your middle partitions while specifying an exact
    size for your last partition.

    Ownership of the affected disk is required.

    resizeVolume device [ limits | mapsize | R | size [numberOfPartitions]
    [part1Format part1Name part1Size part2Format part2Name
    part2Size part3Format part3Name part3Size ...] ]

    Non-destructively resize a volume (partition); you may
    increase or decrease its size. Alternatively, takes no action
    and prints some info.

    A size of limits takes no action, but instead will print the
    range of valid values for the target partition, taking into
    account current file system and partition map conditions such
    as files in use and other (immovable) partitions following the
    target.

    A size of mapsize takes no action, but instead will print the
    size of the encompassing whole-disk device, as well as the
    size of the entire partition map (all partitions less map
    overhead). The whole-disk device might be larger than the par-
    tition map if the whole-disk device has grown since the parti-
    tion map was created. Growing a whole-disk device is possible
    with certain enterprise disk (RAID) systems.

    You can grow a volume (partition) (back) to its maximum size
    possible, provided no new partitions have been created that
    are in the way, by specifying R for the new volume size. You
    should use R instead of attempting an absolute value such as
    100% because the latter cannot count partition map overhead.

    When decreasing the size, new partitions may optionally be
    created to fill the newly-freed space. To do this, specify
    the numberOfPartitions, format, name, and size parameters in
    the same manner as the triplet description for the
    partitionDisk verb.

    Resizing a volume that is currently set as the computer's
    startup disk will invalidate that setting; use the Startup
    Disk System Preferences panel or bless (8) to reset the
    resized volume as the startup disk.

    Device refers to a volume; the volume's file system must be
    journaled HFS+. Valid sizes are a number followed by a capi-
    tal letter multiplier or percent sign suffix as described in
    the SIZES section at the end of this page (e.g. 1.5T, 128M,
    50%). Ownership of the affected disk is required.

    splitPartition device [numberOfPartitions] [part1Format part1Name
    part1Size part2Format part2Name part2Size part3Format
    part3Name part3Size ...]

    Destructively split a volume into multiple partitions. You
    must supply a list of new partitions to create in the space of
    the old partition; specify these with the numberOfPartitions,
    format, name, and size parameters in the same manner as the
    triplet description for the partitionDisk verb.

    For one of your triplets, you can optionally specify the R
    meta-size in lieu of a constant number value for the size
    parameter: the substituted value will be exactly the amount of
    space necessary to complete the re-filling of the original
    partition with all of your triplets.

    Device refers to a volume. Ownership of the affected disk is
    required.

    mergePartitions [force] format name fromDevice toDevice
    Merge two or more partitions on a disk. All data on merged
    partitions other than the first will be lost. Data on the
    first partition will be lost as well if the force argument is
    given.

    If force is not given, and the first partition has a resizable
    file system (e.g. JHFS+), the file system will be preserved
    and grown in a data-preserving manner; your format and name
    parameters are ignored in this case. If force is not given,
    and the first partition is not resizable, you are prompted if
    you want to format. You will also be prompted to format if
    the first partition has an (HFS) Allocation Block Size which
    is too small to support the required growth of the first par-
    tition; see the -b option for newfs_hfs (8).

    If force is given, the final resulting partition is always
    (re)formatted. You should do this if you wish to (re)format to
    a new file system type. You will be prompted to confirm.

    Format and name must always be given, but they have an effect
    only when force is given.

    Merged partitions are required to be ordered sequentially on
    disk (see diskutil list for the actual on-disk ordering). All
    partitions in the range, except for the first one, must be
    unmountable. Ownership of the affected disk is required.

    appleRAID | ar raidVerb [...]
    AppleRAID verbs can be used to create, manipulate and destroy
    AppleRAID volumes (Software RAID). AppleRAID supports three
    basic types of RAID sets:

    + "stripe" - Striped Volume (RAID 0)

    + "mirror" - Mirrored Volume (RAID 1)

    + "concat" - Concatenated Volume (Spanning)

    Of these three basic types, only the "mirror" type increases
    fault-tolerance. Mirrors may have more than two disks to fur-
    ther increase their fault-tolerance. Striped and concaten-
    tated volumes are, in fact, more vulnerable to faults than
    single disk volumes.

    From these basic types, "stacked" or "nested" RAID volumes can
    be created. Stacked RAID sets that make use of mirrored RAID
    sets are fault-tolerant. For example, these are some of the
    more common combinations of stacked RAID sets:

    + RAID 50 - A striped RAID set of hardware RAID 5
    disks.

    + RAID 10 - A striped RAID set of mirrored RAID sets.

    + RAID 0+1 - A mirrored RAID set of striped RAID sets.

    + Concatenated Mirror - A concatenation of mirrored
    RAID sets.

    When creating new RAID sets or adding disks, if possible, it
    is better to specify the entire disk instead of a partition on
    that disk. This allows the software to reformat the entire
    disk using the most current partition layouts. When using
    whole disks, the type of partitioning used is selected based
    on the platform type (PPC = APMFormat, Intel = GPTFormat).
    GPT and APM partition formats cannot be mixed in the same RAID
    set.

    In addition to whole disk and partition device names,
    AppleRAID uses UUIDs to refer to existing RAID sets and their
    members. Existing RAID sets may also be specified by mount
    point (e.g. /Volume/raidset). In many cases, using the UUID
    for the device argument is preferred because disk device names
    may change over time when disks are added, disks are removed
    or when the system is rebooted. If RAID members have been
    physically disconnected from the system or are no longer
    responding, you must use the member's UUID as the command
    argument. Messages in the system log will refer to RAID sets
    and their member disks by UUID. For more information on spec-
    ifying device arguments see the "DEVICES" section below.

    AppleRAID is not a replacement for backing up your data.

    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)