Fedora 中使用逻辑卷管理器调整LVM分区大小

虚拟机中先调整虚拟硬盘大小为20G

 VBoxManage modifyhd "D:\Program Files\Oracle\VirtualBox VMs\Fedora\Fedora.vdi" --resize 20000

然后用Gparted LiveCD把磁盘中新增的free空间分给LVM对应的分区


当时安装fedora 18时分区方案不是很好,使得/根目录剩余空间不足,于是想扩展下/目录,相当当初安装到时候是LVM分区,于是找了下,有一个图形化界面的逻辑卷管理器。

1
2
3
4
5
6
7
8
9
10
11
12
13
[shenghao@sh-thinkpad ~]$  df  -h
文件系统                 容量  已用  可用 已用% 挂载点
rootfs                   9.8G  7.0G  2.3G   76% /
devtmpfs                 957M     0  957M    0%  /dev
tmpfs                    972M  232K  972M    1%  /dev/shm
tmpfs                    972M  2.8M  969M    1%  /run
tmpfs                    972M     0  972M    0%  /sys/fs/cgroup
/dev/mapper/fedora-root   9.8G  7.0G  2.3G   76% /
tmpfs                    972M   28K  972M    1%  /tmp
/dev/mapper/fedora-home    18G  1.5G   16G    9%  /home
/dev/sda2                  40G   29G   12G   72%  /run/media/shenghao/7E283A1F2839D73D
/dev/sda5                  81G   53G   28G   66%  /run/media/shenghao/ 新加卷
/dev/sda6                 149G  122G   27G   82%  /run/media/shenghao/ 新加卷1


root只剩2.3G可用,下面安装逻辑卷管理器,查找一下这个软件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[shenghao@sh-thinkpad ~]$  sudo  yum list | grep  lvm
[ sudo ] password  for  shenghao:
Repository fedora is listed  more  than once  in  the configuration
Repository fedora-debuginfo is listed  more  than once  in  the configuration
Repository fedora- source  is listed  more  than once  in  the configuration
Repository updates is listed  more  than once  in  the configuration
Repository updates-debuginfo is listed  more  than once  in  the configuration
Repository updates- source  is listed  more  than once  in  the configuration
Repository updates is listed  more  than once  in  the configuration
Repository updates-debuginfo is listed  more  than once  in  the configuration
Repository updates- source  is listed  more  than once  in  the configuration
Repository fedora is listed  more  than once  in  the configuration
Repository fedora-debuginfo is listed  more  than once  in  the configuration
Repository fedora- source  is listed  more  than once  in  the configuration
llvm-libs.i686                             3.1-11.fc18                  @koji-override-0/$releasever
lvm2.i686                                  2.02.98-4.fc18               @koji-override-0/$releasever
lvm2-libs.i686                             2.02.98-4.fc18               @koji-override-0/$releasever
holland-mysqllvm.noarch                    1.0.6-6.fc18                 fedora
llvm.i686                                  3.2-2.fc18                   updates
llvm-devel.i686                            3.2-2.fc18                   updates
llvm-doc.noarch                            3.2-2.fc18                   updates
llvm-libs.i686                             3.2-2.fc18                   updates
llvm-ocaml.i686                            3.2-2.fc18                   updates
llvm-ocaml-devel.i686                      3.2-2.fc18                   updates
llvm-ocaml-doc.noarch                      3.2-2.fc18                   updates
llvm-static.i686                           3.2-2.fc18                   updates
lvm2-cluster.i686                          2.02.98-4.fc18               fedora
lvm2-devel.i686                            2.02.98-4.fc18               fedora
lvm2-sysvinit.i686                         2.02.98-4.fc18               fedora
mingw32-llvm.noarch                        3.0-5.fc18                   fedora
mingw32-llvm-static.noarch                 3.0-5.fc18                   fedora
python-lvm.i686                            1.9.2-1.fc18                 fedora
system-config-lvm.noarch                   1.1.18-1.fc18                fedora
visualvm.i686                              1.3.3-1.3.1.fc17.1           fedora


很明显,system-config-lvm.noarch这个就是,然后install 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[root@sh-thinkpad shenghao] # yum install system-config-lvm.noarch
已加载插件:fastestmirror, langpacks, presto, refresh-packagekit, remove-with-leaves
Repository fedora is listed  more  than once  in  the configuration
Repository fedora-debuginfo is listed  more  than once  in  the configuration
Repository fedora- source  is listed  more  than once  in  the configuration
Repository updates is listed  more  than once  in  the configuration
Repository updates-debuginfo is listed  more  than once  in  the configuration
Repository updates- source  is listed  more  than once  in  the configuration
Repository updates is listed  more  than once  in  the configuration
Repository updates-debuginfo is listed  more  than once  in  the configuration
Repository updates- source  is listed  more  than once  in  the configuration
Repository fedora is listed  more  than once  in  the configuration
Repository fedora-debuginfo is listed  more  than once  in  the configuration
Repository fedora- source  is listed  more  than once  in  the configuration
Loading mirror speeds from cached hostfile
  * fedora: mirrors.sohu.com
  * rpmfusion- free : mirrors.163.com
  * rpmfusion- free -updates: mirrors.163.com
  * rpmfusion-nonfree: mirrors.163.com
  * rpmfusion-nonfree-updates: mirrors.163.com
  * updates: mirrors.163.com
