VBox fdisk不顯示添加的硬碟解決方案 用fdisk 命令查看不到我們添加的磁碟: [root@rac1 ~]# fdisk -l Disk /dev/sda: 32.2 GB, 32212254720 bytes255 heads, 63 sectors/track, 3916 cylindersUnits = cylinders of 16065 * 512 = 8225280bytesSector size (logical/physical): 512 bytes /512 bytesI/O size (minimum/optimal): 512 bytes / 512bytesDisk identifier: 0x00085ca1 Device Boot Start End Blocks Id System/dev/sda1 * 1 26 204800 83 LinuxPartition 1 does not end on cylinderboundary./dev/sda2 26 281 2048000 82 Linux swap / SolarisPartition 2 does not end on cylinder boundary./dev/sda3 281 3917 29203456 83 Linux[root@rac1 ~]# --但查看/proc/partitions,可以顯示:[root@rac1 ~]# cat/proc/partitionsmajor 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 --listudev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:off[root@rac1 ~]# service udev-post startRetrigger 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 隨筆小記之。