免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1748 | 回复: 3
打印 上一主题 下一主题

关于LVM的向大家请教下 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-08-23 12:13 |只看该作者 |倒序浏览
本帖最后由 finally01 于 2010-08-23 12:17 编辑

在做LVM实验的时候,逻辑卷/dev/vg0/data的大小是 500多M,为什么我挂载以后就只有299M

[root@localhost ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg0/data
  VG Name                vg0
  LV UUID                DKp81H-24O2-3mAh-g10y-A1jS-cHIk-GUX04R
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                508.00 MB
  Current LE             127
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0


[root@localhost ~]# mount /dev/vg0/data ~/LVM
[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             3.8G  3.1G  525M  86% /
/dev/sda5              33G  2.7G   29G   9% /home
/dev/sda1              46M   18M   26M  40% /boot
tmpfs                 506M     0  506M   0% /dev/shm
.host:/               206G   21G  186G  10% /mnt/hgfs
/dev/mapper/vg0-data  299M  2.1M  290M   1% /root/LVM



增加一是一样,一直不变,减少卷的大小倒是会变

论坛徽章:
0
2 [报告]
发表于 2010-08-23 12:22 |只看该作者
执行以下命令看一下:
  1. tune2fs -l /dev/vg0/data
复制代码
应该是逻辑卷大小事508M,但是你文件系统只做了299M

论坛徽章:
0
3 [报告]
发表于 2010-08-23 13:13 |只看该作者
回复 2# bbgg1983


    [root@localhost ~]# tune2fs -l /dev/vg0/data
tune2fs 1.39 (29-May-2006)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          4145ba68-a98f-475e-afe9-b61ba29f9ce2
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      resize_inode dir_index filetype sparse_super
Default mount options:    (none)
Filesystem state:         not clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              79872
Block count:              315392
Reserved block count:     6307
Free blocks:              303251
Free inodes:              79861
First block:              1
Block size:               1024
Fragment size:            1024
Reserved GDT blocks:      255
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         2048
Inode blocks per group:   256
Filesystem created:       Sun Aug 22 20:18:30 2010
Last mount time:          Sun Aug 22 20:57:52 2010
Last write time:          Sun Aug 22 20:57:52 2010
Mount count:              2
Maximum mount count:      21
Last checked:             Sun Aug 22 20:55:58 2010
Check interval:           15552000 (6 months)
Next check after:         Fri Feb 18 19:55:58 2011
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Default directory hash:   tea
Directory Hash Seed:      b5d0b559-6a95-4fb3-a0f5-ab0c45f8289e


帮我看下,是什么问题,刚刚入门linux 谢谢

论坛徽章:
0
4 [报告]
发表于 2010-08-23 13:27 |只看该作者
逻辑卷的大小是一回事,文件系统的大小是另一回事,
文件系统是可以扩大也可以缩小的,这个地方,如果你希望是508M,那么你先把这个逻辑卷umount了,然后用resize2fs扩大,不加大小参数,那么默认就扩大到逻辑卷的大小了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP