[root@kvm10 ~]# fdisk /dev/vdb Welcome to fdisk (util-linux 2.40.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. This disk is currently in use - repartitioning is probably a bad idea. It's recommended to umount all file systems, and swapoff all swap partitions on this disk.
Command (m for help): m Help: GPT M enter protective/hybrid MBR Generic d delete a partition F list free unpartitioned space l list known partition types n add a new partition p print the partition table t change a partition type v verify the partition table i print information about a partition e resize a partition Misc m print this menu x extra functionality (experts only) Script I load disk layout from sfdisk script file O dump disk layout to sfdisk script file Save & Exit w write table to disk and exit q quit without saving changes Create a new label g create a new empty GPT partition table G create a new empty SGI (IRIX) partition table o create a new empty MBR (DOS) partition table s create a new empty Sun partition table
Command (m for help): p Disk /dev/vdb: 3 GiB, 3221225472 bytes, 6291456 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 289C3DC7-CC6A-489A-9CB5-552D550FDAD3 Device Start End Sectors Size Type /dev/vdb1 2048 821247 819200 400M Linux LVM
Command (m for help): n
Partition number (2-128, default 2):
First sector (821248-6291422, default 821248):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (821248-6291422, default 6289407):
Created a new partition 2 of type 'Linux filesystem' and of size 2.6 GiB.
Command (m for help): p Disk /dev/vdb: 3 GiB, 3221225472 bytes, 6291456 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 289C3DC7-CC6A-489A-9CB5-552D550FDAD3 Device Start End Sectors Size Type /dev/vdb1 2048 821247 819200 400M Linux LVM /dev/vdb2 821248 6289407 5468160 2.6G Linux filesystem
Command (m for help): t Partition number (1,2, default 2):
Partition type or alias (type L to list all): L 1 EFI System C12A7328-F81F-11D2-BA4B-00A0C93EC93B 2 MBR partition scheme 024DEE41-33E7-11D3-9D69-0008C781F39F 3 Intel Fast Flash D3BFE2DE-3DAF-11DF-BA40-E3A556D89593 4 BIOS boot 21686148-6449-6E6F-744E-656564454649 .......................................................... 44 Linux LVM E6D6D379-F507-44C2-A23C-238F2A3DF928 ..........................................................
Partition type or alias (type L to list all): 44 Changed type of partition 'Linux filesystem' to 'Linux LVM'.
Command (m for help): p Disk /dev/vdb: 3 GiB, 3221225472 bytes, 6291456 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 289C3DC7-CC6A-489A-9CB5-552D550FDAD3 Device Start End Sectors Size Type /dev/vdb1 2048 821247 819200 400M Linux LVM /dev/vdb2 821248 6289407 5468160 2.6G Linux LVM
Command (m for help): w The partition table has been altered. Syncing disks.
[root@kvm10 ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS vda 252:0 0 6G 0 disk ├─vda1 252:1 0 1M 0 part ├─vda2 252:2 0 500M 0 part /boot └─vda3 252:3 0 4.4G 0 part ├─vg_kvm10-root 253:0 0 4.3G 0 lvm / └─vg_kvm10-swap 253:1 0 124M 0 lvm [SWAP] vdb 252:16 0 3G 0 disk ├─vdb1 252:17 0 400M 0 part │ └─myvdb-vo 253:2 0 252M 0 lvm /reports └─vdb2 252:18 0 2.6G 0 part