요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Hard disk shock protection
sysfs-block-device:23-50unload_heads는 지정한 millisecond 동안 head를 platter에서 치우고 I/O를 막으며, timeout·feature override·error code와 관련 documentation path를 규정합니다.
SATA와 SAS-attached NCQ priority enable
sysfs-block-device:53-75ncq_prio_enable과 sas_ncq_prio_enable은 native command queueing priority를 제어하며, SAS HBA driver support에 따라 attribute 존재 여부가 달라집니다.
NCQ priority support indicators
sysfs-block-device:78-97Read-only support attributes는 device capability와 SAS HBA implementation 조건을 구분해 보고합니다.
ATA·SCSI command duration limits
sysfs-block-device:100-119cdl_supported와 cdl_enable은 command duration limits capability를 확인하고 read·write command에 대한 kernel과 device 기능을 함께 켜거나 끕니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/block/*/device/sw_activity
Date: Jun, 2008
KernelVersion: v2.6.27
Contact: linux-ide@vger.kernel.org
Description:
(RW) Used by drivers which support software controlled activity
LEDs.
It has the following valid values:
== ========================================================
0 OFF - the LED is not activated on activity
1 BLINK_ON - the LED blinks on every 10ms when activity is
detected.
2 BLINK_OFF - the LED is on when idle, and blinks off
every 10ms when activity is detected.
== ========================================================
Note that the user must turn sw_activity OFF it they wish to
control the activity LED via the em_message file.
What: /sys/block/*/device/unload_heads
Date: Sep, 2008
KernelVersion: v2.6.28
Contact: linux-ide@vger.kernel.org
Description:
(RW) Hard disk shock protection
Writing an integer value to this file will take the heads of the
respective drive off the platter and block all I/O operations
for the specified number of milliseconds.
- If the device does not support the unload heads feature,
access is denied with -EOPNOTSUPP.
- The maximal value accepted for a timeout is 30000
milliseconds.
- A previously set timeout can be cancelled and disk can resume
normal operation immediately by specifying a timeout of 0.
- Some hard drives only comply with an earlier version of the
ATA standard, but support the unload feature nonetheless.
There is no safe way Linux can detect these devices, so this
is not enabled by default. If it is known that your device
does support the unload feature, then you can tell the kernel
to enable it by writing -1. It can be disabled again by
writing -2.
- Values below -2 are rejected with -EINVAL
For more information, see
Documentation/admin-guide/laptops/disk-shock-protection.rst
What: /sys/block/*/device/ncq_prio_enable
Date: Oct, 2016
KernelVersion: v4.10
Contact: linux-ide@vger.kernel.org
Description:
(RW) Write to the file to turn on or off the SATA NCQ (native
command queueing) priority support. By default this feature is
turned off. If the device does not support the SATA NCQ
priority feature, writing "1" to this file results in an error
(see ncq_prio_supported).
What: /sys/block/*/device/sas_ncq_prio_enable
Date: Oct, 2016
KernelVersion: v4.10
Contact: linux-ide@vger.kernel.org
Description:
(RW) This is the equivalent of the ncq_prio_enable attribute
file for SATA devices connected to a SAS host-bus-adapter
(HBA) implementing support for the SATA NCQ priority feature.
This file does not exist if the HBA driver does not implement
support for the SATA NCQ priority feature, regardless of the
device support for this feature (see sas_ncq_prio_supported).
What: /sys/block/*/device/ncq_prio_supported
Date: Aug, 2021
KernelVersion: v5.15
Contact: linux-ide@vger.kernel.org
Description:
(RO) Indicates if the device supports the SATA NCQ (native
command queueing) priority feature.
What: /sys/block/*/device/sas_ncq_prio_supported
Date: Aug, 2021
KernelVersion: v5.15
Contact: linux-ide@vger.kernel.org
Description:
(RO) This is the equivalent of the ncq_prio_supported attribute
file for SATA devices connected to a SAS host-bus-adapter
(HBA) implementing support for the SATA NCQ priority feature.
This file does not exist if the HBA driver does not implement
support for the SATA NCQ priority feature, regardless of the
device support for this feature.
What: /sys/block/*/device/cdl_supported
Date: May, 2023
KernelVersion: v6.5
Contact: linux-scsi@vger.kernel.org
Description:
(RO) Indicates if the device supports the command duration
limits feature found in some ATA and SCSI devices.
What: /sys/block/*/device/cdl_enable
Date: May, 2023
KernelVersion: v6.5
Contact: linux-scsi@vger.kernel.org
Description:
(RW) For a device supporting the command duration limits
feature, write to the file to turn on or off the feature.
By default this feature is turned off.
Writing "1" to this file enables the use of command duration
limits for read and write commands in the kernel and turns on
the feature on the device. Writing "0" disables the feature.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Software-controlled activity LED
1-20| 항목 | 전문 번역 |
|---|---|
| What | /sys/block/*/device/sw_activity |
| Date | 2008년 6월 |
| KernelVersion | v2.6.27 |
| Contact | linux-ide@vger.kernel.org |
| Description | (RW) Software-controlled activity LED를 지원하는 driver가 사용합니다. |
| 값 | 이름 | 전문 번역 |
|---|---|---|
| 0 | OFF | Activity가 있어도 LED를 activate하지 않습니다. |
| 1 | BLINK_ON | Activity를 감지하면 LED가 매 10ms마다 켜지는 방식으로 blink합니다. |
| 2 | BLINK_OFF | Idle일 때 LED가 켜져 있고, activity를 감지하면 매 10ms마다 꺼지는 방식으로 blink합니다. |
사용자가 em_message file을 통해 activity LED를 제어하려면 sw_activity를 OFF로 설정해야 합니다.
Hard disk head unload와 I/O 차단
23-50| 항목 | 전문 번역 |
|---|---|
| What | /sys/block/*/device/unload_heads |
| Date | 2008년 9월 |
| KernelVersion | v2.6.28 |
| Contact | linux-ide@vger.kernel.org |
| Description | (RW) Hard disk shock protection입니다. |
이 file에 정수 값을 쓰면 해당 drive의 head를 platter에서 치우고 지정한 millisecond 동안 모든 I/O operation을 차단합니다.
| 값·조건 | 전문 번역 |
|---|---|
| Feature 미지원 | Device가 unload heads feature를 지원하지 않으면 access가 -EOPNOTSUPP로 거부됩니다. |
| 1..30000 | Timeout으로 받아들이는 maximum 값은 30000ms입니다. |
| 0 | 이전에 설정한 timeout을 cancel하고 disk가 즉시 normal operation을 재개하게 합니다. |
| -1 | Linux가 안전하게 감지할 수 없는 구형 ATA standard device에서 unload feature support를 알고 있을 때 kernel에 강제로 enable하도록 알립니다. |
| -2 | -1로 강제 enable한 unload feature를 다시 disable합니다. |
| < -2 | 값을 -EINVAL로 거부합니다. |
일부 hard drive는 이전 ATA standard version만 준수하지만 unload feature를 지원합니다. Linux가 이런 device를 안전하게 감지할 방법이 없으므로 default로 enable하지 않습니다.
자세한 내용은 Documentation/admin-guide/laptops/disk-shock-protection.rst를 참조하십시오.
Shock 감지 뒤 head를 안전한 위치로 옮기고 I/O를 timeout 동안 차단하거나 즉시 cancel하는 흐름이다.
NCQ priority 기능 enable
53-75| What | Date | KernelVersion | Contact | 전문 번역 |
|---|---|---|---|---|
| /sys/block/*/device/ncq_prio_enable | 2016년 10월 | v4.10 | linux-ide@vger.kernel.org | (RW) 이 file에 써서 SATA NCQ(native command queueing) priority support를 켜거나 끕니다. Default로 이 feature는 꺼져 있습니다. Device가 SATA NCQ priority feature를 지원하지 않으면 이 file에 "1"을 쓸 때 error가 발생합니다. ncq_prio_supported를 참조하십시오. |
| /sys/block/*/device/sas_ncq_prio_enable | 2016년 10월 | v4.10 | linux-ide@vger.kernel.org | (RW) SATA NCQ priority feature support를 구현한 SAS host-bus-adapter(HBA)에 연결된 SATA device에서 ncq_prio_enable과 동등한 attribute file입니다. HBA driver가 SATA NCQ priority feature support를 구현하지 않았다면 device가 이 feature를 지원하더라도 이 file은 존재하지 않습니다. sas_ncq_prio_supported를 참조하십시오. |
NCQ priority support 확인
78-97| What | Date | KernelVersion | Contact | 전문 번역 |
|---|---|---|---|---|
| /sys/block/*/device/ncq_prio_supported | 2021년 8월 | v5.15 | linux-ide@vger.kernel.org | (RO) Device가 SATA NCQ(native command queueing) priority feature를 지원하는지 나타냅니다. |
| /sys/block/*/device/sas_ncq_prio_supported | 2021년 8월 | v5.15 | linux-ide@vger.kernel.org | (RO) SATA NCQ priority feature support를 구현한 SAS host-bus-adapter(HBA)에 연결된 SATA device에서 ncq_prio_supported와 동등한 attribute file입니다. HBA driver가 SATA NCQ priority feature support를 구현하지 않았다면 device가 이 feature를 지원하더라도 이 file은 존재하지 않습니다. |
Direct SATA device capability와 SAS HBA driver implementation이 각각 어떤 sysfs attribute를 결정하는지 구분한다.
Command duration limits capability와 enable
100-119| What | Date | KernelVersion | Contact | 전문 번역 |
|---|---|---|---|---|
| /sys/block/*/device/cdl_supported | 2023년 5월 | v6.5 | linux-scsi@vger.kernel.org | (RO) 일부 ATA와 SCSI device에 있는 command duration limits feature를 device가 지원하는지 나타냅니다. |
| /sys/block/*/device/cdl_enable | 2023년 5월 | v6.5 | linux-scsi@vger.kernel.org | (RW) Command duration limits feature를 지원하는 device에서 이 file에 써서 feature를 켜거나 끕니다. Default로 이 feature는 꺼져 있습니다. 이 file에 "1"을 쓰면 kernel의 read·write command에 command duration limits 사용을 enable하고 device에서도 feature를 켭니다. "0"을 쓰면 feature를 disable합니다. |
Software-controlled activity LED
sysfs-block-device:1-20sw_activity는 software가 activity LED를 off, activity 시 on-blink 또는 idle-on/activity-off-blink 방식으로 제어하며 em_message와의 ownership 조건을 정의합니다.