现在使用中的VM只有40G的硬盘,需要再添加一块硬盘并创建LVM挂载到/opt下:
1. 添加硬盘
2. 创建PV
3. 添加PV到VG中
4.创建LVM并挂载
1. 增加硬盘
增加前:
[root@controller3 ~]# fdisk -l
<strong>Disk /dev/sda: 42.9 GB, 42949672960 bytes, 83886080 sectors</strong>
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: 0x0004e5e5
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 83886079 41430016 8e Linux LVM
Disk /dev/mapper/rhel-swap: 4294 MB, 4294967296 bytes, 8388608 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/rhel-root: 38.1 GB, 38084280320 bytes, 74383360 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@controller3 ~]# fdisk -l
<strong>Disk /dev/sda: 42.9 GB, 42949672960 bytes, 83886080 sectors</strong>
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: 0x0004e5e5
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 83886079 41430016 8e Linux LVM
<strong>Disk /dev/sdb: 32.2 GB, 32212254720 bytes, 62914560 sectors</strong>
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/rhel-swap: 4294 MB, 4294967296 bytes, 8388608 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/rhel-root: 38.1 GB, 38084280320 bytes, 74383360 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/ph