用fdisk 命令查看不到我们添加的磁盘:

 

[root@rac1 ~]# fdisk -l

 

Disk /dev/sda: 32.2 GB, 32212254720 bytes

255 heads, 63 sectors/track, 3916 cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

Sector size (logical/physical): 512 bytes /512 bytes

I/O size (minimum/optimal): 512 bytes / 512bytes

Disk identifier: 0x00085ca1

 

  Device Boot      Start         End     Blocks   Id  System

/dev/sda1  *           1          26      204800  83  Linux

Partition 1 does not end on cylinderboundary.

/dev/sda2              26         281    2048000   82  Linux swap / Solaris

Partition 2 does not end on cylinder boundary.

/dev/sda3             281        3917   29203456   83  Linux

[root@rac1 ~]#

 

--但查看/proc/partitions,可以显示:

[root@rac1 ~]# cat/proc/partitions

major minor #blocks  name

 

  8        0   31457280 sda

  8        1     204800 sda1

  8        2    2048000 sda2

  8        3   29203456 sda3

  8       16    8388608 sdb

  8       32    8388608 sdc

  8       48    8388608 sdd

  8       64    8388608 sde

  8       80    1048576 sdf

  8       96    1048576 sdg

  8      112    1048576 sdh

[root@rac1 ~]#

 

手工执行:start_udev 后,用fdisk命令也可以查看到磁盘。

 

推测udev在启动的过程出现问题。

 

查看系统udev服务的状态:

[root@rac1 ~]# service udev-post status

[root@rac1 ~]# chkconfig udev-post --list

udev-post       0:off  1:on    2:on    3:on   4:on    5:on    6:off

[root@rac1 ~]# service udev-post start

Retrigger failed udev events[  OK  ]

 

 

注意:

我这是Oracle linux ,所以udev服务是:udev-post, 如果是redhat ,对应的服务是:udev

 

 

不深入研究这个问题,将start_udev添加到启动项,保证能正常使用就可以了。

 

[root@rac2 ~]# vim /etc/rc.d/rc.local

 

#!/bin/sh

#

# This script will be executed *after* allthe other init scripts.

# You can put your own initialization stuffin here if you don't

# want to do the full Sys V style initstuff.

 

touch /var/lock/subsys/local

 

/sbin/start_udev

 

 

随笔小记之。


 

 

 

--------------------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Blog:     ​​http://www.cndba.cn/dave​

Weibo:    ​​http://weibo.com/tianlesoftware​

Twitter:  ​​ http://twitter.com/tianlesoftware​

Facebook: ​​ http://www.facebook.com/tianlesoftware​

Linkedin: ​​ http://cn.linkedin.com/in/tianlesoftware​