1. 程式人生 > >linux線上新增硬碟、掃盤

linux線上新增硬碟、掃盤


1:檢視scsi 硬碟裝置
[[email protected]
~]# ls /sys/class/scsi_host host0 host1 host2

2:檢查本機現有硬碟 [[email protected] ~]# fdisk /dev/sda sda sda1 sda2 sda3
3:重新整理scsi驅動器 [[email protected] ~]# echo "- - -" > /sys/class/scsi_host/host0/scan [[email protected] ~]# echo "- - -" > /sys/class/scsi_host/host1/scan [
[email protected]
~]# echo "- - -" > /sys/class/scsi_host/host2/scan [[email protected] ~]# fdisk /dev/sd sda sda1 sda2 sda3 sdb sdc [[email protected] ~]# fdisk /dev/sd^C [[email protected] ~]# fdisk -l Disk /dev/sda: 53.7 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units
= cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0007f7e4 Device Boot Start End Blocks Id System /dev/sda1 * 1 131 1048576 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 131
6336 49843200 83 Linux /dev/sda3 6336 6528 1536000 82 Linux swap / Solaris Disk /dev/sdb: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdc: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 [[email protected] ~]#