Work Intent: Stop the disks query from spinning up array disks (#2018)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 64/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, typescript
- Lĩnh vực
- api, operating-systems, performance
Hướng nghiên cứu
Start in disks.service.ts at getDisks(), then read getPhysicalDisks(), parseDisk(), and blockDevices() to understand the current disk shape and partition handling. Run the existing disk-service tests before adding coverage for lsblk mapping, smartctl standby status, device filtering, and ensuring diskLayout() is no longer called. Done means disk-list queries avoid waking standby disks while preserving the expected disk fields and status behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Overview
Fix #2018. Any query that goes through DisksService.getDisks() wakes every spun-down array disk: disks, disk(id), assignableDisks and the onboarding Internal Boot step (getAssignableDisks() / getInternalBootDevices()). Even { disks { id } } is enough. Anything that polls the disk list keeps large drives from staying in standby.
The cause is the same one #2090 / #2091 found for temperatures: getDisks() builds its list from diskLayout() in systeminformation, which on Linux runs smartctl -a -j and smartctl -H on every disk without -n standby.
I've been running the approach below as a runtime patch on my own server (Unraid 7.3, mixed array with 16 and 18 TB drives) for a few months. With the disks spun down, { disks { id } } spins up every large drive on stock, and none with the patch. The query also goes from several seconds to under 500 ms.
Technical Approach
- Replace
diskLayout()ingetDisks()with a listing fromlsblk -d -b -J -O, which only reads kernel metadata. Ideally this builds ongetPhysicalDisks()from #2091 once it lands, adding the columnsgetDisks()needs (vendor, firmware revision, rotational) so there is a single place that lists disks. - Map each device to the shape
diskLayout()returns today, soparseDisk()stays as it is:device,name(model),vendor,serialNum,firmwareRevision,interfaceType(fromtran),sizein bytes, andtypeasHD/SSD/NVMe(fromrotaandtran, same valuesdiskLayout()returns). lsblk reportsvendor: "ATA"for SATA drives, so in that case the vendor is derived from the model string. - Get
smartStatusfromsmartctl -n standby -H -j <device>. Exit code 2 means the disk is in standby and was not queried, which maps toUNKNOWN. - Keep
blockDevices()for partitions. - Tests: unit tests for the lsblk mapping (size in bytes, drive type, vendor fallback, filtering out loop/ram devices) and for the smartctl status mapping, plus a test that
getDisks()no longer callsdiskLayout().
Out of scope: the geometry fields on Disk (bytesPerSector, totalSectors, etc.) are non-nullable but diskLayout() already returns null for them on Linux, so selecting them errors today. This change would leave them as they are; happy to look at that separately.
Scope
- API
- Plugin
- Web UI
- Build/Deploy Process
- Documentation
Timeline & Impact
- Estimated time needed: a few days, since the logic already runs as a patch and mostly needs porting and tests. I'd start after #2091 is merged to avoid conflicts in
disks.service.ts. - Potential impacts:
smartStatusbecomesUNKNOWNfor disks in standby instead of waking them to read it. No schema changes.
Pre-submission Checklist
- I have searched for similar work/issues
- I understand this needs approval before starting
- I am willing to make adjustments based on feedback
- Ngôn ngữ chính
- TypeScript
- Star
- 113
- Fork
- 23
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của unraid/api
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Work Intent: File Manager integration for #1599Có thể đã có người làm @elibosley đã nhận 5 ngày trước. Đang mở
unraid/api#2103 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Work Intent: Stop the temperature metrics query from spinning up array disks (#2017)Có thể đã có người làm @elibosley đã nhận 15 ngày trước. Đang mở
unraid/api#2090 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Bump Firebase JS SDK (12.19.0 → 13.0.0)Có thể đã có người làm @SelaseKay đã nhận hôm nay. Đang mởNeeds Attention type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
invertase/react-native-firebase#9364 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 4 ngày
-
[fullsend] E2E: rhdh-version-override — run-e2e.sh overrides RHDH_VERSION to non-existent 2.1Đang mởe2e-failure ready-to-code
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
redhat-developer/rhdh-plugin-export-overlays#4261 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] 官网文档的图片挂了Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cli bug triage:in-progress
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày