I plan to install an Oracle database for the system and find that the disk space is insufficient. When installing the system, I select automatic partitioning, and the system will automatically partition by LVM. To ensure later availability of the system, we recommend that LVM be used for installation of all new systems, and I plan to do the same for later production devices. Disk status before resizing [root @ localhost ~] # Df-H File System & nbs I plan to install an O for the SystemRacleAnd the disk space is insufficient. When installing the system, I select automatic partitioning, and the system will automaticallyLVM. To ensure later availability of the system, it is recommended that all new systems be installedLVMAnd then I plan to do the same for production devices.
Disk status before resizing
[Root @ localhost ~] # Df-h
File SystemCapacity Used AvailableUsed%Mount point
/Dev/mapper/VolGroup-lv_root5.3 GB2.5 GB2.6 GB50%/
Tmpfs538 M0538 M0%/dev/shm
/Dev/sda1485 M30 M430 M7%/boot
[Root @ localhost ~] # Fdisk-l
Disk/dev/sda: 8589 MB, 8589934592 bytes
...............
Device BootStartEndBlocksIdSystem
/Dev/sda1*16451200083Linux
Partition 1 does not end on cylinder boundary.
/Dev/sda264104578755848eLinux LVM
Disk/dev/mapper/VolGroup-lv_root: 5779 MB, 5779750912 bytes
........
Disk/dev/mapper/VolGroup-lv_swap: 2281 MB, 2281701376 bytes
.........
The expansion scheme is as follows:
1Add1Items5GTo/
2Add1Items10GTo/Oracle
(1)InVMAdd one15GDisk
After restart# Fdisk-lWe can see that the new disk has been recognized.
Disk/dev/sdb: 16.1 GB, 16106127360 bytes
............................
Disk/dev/sdb doesn' t contain a valid partition table
(2) create a physical volume(PV)
Pvcreate/dev/sdb
View SystemPV:
[Root @ localhost ~] # Pvdisplay
--- Physical volume ---
PV Name/Dev/sda2//On the original Hard DiskPV
VG NameVolGroup
PV Size7.51 GiB/not usable 3.00 MiB
AllocatableYes (but full)
PE Size4.00 MiB
Total PE1922
Free PE0
Allocated PE1922
PV UUIDSGH1dY-4tp2-Nr1a-w93Z-V4LA-pQBh-VGzzTH
"/Dev/sdb" is a new physical volume of "15.00 GiB"
--- NEW Physical volume ---
PV Name/Dev/sdb
VG Name //The createdPVOfVG nameIt is empty. The next step isPVJoinVG
PV Size15.00 GiB
AllocatableNO
PE Size0
Total PE0
Free PE0
Allocated PE0
PV UUID8TZUlz-YyUp-RBvf-lSzm-7MgG-DSZS-qNqX1Z
View OriginalVGStatus
[Root @ localhost ~] # Vgdisplay
--- Volume group ---
VG NameVolGroup//Note that this name is recorded.PvAdd the specified name
System ID
FormatLvm2
Metadata Areas1
Metadata Sequence No3
VG Access Read/write
VG StatusResizable
MAX LV0
Cur LV2
Open LV2
Max PV0
Cur PV1
Act PV1
VG Size7.51 GiB
PE Size4.00 MiB
Total PE1922
AllocPE/Size1922/7 .51 GiB
FreePE/Size0/0
VG UUIDFnUsmX-s284-GeRK-hJNJ-BbIG-Vpe7-OuFZE1