# If we want to make the disk usable by LVM, first we have to partition the disk and mark
# the new partitions with the "LVM label" so let's create a new partition and change
# its name and flags
parted /dev/sde
GNU Parted 3.1
Using /dev/sde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mkpart primary 1M 500M
(parted) name 1 mypart
(parted) p
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sde: 4295MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 500MB 499MB mypart
(parted) set 1 lvm on
(parted) p
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sde: 4295MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 500MB 499MB mypart lvm
(parted) q
Information: You may need to update /etc/fstab.
# On RHEL 6, 'fdisk' is not able to manage disk partition table anymore:
myrhel6:/root#> fdisk -l /dev/sde
WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.
[...]
# On RHEL 7, we get a message indicating that 'fdisk' support is in experimental phase:
myrhel7:/root#> fdisk -l /dev/sde
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
[...]
# To switch back to MBR partition table, do the the following:
parted /dev/<sde> mklabel msdos
Warning: The existing disk label on /dev/sde will be destroyed and all data on this disk will be
lost. Do you want to continue?
Yes/No? Yes
Article Number: 70
Posted: Sun, May 27, 2018 8:51 PM
Last Updated: Sun, May 27, 2018 8:51 PM
Online URL: http://kb.ictbanking.net/article.php?id=70