LVM_resize+根目录下各个目录的作用
2016-08-15 22:00
369 查看
Today I felt happy because I solved a problem on LVM resizing which defeated me last time I came across it.It felt good to conquer it.Now I will describe the problem.
As time goes by,the data on my /home is booming and It is said that the free space of the /home is low.
Here is my partition structure:
lv lv_var250G(mount /var) lv_home200G(mount /home)
vg vg01
pv /dev/sda1
Clearly,my partition is not wise because the /var doesn’t need so many space.
So I wanna shrank the /var and extend the /home.
I tried it in the winter holiday but failed.And finally I have to reinstall the virtual machine.
The right sequence of the LVM_resize is below.
Because the /var stores
/var 某些大文件的溢出区,比如说各种服务的日志
/mnt 供用户临时挂载其他文件系统
/tmp 共用的临时文件存储点
/lost+found非正常关机留下的“无家可归”的文件
/proc 虚拟的目录,是系统内存的映射,可以直接访问这个目录来获取系统信息
/usr 要用到的应用程序和文件几乎都在这个目录
/usr/bin 众多应用
/bin 二进制可执行命令
–/sbin 系统管理命令
-/usr/sbin 超级用户的管理程序
-/usr/doc linux文档
-/usr/includeLinux开发头文件
-/usr/lib 常用的动态链接库和软件包配置文件
-/usr/src 源代码
-/usr/local/bin
-/usr/local/lib 本地增加的命令,库根文件系统
/lib 跟文件系统所需要的共享库,存放了很多跟文件系统程序运行所需的共享文件,包括很多共享代码
/lib/modules 包括了很多系统核心可加载的各种模块,尤其是再回敷系统重新引导需要的
/var is important,and if we try to umount /var ,it is reported that /var is busy.
So we have to enter LiveCD mode to do LVM_resize.
Make sure you have installed the lvm2–Linux Logical Volumn Manager then use lvscan to see the situation.
To shrank a file system you should use resize2fs (man it to see how to use it)
then lvreduce (also man)
PAY ATTENTION you should shrank the file system first.
To extend a file system you should use lvextend then resize2fs.(root)
Then don’t forget to lvchange!!!
Look back on this journey,it is clear and easy.But I actually came across a series of problems.
As time goes by,the data on my /home is booming and It is said that the free space of the /home is low.
Here is my partition structure:
lv lv_var250G(mount /var) lv_home200G(mount /home)
vg vg01
pv /dev/sda1
Clearly,my partition is not wise because the /var doesn’t need so many space.
So I wanna shrank the /var and extend the /home.
I tried it in the winter holiday but failed.And finally I have to reinstall the virtual machine.
The right sequence of the LVM_resize is below.
Because the /var stores
/var 某些大文件的溢出区,比如说各种服务的日志
/mnt 供用户临时挂载其他文件系统
/tmp 共用的临时文件存储点
/lost+found非正常关机留下的“无家可归”的文件
/proc 虚拟的目录,是系统内存的映射,可以直接访问这个目录来获取系统信息
/usr 要用到的应用程序和文件几乎都在这个目录
/usr/bin 众多应用
/bin 二进制可执行命令
–/sbin 系统管理命令
-/usr/sbin 超级用户的管理程序
-/usr/doc linux文档
-/usr/includeLinux开发头文件
-/usr/lib 常用的动态链接库和软件包配置文件
-/usr/src 源代码
-/usr/local/bin
-/usr/local/lib 本地增加的命令,库根文件系统
/lib 跟文件系统所需要的共享库,存放了很多跟文件系统程序运行所需的共享文件,包括很多共享代码
/lib/modules 包括了很多系统核心可加载的各种模块,尤其是再回敷系统重新引导需要的
/var is important,and if we try to umount /var ,it is reported that /var is busy.
So we have to enter LiveCD mode to do LVM_resize.
Make sure you have installed the lvm2–Linux Logical Volumn Manager then use lvscan to see the situation.
To shrank a file system you should use resize2fs (man it to see how to use it)
then lvreduce (also man)
PAY ATTENTION you should shrank the file system first.
To extend a file system you should use lvextend then resize2fs.(root)
Then don’t forget to lvchange!!!
Look back on this journey,it is clear and easy.But I actually came across a series of problems.
相关文章推荐
- Android 安装各个目录的作用
- 【Linux】各个目录下的作用和内容
- 【转】Linux /dev目录详解和Linux系统各个目录的作用
- Linux系统各个目录的作用
- Linux 下各个目录的作用
- Linux(centos)系统各个目录的作用详解
- Linux(centos)系统各个目录的作用详解 推荐
- Linux常用英文缩写的含义以及各个目录的作用
- linux 各个目录作用
- Linux(centos)系统各个目录的作用详解
- Linux /dev目录详解和Linux系统各个目录的作用
- Linux各个目录的作用
- Linux基础知识之Linux系统各个目录的作用
- Linux(centos)系统各个目录的作用详解
- Linux /dev目录详解和Linux系统各个目录的作用
- Linux(Ubuntu)系统各个目录的作用详解(整合)
- Linux系统各个目录的作用(中英文对照)
- Linux系统各个目录的作用(中英文对照)
- Linux(Ubuntu)系统各个目录的作用详解(整合)
- Linux系统各个目录的作用(中英文对照)