Rex::Co...rtition(3)
π NAME π
This is the Rex::Co...rtition(3) manpage from User Contributed Perl Documentation, covering Rex::Commands::Partition - Partition module. Bestie, we're literally about to talk disk partitions, and yes, it's giving main character energy. π
π¦ DESCRIPTION π¦
With this Module you can partition your harddrive π½β¨.
Heads up: in Version <= 1.0: All these functions will not be reported. π
β οΈ And no cap, all these functions are not idempotent. So don't just assume a rerun is a cute little no-op, fr fr. π periodt.
β¨ SYNOPSIS β¨
use Rex::Commands::Partition;
π EXPORTED FUNCTIONS π
π clearpart($drive) π
Clear partitions on drive sda:
clearpart "sda";
Create a new GPT disk label (partition table) on drive sda:
clearpart "sda",
initialize => "gpt";
If GPT initialization is requested, the bios_boot option (default: TRUE) can also be set to TRUE or FALSE to control creation of a BIOS boot partition:
clearpart "sda",
initialize => "gpt",
bios_boot => FALSE;
π partition($mountpoint, %option) π
Create a partition with the specified parameters β the option roster is iconic, no skips:
ondiskβ The disk to be partitioned. Mandatory. π₯sizeβ Desired size of the partition in MB. It is mandatory to pass either asizeor agrowparameter (but not both).growβ IfTRUE, then the partition will take up all the available space on the disk. It is mandatory to pass either agrowor asizeparameter (but not both).typeβ Partition type to be passed toparted'smkpartcommand. Optional, defaults toprimary.bootβ Sets boot flag on the partition ifTRUE. Optional, no boot flag is set by default.fstypeβ Create a filesystem after creating the partition. Optional, no filesystem is created by default.labelβ Label to be used with the filesystem. Optional, defaults to no label.mountβ IfTRUE, try to mount the partition after creating it. Optional, no mount is attempted by default.mount_persistentβ IfTRUE, try to mount the partition after creating it, and also register it in/etc/fstab. Optional, no mount or/etc/fstabmanipulation is attempted by default.vgβ Creates an LVM PV, then creates the specified LVM VG (or extends it, if the VG already exists). Needsondisk, iykyk.
Examples:
partition "/",
fstype => "ext3",
size => 15000,
ondisk => "sda",
type => "primary";
partition "none",
type => "extended",
ondisk => "sda",
grow => 1,
mount => TRUE,
partition "swap",
fstype => "swap",
type => "logical",
ondisk => "sda",
size => 8000;
partition "/",
fstype => "ext3",
size => 10000,
ondisk => "sda",
vg => "vg0";
mwah π β page brought to you by perl v5.42.3, dated 2023-08-05; now go slay those partitions like the main character you are ππ«Ά
π¦ where this page comes from
- nixos 26.05: perl5.42.3-Rex 1.14.3
- nixpkgs unstable: perl5.42.3-Rex 1.14.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms