系统重启后卷不能自动挂载

环境:

DELL R900 RedHat linux 5.6 64bit

ORACLE 10GR2

在系统断电重启后发现存储上的iscsi卷没有自动挂载

[@more@]

解决步骤如下:
首先是查看物理卷是否已经发现:

[root@appdb-test oracle]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdc test_volum lvm2 a- 1.09T 87.93G
[root@appdb-test oracle]#
通过以上可以正确发现我之前创建的PV。

继续查看我们的逻辑组是否被发现:

[root@appdb-test oracle]# vgs -v
Finding all volume groups
Finding volume group "test_volum"
VG Attr Ext #PV #LV #SN VSize VFree VG UUID
test_volum wz--n- 4.00M 1 1 0 1.09T 87.93G o7WJjH-ZmGF-cfUG-xGjk-p7h0-8Gsh-OhjgvD
[root@appdb-test oracle]#

可以发现已经存在。

检查逻辑卷的状态:

[root@appdb-test oracle]# lvscan
inactive '/dev/test_volum/BACKUP_VOL' [1.00 TB] inherit
[root@appdb-test oracle]#

可以发现是inactive状态,问题找到了,将此卷设置为active状态就木有问题了:

[root@appdb-test oracle]# vgchange -a y /dev/test_volum
1 logical volume(s) in volume group "test_volum" now active
[root@appdb-test oracle]#

[root@appdb-test oracle]# lvscan
ACTIVE '/dev/test_volum/BACKUP_VOL' [1.00 TB] inherit
[root@appdb-test oracle]#

重新挂载,问题解决。

最后将LVM设置为启动时自动激活:

在/etc/rc.d/rc.local 内加入以下命令:

/sbin/vgsan
/sbin/vgchange -a y

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10130206/viewspace-1056358/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10130206/viewspace-1056358/

你可能感兴趣的:(系统重启后卷不能自动挂载)