Creating Partitions Larger Than 2TB in Linux
If you have requirement to create a partition under linux system, you have to be careful.
There are are two ype of partition available on x64 based systems.
MBR - Master Boot record
GPT - GUID Partition Table
MBR does not support 2TB partition.
Convert DOS/MBR disk to GPT disk
# parted /dev/mapper/ORAu01
(parted) rm 1
Is this a GPT partition table? Yes/No? yes
(parted) mklabel GPT
(parted) print
Number Start End Size File system Name Flags
(parted) mkpart primary 0.00TB 6.05TB
(parted) print
(parted) quit
# fdisk -l /dev/mapper/ORAASM
# pvcreate /dev/mapper/ORAASMp1
# vgcreate VG1 /dev/mapper/ORAASMp1
# lvcreate -n ORAlv1 -l 100%FREE VG21
# mkfs.ext4 /dev/VG1/ORAlv1
Add entry to fstab
# vi /etc/fstab
/dev/VG1/ORAlv1 /data ext4 defaults 1 2
Create mount point and mount it.
# mkdir /data; mount -a; df -h /data
Note the error alert by mkpart on parted command output.
If you have requirement to create a partition under linux system, you have to be careful.
There are are two ype of partition available on x64 based systems.
MBR - Master Boot record
GPT - GUID Partition Table
MBR does not support 2TB partition.
Convert DOS/MBR disk to GPT disk
# parted /dev/mapper/ORAu01
(parted) rm 1
Is this a GPT partition table? Yes/No? yes
(parted) mklabel GPT
(parted) print
Number Start End Size File system Name Flags
(parted) mkpart primary 0.00TB 6.05TB
(parted) print
(parted) quit
# fdisk -l /dev/mapper/ORAASM
# pvcreate /dev/mapper/ORAASMp1
# vgcreate VG1 /dev/mapper/ORAASMp1
# lvcreate -n ORAlv1 -l 100%FREE VG21
# mkfs.ext4 /dev/VG1/ORAlv1
Add entry to fstab
# vi /etc/fstab
/dev/VG1/ORAlv1 /data ext4 defaults 1 2
Create mount point and mount it.
# mkdir /data; mount -a; df -h /data
Note the error alert by mkpart on parted command output.
No comments:
Post a Comment