{"id":20251608,"url":"https://github.com/gopalasubramanium/hdd-power-manager","last_synced_at":"2026-05-06T09:37:56.551Z","repository":{"id":261895302,"uuid":"885659899","full_name":"gopalasubramanium/hdd-power-manager","owner":"gopalasubramanium","description":"A simple and effective shell script to manage hard drive power settings on Raspberry Pi and similar Linux-based systems. ","archived":false,"fork":false,"pushed_at":"2024-11-09T06:53:19.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T02:47:02.994Z","etag":null,"topics":["hard-drive","linux","power-management","raspberry-pi"],"latest_commit_sha":null,"homepage":"https://me.sgopala.com","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gopalasubramanium.png","metadata":{"files":{"readme":"README.html","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-09T03:54:44.000Z","updated_at":"2024-12-27T21:05:48.000Z","dependencies_parsed_at":"2024-11-09T04:29:41.156Z","dependency_job_id":"4889cba6-fcc3-4c02-a130-99a59c121cbc","html_url":"https://github.com/gopalasubramanium/hdd-power-manager","commit_stats":null,"previous_names":["gopalasubramanium/hdd-power-manager"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopalasubramanium%2Fhdd-power-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopalasubramanium%2Fhdd-power-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopalasubramanium%2Fhdd-power-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopalasubramanium%2Fhdd-power-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gopalasubramanium","download_url":"https://codeload.github.com/gopalasubramanium/hdd-power-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241702306,"owners_count":20005941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hard-drive","linux","power-management","raspberry-pi"],"created_at":"2024-11-14T10:11:14.862Z","updated_at":"2026-05-06T09:37:51.518Z","avatar_url":"https://github.com/gopalasubramanium.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003ctitle\u003eDrive Power Management Script\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003ch1\u003e🖥️ Drive Power Management Script\u003c/h1\u003e\n\n    \u003cp\u003eThis script automates hard drive power management on Linux-based systems (e.g., Raspberry Pi) by configuring drives to spin down when inactive, thereby extending drive lifespan.\u003c/p\u003e\n\n    \u003ch2\u003e📋 Features\u003c/h2\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003cstrong\u003eDrive Detection\u003c/strong\u003e: Automatically detects connected drives and prompts the user for selection.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003ePower Management Configuration\u003c/strong\u003e:\n            \u003cul\u003e\n                \u003cli\u003eInstalls and configures \u003ccode\u003ehdparm\u003c/code\u003e, \u003ccode\u003ehd-idle\u003c/code\u003e, or \u003ccode\u003esdparm\u003c/code\u003e for automatic spin-down.\u003c/li\u003e\n            \u003c/ul\u003e\n        \u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eSystem State Tracking\u003c/strong\u003e: Captures the initial and final states of drives to verify configuration success.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eRollback on Failure\u003c/strong\u003e: Cleans up by uninstalling packages if configuration fails.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eVerification Tests\u003c/strong\u003e: Ensures configurations are applied and provides a detailed summary.\u003c/li\u003e\n    \u003c/ul\u003e\n\n    \u003ch2\u003e⚙️ Prerequisites\u003c/h2\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003cstrong\u003eRoot Access\u003c/strong\u003e: Run the script with root privileges.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eInternet Connection\u003c/strong\u003e: Required to install missing packages.\u003c/li\u003e\n    \u003c/ul\u003e\n\n    \u003ch2\u003e🚀 Usage\u003c/h2\u003e\n    \u003col\u003e\n        \u003cli\u003e\u003cstrong\u003eDownload the Script\u003c/strong\u003e: Save the script to your desired location.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eMake the Script Executable\u003c/strong\u003e:\n            \u003cpre\u003e\u003ccode\u003echmod +x drive_manager.sh\u003c/code\u003e\u003c/pre\u003e\n        \u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eRun the Script with Root Privileges\u003c/strong\u003e:\n            \u003cpre\u003e\u003ccode\u003esudo ./drive_manager.sh\u003c/code\u003e\u003c/pre\u003e\n        \u003c/li\u003e\n    \u003c/ol\u003e\n\n    \u003ch2\u003e🛠️ Configuration Steps\u003c/h2\u003e\n    \u003col\u003e\n        \u003cli\u003e\u003cstrong\u003eUpdate Repositories\u003c/strong\u003e: Ensures the latest package versions.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eDrive Detection and Selection\u003c/strong\u003e: Detects drives and prompts the user for selection.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eInstall and Configure \u003ccode\u003ehdparm\u003c/code\u003e\u003c/strong\u003e:\n            \u003cul\u003e\n                \u003cli\u003eInstalls and configures \u003ccode\u003ehdparm\u003c/code\u003e for standby, spindown, and cache settings. Fallback to \u003ccode\u003ehd-idle\u003c/code\u003e if incompatible.\u003c/li\u003e\n            \u003c/ul\u003e\n        \u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eInstall and Configure \u003ccode\u003ehd-idle\u003c/code\u003e\u003c/strong\u003e: Removes \u003ccode\u003ehdparm\u003c/code\u003e if installed by the script, then configures \u003ccode\u003ehd-idle\u003c/code\u003e.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eInstall and Configure \u003ccode\u003esdparm\u003c/code\u003e\u003c/strong\u003e: Uses \u003ccode\u003esdparm\u003c/code\u003e as a last resort for spin-down configuration.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eVerification and Summary\u003c/strong\u003e: Verifies configurations and provides a summary with pre- and post-execution states.\u003c/li\u003e\n    \u003c/ol\u003e\n\n    \u003ch2\u003e🔧 Customization\u003c/h2\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003cstrong\u003eSpin-down Time\u003c/strong\u003e: Customize spin-down times in the script functions.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eDrive Selection\u003c/strong\u003e: Modify drive detection if using non-standard paths.\u003c/li\u003e\n    \u003c/ul\u003e\n\n    \u003ch2\u003e📜 License\u003c/h2\u003e\n    \u003cp\u003eThis script is free for personal and commercial use, modification, and redistribution.\u003c/p\u003e\n\n    \u003ch2\u003e❤️ Support\u003c/h2\u003e\n    \u003cp\u003eIf you found this project helpful, consider donating via PayPal: \u003ca href=\"mailto:gopalasubramanium@gmail.com\"\u003egopalasubramanium@gmail.com\u003c/a\u003e. Thank you for your support!\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgopalasubramanium%2Fhdd-power-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgopalasubramanium%2Fhdd-power-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgopalasubramanium%2Fhdd-power-manager/lists"}