Lvm extended disk partition

  
 

Under the virtual machine, the CentOS6.3 system uses the minimum installation by default. The default is divided into 3 zones, namely the root zone, the boot zone and the swap zone:

[root@localhost home]# df -h

File System Capacity Already Available %% Mount Point

/dev/mapper/VolGroup-lv_root

14G 13G 1G 92% /

tmpfs 246M 0 246M 0% /dev/shm

/dev/sda1 485M 52M 408M 12% /boot

Because this system is only used for testing, it only gives 15G space ( The total disk space is 30G). It took a long time to find that the disk space is almost full, so I plan to expand the disk.

Target: Because the system itself does not occupy much space, mainly in the /home directory, so plan to mount the original home directory to a new partition, the specific implementation is as follows:

Partition the remaining space of the disk:

[root@localhost ~]# fdisk /dev/sda

Press the {p} key to see the current partition status of the disk, press [m] You can view the help, we press [n] to create the partition and then press [e] to create the extended partition, enter the partition number and partition size and other parameters, then create the partition and then press [n], then press [l] to create the logical partition sda5

After returning, press [t] and enter the partition number [5], then enter 8e, and change the logical partition sda5 type just created to linux lvm

and press [w] to return.

Second, create pv

[root@localhost ~]# pvcreate /dev/sda5

Device /dev/sda5 not found (or ignored by filtering).

I can't find it. I have been confused for a long time. I don't know where the problem is. For this reason, I posted a question in the 51cto linux forum, but I didn't get it. Later I accidentally saw an introduction to the fdisk command. The article, said that after the partition to refresh the partition table, otherwise you can not see the partition, I quickly used ls to see the partition situation, I really can not see:

[root@localhost ~]# ls /dev /

Copyright © Windows knowledge All Rights Reserved