메뉴 닫기

운영중인 서버에서 하드디스크 장착해서 인식시키기

(핫스왑 방식을 지원하지 않는 서버만 해당됩니다.)

서버의 특성상 24시간동안 멈추지 않고 가동 중에 있어야 되기 때문에 하드디스크를 장착 할 때도 서버를 리부팅 하지 않고 장착해서 인식을 시켜야 할 경우가 있습니다. 일반적으로 운영중인 서버에 하드디스크를 장착해서 인식시키는 명령어로 유명한 예가 솔라리스의 devfsadm이라는 명령어가 있습니다. 그러면 리눅스에서도 운영중인 서버에 하드디스크를 장착해서 인식시키는 명령어가 있는데 그것은 다음과 같습니다.

# echo “- – -“ > /sys/class/scsi_host/host#/scan

< host#의 부분은 SCSI host bus adapter번호입니다.(SCSI 0:xhost0, SCSI 1:xhost1 …) >

 

예제

[root@localhost ~]# fdisk -l

 

Disk /dev/sda: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 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: 0x00013545

 

Device Boot Start End Blocks Id System

/dev/sda1 * 1 26 204800 83 Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2 26 548 4194304 82 Linux swap / Solaris

Partition 2 does not end on cylinder boundary.

/dev/sda3 548 2611 16571392 83 Linux

 

[root@localhost ~]# echo “- – -” > /sys/class/scsi_host/host2/scan

 

[root@localhost ~]# fdisk -l

 

Disk /dev/sda: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 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: 0x00013545

 

Device Boot Start End Blocks Id System

/dev/sda1 * 1 26 204800 83 Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2 26 548 4194304 82 Linux swap / Solaris

Partition 2 does not end on cylinder boundary.

/dev/sda3 548 2611 16571392 83 Linux

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

 

[root@localhost ~]#

 [polldaddy rating=”7739789″]

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다