Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

partprobe

Tell the kernel to read the partition table of a disk again.

Niveau
RHCSA-examen
Groep
Schijven en bestandssystemen
Root nodig
Ja
Pakket
parted

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

Wat het doet

After you change partitions, the kernel must learn the new table. fdisk and parted try this themselves; when the disk is in use, the kernel may keep the old table. partprobe DEVICE asks again, so new partitions appear in /dev without a reboot.

Zo schrijf je het

partprobe [-d] [-s] [DEVICE]...

Opties 5

Meest gebruikt

DEVICE
The disk to probe (all disks without a name).
-s, --summary
Show a summary of the partitions.
-d, --dry-run
Do not tell the kernel; only check.
-h, --help
Show help.
-v, --version
Show the version.

Voorbeelden 10

$ als gewone gebruiker# als root (of met sudo)

  1. 1After fdisk

    partprobe /dev/vdb
    lsblk /dev/vdb

    New partitions now have device files.

  2. 2Show what it found

    partprobe -s /dev/vdb
    /dev/vdb: gpt partitions 1 2 3

    Quick check.

  3. 3All disks

    partprobe

    Probes every disk.

  4. 4When it fails

    partprobe /dev/vda
    Error: Partition(s) 2 on /dev/vda have been written, but we have been unable to inform the kernel...

    The disk is busy (system disk). A reboot may be needed, or use partx.

  5. 5Alternative: partx

    partx -u /dev/vdb

    Updates only the changed partitions.

  6. 6Wait for udev to create the devices

    partprobe /dev/vdb; udevadm settle

    In scripts, before mkfs.

  7. 7Dry run

    partprobe -d -s /dev/vdb

    Test without changing anything.

  8. 8After growing a VM disk

    echo 1 > /sys/class/block/vdb/device/rescan; partprobe /dev/vdb

    The kernel learns the new disk size (for SCSI/virtio with rescan support).

  9. 9Check the result with the kernel view

    cat /proc/partitions

    The kernel's list of partitions.

  10. 10In an automated disk setup

    parted -s /dev/vdb mklabel gpt mkpart data xfs 1MiB 100% && partprobe /dev/vdb && mkfs.xfs /dev/vdb1

    Each step only when the step before worked.

Exitcodes

0 :: Done. 1 :: Error.

Volledige handleiding

Deze pagina legt het commando uit in eenvoudige woorden. De originele handleiding heeft elk detail.

In je terminal: man 8 partprobe