QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3652|回复: 6

LVM2 该怎么使用,折腾半天好郁闷

[复制链接]
发表于 2014-6-1 19:41:54 | 显示全部楼层 |阅读模式
内核确信是支持了
lvcreate -L2000M vg
  /dev/vg/lvol0: not found: device not cleared
  Aborting. Failed to wipe start of new LV.
  device-mapper: remove ioctl on  failed: 设备或资源忙
  semid 294912: semop failed for cookie 0xd4dc062: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223199330 (0xd4dc062) to initialize waiting for incoming notifications.
 楼主| 发表于 2014-6-1 19:43:10 | 显示全部楼层
vgdisplay
  --- Volume group ---
  VG Name               vg
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  11
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               2.00 GiB
  PE Size               4.00 MiB
  Total PE              512
  Alloc PE / Size       0 / 0   
  Free  PE / Size       512 / 2.00 GiB
  VG UUID               dY6xQf-te9c-6uDd-MtD6-Ejw3-NzM9-YTXG4v
回复

使用道具 举报

 楼主| 发表于 2014-6-3 08:37:22 | 显示全部楼层
搞不定,se 你有办法解决么,和 Fedora 的组件都一样,怎么就不能用。
回复

使用道具 举报

发表于 2014-6-3 10:00:12 | 显示全部楼层
我试试,不过以前的版本是没有问题的。
回复

使用道具 举报

 楼主| 发表于 2014-6-3 10:05:42 | 显示全部楼层
多次执行后可以成功一次,不知道毛病在哪
lvcreate -L3M vg1
  Rounding up size to full physical extent 4.00 MiB
  /dev/vg1/lvol0: not found: device not cleared
  Aborting. Failed to wipe start of new LV.
  semid 983040: semop failed for cookie 0xd4d7a3e: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223181374 (0xd4d7a3e) to initialize waiting for incoming notifications.
[root@MagicLinux3 ~]# lvcreate -L3M vg1
  Rounding up size to full physical extent 4.00 MiB
  /dev/vg1/lvol0: not found: device not cleared
  Aborting. Failed to wipe start of new LV.
  semid 1048576: semop failed for cookie 0xd4d86d5: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223184597 (0xd4d86d5) to initialize waiting for incoming notifications.
[root@MagicLinux3 ~]# lvcreate -L3M vg1
  Rounding up size to full physical extent 4.00 MiB
  /dev/vg1/lvol0: not found: device not cleared
  Aborting. Failed to wipe start of new LV.
  semid 1114112: semop failed for cookie 0xd4d3163: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223162723 (0xd4d3163) to initialize waiting for incoming notifications.
[root@MagicLinux3 ~]# lvcreate -L3M vg1
  Rounding up size to full physical extent 4.00 MiB
  Logical volume "lvol0" created
回复

使用道具 举报

 楼主| 发表于 2014-6-3 10:34:08 | 显示全部楼层
这个毛病还真是说不清楚啊。。。
首先把 libgcrypt 从 1.5.1 更新到 1.5.3,lvm2 升级到 2.02.103
kpartx-0.4.9 device-mapper-multipath 重新编译
之后出现 lvcreate 有时可以有时不可以工作
更新内核N次找不到原因,最后在 config 配置中找到
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
将其改成 CONFIG_UEVENT_HELPER_PATH=""
保存再次编译内核,重启后居然可以了。。。。
lvcreate -L30M vg1
  Rounding up size to full physical extent 32.00 MiB
  Logical volume "lvol6" created
回复

使用道具 举报

 楼主| 发表于 2014-6-4 00:14:46 | 显示全部楼层
尝试了一会 LVM2 的系统安装,结果发现在 LIVE 下虽然比之前要稳定多了,但仍可能会出现无法划分卷的现象。
原本以为可以利用 LVM2 虚拟卷将 SWAP 分区和系统分区放在一起,安全考虑还是暂时放弃了尝试。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-23 18:21 , Processed in 0.082006 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表