linux partition reduce space required to install the system win

The difference between less and more

  • less you can use the up and down arrow keys to view, more can not
  • less load faster, because less need not read the entire file
  • When the contents of the file will not remain less exit the shell, and the contents of the file when more exit will remain in the shell interface
    space is page down, and b is a backward flip
    in fact, less is more powerful than more, so: less is more

fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 1024000 500M 83 Linux
/dev/sda2 1026048 210741247 209715200 100G 83 Linux
/dev/sda3 210741248 219129855 8388608 4G 82 Linux swap / Solaris
/dev/sda4 219129856 976773119 757643264 361.3G 5 Extended
/dev/sda5 219131904 976769023 757637120 361.3G 83 Linux

In / dev sda1, 2,3 is the primary partition, sda4 also a primary partition, called extended, extended partition in the back of the partition is extended.

[root@localhost lee]# pvscan
No matching physical volumes found

From disk partitions, -> pv -> vg - > lv three levels of hardware management (similar lvm (lv manage)), have created create, display display, delete remove, resize resize command, such as: vg to that there is:
the vgcreate, the vgdisplay, vgremove, vgresize these and other commands, of course, there are other related commands

Corresponding resize command, there are reduce, and extend, for example: lvresize command, actually contains lvreduce and lvextend command

About lix operating system, hardware and software system-level hierarchical system

  • Hardware system level: comprises from disk / partition, (physical volumes pv -> volume group vg -> LV logical volume, three logical volumes constituting lvm system, which is an intermediate layer between the hardware and file system can be, can not, directly to disk / partition <--- mounted on -> file system mount)
  • Software level, it is the file system filesystem, ie / root / home like
    if you use the words of the logical volume management, file systems such as / root, / home, etc. is mounted on a logical volume, for example: / home --mounted on --- / dev / mapper / vg_centos -lv_home

The traditional way to mount the operating system, file system exists on a hard disk, when the space on a hard drive runs out, you can not expand the storage space.
The advantage of using lvm is: can make the file system is mounted vg lv on the hard disk can be cross-vg, vg may be composed of a plurality of hard disks. such a plurality of hard disks of the vg shield underlying, actual production server to facilitate the expansion / reduction and increased storage drives

A disk may be divided into a plurality of physical volumes pv, actually a plurality of hard disks / partitions is a partition such as / dev / sda1 is a physical volume
in the logical volume lv represents time,

  • May be used the specific name of the volume group, such as: / dev / centos / lv_root,
  • You can also use a fixed "system volume group name mapper", such as: / dev / mapper / vg_centos-lv_root

Guess you like

Origin www.cnblogs.com/bkylee/p/12112959.html