linux parted, partprobe

parted --script $DEVICE mklabel msdos mkpart primary 0% 100% set 1 lvm on

parted [options] [device [command [options...]...]]

-s, --script
              never prompts for user intervention

mklabel label-type
            Create a new disklabel (partition table) of label-type.  label-type should be one of "aix", "amiga", "bsd", "dvh", "gpt", "loop", "mac", "msdos", "pc98", or "sun".

mkpart part-type [fs-type] start end
           Make a part-type partition for filesystem fs-type (if specified), beginning at start and ending at end (by default in megabytes).  part-type should be one of  "pri‐mary", "logical", or "extended".

set partition flag state
          Change  the  state of the flag on partition to state.  Supported flags are: "boot", "root", "swap", "hidden", "raid", "lvm", "lba", "legacy_boot", "irst", "esp" and "palo".  state should be either "on" or "off".

 

partprobe

PARTPROBE(8)                                                                        GNU Parted Manual                                                                        PARTPROBE(8)

NAME
       partprobe - inform the OS of partition table changes

SYNOPSIS
       partprobe [-d] [-s] [devices...]

DESCRIPTION
       This manual page documents briefly the partprobe command.

       partprobe is a program that informs the operating system kernel of partition table changes.

OPTIONS
       This program uses short UNIX style options.

       -d, --dry-run
              Don't update the kernel.

       -s, --summary
              Show a summary of devices and their partitions.

partprobe -s $DEVICE

posted @ 2020-06-10 10:10  kissrule  阅读(290)  评论(0编辑  收藏  举报