What specific commands need to be entered into a CentOS 7 server in order to:1.) Partition the hard drive into 8 partitions and then2.) Attach the first two partitions to the operating system, so that the remaining 6 partitions remain detached?Here is my first attempt, which as you can see is throwing an error indicating that the partition is currently in use:[root@remote-host ~]# parted --script /dev/sda mklabel gpt mkpart primary 1MiB 250MiB mkpart primary 250MiB 500MiB mkpart primary 500MiB 750MiB mkpart primary 750MiB 1000MiB mkpart primary 1000MiB 1250MiB mkpart primary 1250MiB 1500MiB mkpart primary 1500MiB 1750MiB mkpart primary 1750MiB 2000MiBError: Partition(s) on /dev/sda are being used.Note:  I need to use commands that can be migrated into scripts later.  Therefore, I cannot use interactive console tools in the solution to this problem.  Is the answer as simple as unmounting the disk before running the parted command, and then remounting two of the new partitions after running the parted command? For background, I am providing information about the current disk contents as follows:  [root@remote-host ~]# parted -lModel: ATA WDC WD20EZRX-00D (scsi)Disk /dev/sda: 2000GBSector size (logical/physical): 512B/4096BPartition Table: gptDisk Flags:Number  Start   End     Size    File system  Name                  Flags 1      1049kB  211MB   210MB   fat16        EFI System Partition  boot 2      211MB   735MB   524MB   xfs 3      735MB   2000GB  2000GB                                     lvmModel: Linux device-mapper (linear) (dm)Disk /dev/mapper/centos-home: 1938GBSector size (logical/physical): 512B/4096BPartition Table: loopDisk Flags:Number  Start  End     Size    File system  Flags 1      0.00B  1938GB  1938GB  xfsModel: Linux device-mapper (linear) (dm)Disk /dev/mapper/centos-swap: 8187MBSector size (logical/physical): 512B/4096BPartition Table: loopDisk Flags:Number  Start  End     Size    File system     Flags 1      0.00B  8187MB  8187MB  linux-swap(v1)Model: Linux device-mapper (linear) (dm)Disk /dev/mapper/centos-root: 53.7GBSector size (logical/physical): 512B/4096BPartition Table: loopDisk Flags:Number  Start  End     Size    File system  Flags 1      0.00B  53.7GB  53.7GB  xfs[root@remote-host ~]#
Error: Partition(s) on /dev/sda are being used
centos;partition;hard disk;parted