Performance-Based Question — Disk Management & Filesystem Creation
/.
Available objects
parted is the primary Linux disk partitioning utility. The -s flag enables script (non-interactive) mode, which suppresses all confirmation prompts so the command runs unattended — essential in scripts and automation./dev/sdc is the target disk (third SATA/SCSI device). The full /dev/ path is mandatory — bare names like sdc are rejected.mklabel writes a completely new partition table to the disk, destroying any previous layout. The argument gpt (already provided) sets the GUID Partition Table format — the modern standard that supports disks larger than 2 TB, stores up to 128 primary partitions, and keeps a backup copy of the table at the end of the disk for recovery.
mkpart adds a new partition entry to the table created in Command 1. It requires four arguments: partition type, filesystem type hint, start, and end.primary — the partition type. In GPT all partitions are technically primary; parted still accepts the keyword for compatibility. secondary is not a valid parted type at all.ext4 here is a metadata hint only — it stores the intended filesystem type in the partition entry but performs no formatting. The actual filesystem is created in Command 3.1 10G (pre-filled) defines start and end: starting at 1 MB clears the GPT header area and aligns to modern 4K-sector drives for optimal I/O performance; ending at 10G produces a ~10 GB partition.
mkfs. is the make-filesystem command family. The filesystem type is appended directly with no space, forming the binary mkfs.ext4. This step actually creates the filesystem — writing the superblock, inode tables, block group descriptors, extent tree, and journal onto the partition./dev/sdc1 is the first partition on sdc — exactly the partition just created in Command 2. Using /dev/sdc (the whole disk) would overwrite the partition table written in Command 1, destroying all partition data immediately.