{"id":19144039,"url":"https://github.com/sourlemonjuice/raid_array_simple_manager","last_synced_at":"2025-09-07T14:09:30.686Z","repository":{"id":213172856,"uuid":"733217338","full_name":"SourLemonJuice/raid_array_simple_manager","owner":"SourLemonJuice","description":"为我的raid阵列干些常用又要动好多下手指的活","archived":false,"fork":false,"pushed_at":"2024-01-30T07:45:26.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T19:31:16.628Z","etag":null,"topics":["bash","manager","raid","script","simplified-chinese"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SourLemonJuice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-12-18T20:36:54.000Z","updated_at":"2023-12-18T23:29:32.000Z","dependencies_parsed_at":"2024-11-09T07:34:45.316Z","dependency_job_id":"ec216ba7-8995-4e0d-a554-1179c2ec2b1b","html_url":"https://github.com/SourLemonJuice/raid_array_simple_manager","commit_stats":null,"previous_names":["sourlemonjuice/raid_array_simple_manager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SourLemonJuice/raid_array_simple_manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SourLemonJuice%2Fraid_array_simple_manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SourLemonJuice%2Fraid_array_simple_manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SourLemonJuice%2Fraid_array_simple_manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SourLemonJuice%2Fraid_array_simple_manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SourLemonJuice","download_url":"https://codeload.github.com/SourLemonJuice/raid_array_simple_manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SourLemonJuice%2Fraid_array_simple_manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274046000,"owners_count":25212982,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","manager","raid","script","simplified-chinese"],"created_at":"2024-11-09T07:33:23.284Z","updated_at":"2025-09-07T14:09:30.660Z","avatar_url":"https://github.com/SourLemonJuice.png","language":"Shell","readme":"# raid_array_simple_manager\n\n这是一个用`mdadm`来简单控制raid阵列的bash脚本\\\n这只是一些简单操作的合集，但这些操作在真正用的时候总是记不住所以拿来写一个脚本加强记忆和方便操作\n\n\u003e 数据无价，阵列再怎么校验也挡不住用户瞎搞\n\n## 配置\n\n在使用前需要配置一些信息\n\n```shell\n#!/bin/bash\n\n# 配置\nRaid_Name='/dev/md/test'\nRaid_Devices=('/dev/sda' '/dev/sdb')\n```\n\n- `Raid_Name`: 阵列路径\\\n  可以填写阵列设备号(/dev/md0)，或者带阵列名的连接(/dev/md/test)\n- `Raid_Devices`: 阵列所用的设备路径\\\n  需要设备路径用来在停止阵列时待机磁盘\n\n## 使用\n\n```shell\n[lemon@linux ~]: ./main.sh help\nhelp | info | status | mount | stop | check\n```\n\n### 1.info\n\n打印配置的阵列详细信息\n\n```shell\nmdadm -D $Raid_Name\n```\n\n### 2.status\n\n用来打印所有阵列设备的状态\n\n```shell\ncat /proc/mdstat\n```\n\n### 3.mount\n\n组装和挂载阵列\n\n```shell\nmdadm --assemble $Raid_Name\nmount $Raid_Name\n```\n\n### 4.stop\n\n停止阵列，**并且使用`hdparm`待机硬盘**\\\n执行后会提示:\n\n```shell\n这项操作可能非常危险，要确定吗[y/n]\n```\n\n### 5.check\n\n执行阵列检查，用来找出错误的块\\\n检查后坏块的数量: `/sys/blo.../md/mismatch_cnt`\n\n[ArchWiki[en] RAID#Scrubbing](https://wiki.archlinux.org/title/RAID#Scrubbing)\n\n```shell\nRaid_BlockNum=$(basename $Raid_Name)\necho check \u003e/sys/block/${Raid_BlockNum}/md/sync_action\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourlemonjuice%2Fraid_array_simple_manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourlemonjuice%2Fraid_array_simple_manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourlemonjuice%2Fraid_array_simple_manager/lists"}