First I create a properly aligned partition in a new GPT table using parted by specifying percentages for start and end of the partition:
# parted -a optimal /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mktable gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost.
I want to create a windows accessible partition(FAT16/FAT32). But even the created partition can read under linux. It can not see on Windows.
for the moment i havent free space yet
(parted) mkpart
Partition type? primary/extended? primary
File system type? [ext2]? ext4
Start? 60G
End? 62.9G
Warning: You requested a partition from 60.0GB to 62.9GB.
For testing I want to create a mirrored (RAID 1) partition with a size of 1GB on /dev/sdb and /dev/sdc.
I've created two partitions with parted:
mklabel gpt
mkpart primary ext4 1 80%
mkpart primary ext4 80% -1
after reboot these are properly shown
parted /dev/sdc print
Model: easyRAID Q12 (scsi)
Disk /dev/sdc: 4999GB
Sector size (logical/physical): 2048B/2048B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 3999GB 3999GB primary
I was getting one program for partitioning SD card.I have given that script below:
#!/bin/sh
if [ $# -lt 2 ]; then
echo "example usage: $0 /dev/sdc \$ANDROID_ROOT"
exit 1
fi
DRIVE=$1
ANDROID_ROOT_DIR=$2
sudo umount ${DRIVE}*
sudo dd if=/dev/zero of=$DRIVE bs=1 count=1024
sudo sync
sudo parted $DRIVE mklabel gpt
sudo parted $DRIVE mkpart boot fat32 1MB 9MB
sudo parted $DRIVE mkpart system
I have a 3TB disk which I want to encrypt.
I have just finished building an 8 disk (2TB each disk) raid 6 array + lvm + xfs, which is currently empty.
Each drive was first setup using parted:
Code:
parted -a optimal /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted!
running RHEL 5.3 64bit, parted does not allow creation of more than 16 partitions (usin GPT partition table), e.g. when attempting to create next (17th) partition I get
(parted) mkpart primary 43GB 44GB
Error: Error informing the kernel about modifications to partition /dev/sdb16 -- Invalid argument.