메뉴 닫기

디스크 링크속도 확인방법

메인보드내 4개의 SATA 포트중 링크 속도별로 분류해서  ZFS 파일시스템으로 묶으려던 도중 포트별 링크속도를 확인하는 방법을 정리해봅니다.
리눅스 명령어를 이용해서 디스크 정보와 링크속도를 확인하는 방법입니다. 
실제 디스크 링크속도는 메인보드와 디스크에서 모두 지원되어야 원하는 속도가 나오기에 잘 확인하셔서 이용하여야 하며 손쉽게 확인하는 방법으로 아래 4개정도로 요약해 볼 수 있을거 같습니다.
 
※ SATA DISK Revision
SATA REVISION => SPEED ({Gbit|MB}/s)
SATA revision 1.0 => 1.5 Gbit/s, 150 MB/s
SATA revision 2.0 => 3 Gbit/s, 300 MB/s
SATA revision 3.0 => 6 Gbit/s, 600 MB/s
SATA revision 3.2 => 16 Gbit/s, 1969 MB/s
sata_ports
 
 1. dmesg 로그로 확인
# dmesg | grep -i sata | grep ‘link up’
[    2.569676] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    2.569697] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    2.569718] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    2.569746] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
 
 
2. smartctl 명령어
 :: smartctl 패키지가 없을경우 설치
# apt-get install smartmontools
# smartctl -a /dev/sdb | grep “^SATA”
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
# smartctl -a /dev/sdc | grep “^SATA”
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
# smartctl -a /dev/sdd | grep “^SATA”
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
# smartctl -a /dev/sde | grep “^SATA”
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
 
 
3. hdparm 명령어 
# hdparm -I /dev/sdb | egrep “Model|speed|Transport”
Model Number:       ST3000DM001-1CH166                      
Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
  *Gen1 signaling speed (1.5Gb/s)
  *Gen2 signaling speed (3.0Gb/s)
  *Gen3 signaling speed (6.0Gb/s)
  *SMART Command Transport (SCT) feature set
# hdparm -I /dev/sdc | egrep “Model|speed|Transport”
Model Number:       ST3000DM001-1ER166                      
Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
  *Gen1 signaling speed (1.5Gb/s)
  *Gen2 signaling speed (3.0Gb/s)
  *Gen3 signaling speed (6.0Gb/s)
  *SMART Command Transport (SCT) feature set
# hdparm -I /dev/sdd | egrep “Model|speed|Transport”
Model Number:       ST3000DM001-1ER166                      
Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
  *Gen1 signaling speed (1.5Gb/s)
  *Gen2 signaling speed (3.0Gb/s)
  *Gen3 signaling speed (6.0Gb/s)
  *SMART Command Transport (SCT) feature set
# hdparm -I /dev/sde | egrep “Model|speed|Transport”
Model Number:       ST3000DM001-1CH166                      
Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
  *Gen1 signaling speed (1.5Gb/s)
  *Gen2 signaling speed (3.0Gb/s)
  *Gen3 signaling speed (6.0Gb/s)
  *SMART Command Transport (SCT) feature set
 
 
4. /sys(시스템정보)내 정보를 Shell script 이용해서 확인
!/bin/bash
for i in `grep -l Gbps /sys/class/ata_link/*/sata_spd`; do
 echo Link “${i%/*}” Speed `cat $i`
 cat “${i%/*}”/device/dev*/ata_device/dev*/id | perl -nE ‘s/([0-9a-f]{2})/print chr hex $1/gie’ | echo ”    ” Device `strings` | cut -f 1-3
done
Link /sys/class/ata_link/link1 Speed 6.0 Gbps
     Device Z1F55V2X CC29 ST3000DM001-1CH166 4k}iAc4i IAc@ ]P
Link /sys/class/ata_link/link2 Speed 6.0 Gbps
     Device Z5002Q7H CC43 ST3000DM001-1ER166 4k}iAc4i IAc@ ]P
Link /sys/class/ata_link/link3 Speed 3.0 Gbps
     Device Z5002QGC CC43 ST3000DM001-1ER166 4k}iAc4i IAc@ ]P
Link /sys/class/ata_link/link4 Speed 3.0 Gbps
     Device Z1F54ZFX CC29 ST3000DM001-1CH166 4k}iAc4i IAc@ ]P
 
 [polldaddy rating=”7739789″]
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x