1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
| [root@6_90 ~]# fdisk /dev/sda 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.
Command (m for help): p
Disk /dev/sda: 429.5 GB, 429496729600 bytes, 838860800 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 Disk label type: dos Disk identifier: 0x0007b2cf
Device Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 419430399 209202176 8e Linux LVM
Command (m for help): n Partition type: p primary (2 primary, 0 extended, 2 free) e extended Select (default p): p Partition number (3,4, default 3): First sector (419430400-838860799, default 419430400): Using default value 419430400 Last sector, +sectors or +size{K,M,G} (419430400-838860799, default 838860799): Using default value 838860799 Partition 3 of type Linux and of size 200 GiB is set
Command (m for help): p
Disk /dev/sda: 429.5 GB, 429496729600 bytes, 838860800 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 Disk label type: dos Disk identifier: 0x0007b2cf
Device Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 419430399 209202176 8e Linux LVM /dev/sda3 419430400 838860799 209715200 83 Linux
Command (m for help): t Partition number (1-3, default 3): 3 Hex code (type L to list all codes): 8e Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): p
Disk /dev/sda: 429.5 GB, 429496729600 bytes, 838860800 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 Disk label type: dos Disk identifier: 0x0007b2cf
Device Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 419430399 209202176 8e Linux LVM /dev/sda3 419430400 838860799 209715200 8e Linux LVM
Command (m for help): w The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks.
根据提示需要同步磁盘 [root@6_90 ~]# partprobe
[root@6_90 ~]# fdisk -l
Disk /dev/sda: 429.5 GB, 429496729600 bytes, 838860800 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 Disk label type: dos Disk identifier: 0x0007b2cf
Device Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 419430399 209202176 8e Linux LVM /dev/sda3 419430400 838860799 209715200 8e Linux LVM
Disk /dev/mapper/centos-root: 193.2 GB, 193248362496 bytes, 377438208 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
Disk /dev/mapper/centos-swap: 21.0 GB, 20971520000 bytes, 40960000 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
[root@6_90 ~]# pvscan PV /dev/sda2 VG centos lvm2 [199.51 GiB / 0 free] Total: 1 [199.51 GiB] / in use: 1 [199.51 GiB] / in no VG: 0 [0 ] [root@6_90 ~]# pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name centos PV Size 199.51 GiB / not usable 3.00 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 51074 Free PE 0 Allocated PE 51074 PV UUID U7l4WJ-kwxY-DgvQ-eZX3-F3YG-71GI-O54rin
|