Skip to content

Instantly share code, notes, and snippets.

@baltpeter

baltpeter/script.sh

Created Nov 6, 2014
Embed
What would you like to do?
Format 2 TB+ disks using parted (GPT)
# To create a partition start GNU parted as follows:
parted /dev/sdb
# Create a new GPT disklabel i.e. partition table:
mklabel gpt
yes
# Next, set the default unit to TB, enter:
unit TB
# To create a 3TB partition size for example, enter:
mkpart primary 0.00TB 3.00TB
# To print the current partitions, enter:
print
# Sample outputs:
# Model: ATA ST33000651AS (scsi)
# Disk /dev/sdb: 3.00TB
# Sector size (logical/physical): 512B/512B
# Partition Table: gpt
# Number Start End Size File system Name Flags
# 1 0.00TB 3.00TB 3.00TB ext4 primary
# Quit and save the changes, enter:
quit
# Use the mkfs.ext4 command to format the file system, enter:
mkfs.ext4 /dev/sdb1
# Don't forget to update /etc/fstab or mount the disk
# Source: http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.