Partition format conversion LVM format and multi-disk creation of PV, VG, LV in Linux operating system
In the course of work, we often encounter two situations: 1, the system disk and the data disk are in the same Raid group; 2, the system disk is separated from the data disk (different Raid groups)
Sometimes because the company requires a basic installation of OS, it is necessary to use the free space or increase the free space in the installed OS.
Partition format conversion will be involved. Currently, take the conversion to: LVM format as an example:
[root@ihmp] # fdisk / dev/sdb-- sometimes it may be the same as the Raid group, a few T hard disk
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x6e84979f.
Command (m for help): n
Partition type:
P primary (0 primary, 0 extended, 4 free)
E extended
Select (default p): P
Partition number (1-4, default 1): enter by default
First sector (2048-104857599, default 2048): enter by default
Using default value 2048
Last sector, + sectors or + size {Kjimmpeng} (2048-104857599, default 104857599): + 25600m-- specify the partition size
Partition 1 of type Linux and of size 25 GiB is set
Command (m for help): t-- lists the required conversion partitions
Selected partition 1
Hex code (type L to list all codes): l-- View the partition sequence number to be converted
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 27 Hidden NTFS Win 82 Linux swap / So C1 DRDOS/sec (FAT-
2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: C6 DRDOS/sec (FAT-
4 FAT16