解决依赖关系
--> 执行事务检查
---> 软件包 system-config-lvm.noarch.0.1.1.18-1.fc18 将被 安装
--> 处理依赖关系 gnome-python2-gnome,它被软件包 system-config-lvm-1.1.18-1.fc18.noarch 需要
--> 处理依赖关系 gnome-python2-bonobo,它被软件包 system-config-lvm-1.1.18-1.fc18.noarch 需要
--> 执行事务检查
---> 软件包 gnome-python2-bonobo.i686.0.2.28.1-9.fc18 将被 安装
--> 处理依赖关系 pyorbit(x86-32) >= 2.0.1,它被软件包 gnome-python2-bonobo-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libbonoboui(x86-32) >= 2.8.0,它被软件包 gnome-python2-bonobo-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libbonobo(x86-32) >= 2.8.0,它被软件包 gnome-python2-bonobo-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 bonobo-activation >= 2.8.0,它被软件包 gnome-python2-bonobo-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libgnome-2.so.0,它被软件包 gnome-python2-bonobo-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libbonoboui-2.so.0,它被软件包 gnome-python2-bonobo-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libbonobo-activation.so.4,它被软件包 gnome-python2-bonobo-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libbonobo-2.so.0,它被软件包 gnome-python2-bonobo-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libORBit-2.so.0,它被软件包 gnome-python2-bonobo-2.28.1-9.fc18.i686 需要
---> 软件包 gnome-python2-gnome.i686.0.2.28.1-9.fc18 将被 安装
--> 处理依赖关系 gnome-python2-gnomevfs(x86-32) = 2.28.1-9.fc18,它被软件包 gnome-python2-gnome-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libgnomeui(x86-32) >= 2.8.0,它被软件包 gnome-python2-gnome-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libgnomevfs-2.so.0,它被软件包 gnome-python2-gnome-2.28.1-9.fc18.i686 需要
--> 处理依赖关系 libgnomeui-2.so.0,它被软件包 gnome-python2-gnome-2.28.1-9.fc18.i686 需要
--> 执行事务检查
---> 软件包 ORBit2.i686.0.2.14.19-6.fc18 将被 安装
--> 处理依赖关系 libIDL-2.so.0,它被软件包 ORBit2-2.14.19-6.fc18.i686 需要
---> 软件包 gnome-python2-gnomevfs.i686.0.2.28.1-9.fc18 将被 安装
---> 软件包 gnome-vfs2.i686.0.2.24.4-10.fc18 将被 安装
---> 软件包 libbonobo.i686.0.2.32.1-3.fc18 将被 安装
---> 软件包 libbonoboui.i686.0.2.24.5-4.fc18 将被 安装
---> 软件包 libgnome.i686.0.2.32.1-5.fc18 将被 安装
---> 软件包 libgnomeui.i686.0.2.24.5-5.fc18 将被 安装
---> 软件包 pyorbit.i686.0.2.24.0-11.fc18 将被 安装
--> 执行事务检查
---> 软件包 libIDL.i686.0.0.8.14-5.fc18 将被 安装
--> 完成依赖关系计算
依赖关系解决
================================================================================
  Package                     架构        版本                仓库          大小
================================================================================
正在安装:
  system-config-lvm           noarch      1.1.18-1.fc18       fedora       462 k
为依赖而安装:
  ORBit2                      i686        2.14.19-6.fc18      fedora       170 k
  gnome-python2-bonobo        i686        2.28.1-9.fc18       fedora        82 k
  gnome-python2-gnome         i686        2.28.1-9.fc18       fedora        77 k
  gnome-python2-gnomevfs      i686        2.28.1-9.fc18       fedora        82 k
  gnome-vfs2                  i686        2.24.4-10.fc18      updates      835 k
  libIDL                      i686        0.8.14-5.fc18       fedora        85 k
  libbonobo                   i686        2.32.1-3.fc18       fedora       424 k
  libbonoboui                 i686        2.24.5-4.fc18       fedora       340 k
  libgnome                    i686        2.32.1-5.fc18       fedora       738 k
  libgnomeui                  i686        2.24.5-5.fc18       fedora       785 k
  pyorbit                     i686        2.24.0-11.fc18      fedora        50 k
事务概要
================================================================================
安装  1 软件包 (+11 Dependent packages)
总下载量:4.0 M
安装大小:20 M
确定吗?[y /N ]:y
下载软件包:
(1 /12 ): ORBit2-2.14.19-6.fc18.i686.rpm                     | 170 kB   00:00   
(2 /12 ): gnome-python2-gnome-2.28.1-9.fc18.i686.rpm         |  77 kB   00:00   
(3 /12 ): gnome-python2-bonobo-2.28.1-9.fc18.i686.rpm        |  82 kB   00:00   
(4 /12 ): gnome-python2-gnomevfs-2.28.1-9.fc18.i686.rpm      |  82 kB   00:00   
(5 /12 ): libIDL-0.8.14-5.fc18.i686.rpm                      |  85 kB   00:00   
(6 /12 ): libbonoboui-2.24.5-4.fc18.i686.rpm                 | 340 kB   00:00   
(7 /12 ): libbonobo-2.32.1-3.fc18.i686.rpm                   | 424 kB   00:00   
(8 /12 ): libgnome-2.32.1-5.fc18.i686.rpm                    | 738 kB   00:00   
(9 /12 ): pyorbit-2.24.0-11.fc18.i686.rpm                    |  50 kB   00:00   
(10 /12 ): libgnomeui-2.24.5-5.fc18.i686.rpm                 | 785 kB   00:00   
(11 /12 ): system-config-lvm-1.1.18-1.fc18.noarch.rpm        | 462 kB   00:00   
(12 /12 ): gnome-vfs2-2.24.4-10.fc18.i686.rpm                | 835 kB   00:03   
--------------------------------------------------------------------------------
总计                                            1.2 MB /s  | 4.0 MB     00:03   
运行事务检查
执行事务测试
事务测试成功
执行事务
   正在安装    : gnome-vfs2-2.24.4-10.fc18.i686                             1 /12
   正在安装    : libIDL-0.8.14-5.fc18.i686                                  2 /12
   正在安装    : ORBit2-2.14.19-6.fc18.i686                                 3 /12
   正在安装    : pyorbit-2.24.0-11.fc18.i686                                4 /12
   正在安装    : libbonobo-2.32.1-3.fc18.i686                               5 /12
   正在安装    : libgnome-2.32.1-5.fc18.i686                                6 /12
   正在安装    : libbonoboui-2.24.5-4.fc18.i686                             7 /12
   正在安装    : gnome-python2-bonobo-2.28.1-9.fc18.i686                    8 /12
   正在安装    : libgnomeui-2.24.5-5.fc18.i686                              9 /12
   正在安装    : gnome-python2-gnomevfs-2.28.1-9.fc18.i686                 10 /12
   正在安装    : gnome-python2-gnome-2.28.1-9.fc18.i686                    11 /12
   正在安装    : system-config-lvm-1.1.18-1.fc18.noarch                    12 /12
   Verifying   : libIDL-0.8.14-5.fc18.i686                                  1 /12
   Verifying   : gnome-python2-gnome-2.28.1-9.fc18.i686                     2 /12
   Verifying   : libbonobo-2.32.1-3.fc18.i686                               3 /12
   Verifying   : gnome-python2-gnomevfs-2.28.1-9.fc18.i686                  4 /12
   Verifying   : gnome-python2-bonobo-2.28.1-9.fc18.i686                    5 /12
   Verifying   : pyorbit-2.24.0-11.fc18.i686                                6 /12
   Verifying   : system-config-lvm-1.1.18-1.fc18.noarch                     7 /12
   Verifying   : libgnomeui-2.24.5-5.fc18.i686                              8 /12
   Verifying   : libgnome-2.32.1-5.fc18.i686                                9 /12
   Verifying   : ORBit2-2.14.19-6.fc18.i686                                10 /12
   Verifying   : gnome-vfs2-2.24.4-10.fc18.i686                            11 /12
   Verifying   : libbonoboui-2.24.5-4.fc18.i686                            12 /12
已安装:
   system-config-lvm.noarch 0:1.1.18-1.fc18                                    
作为依赖被安装:
   ORBit2.i686 0:2.14.19-6.fc18                                                
   gnome-python2-bonobo.i686 0:2.28.1-9.fc18                                   
   gnome-python2-gnome.i686 0:2.28.1-9.fc18                                    
   gnome-python2-gnomevfs.i686 0:2.28.1-9.fc18                                 
   gnome-vfs2.i686 0:2.24.4-10.fc18                                            
   libIDL.i686 0:0.8.14-5.fc18                                                 
   libbonobo.i686 0:2.32.1-3.fc18                                              
   libbonoboui.i686 0:2.24.5-4.fc18                                            
   libgnome.i686 0:2.32.1-5.fc18                                               
   libgnomeui.i686 0:2.24.5-5.fc18                                             
   pyorbit.i686 0:2.24.0-11.fc18                                               
完毕!

安装完毕,可以使用了:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值