{"id":17998924,"url":"https://github.com/spiritlhls/addswap","last_synced_at":"2025-03-26T06:31:27.759Z","repository":{"id":104424875,"uuid":"524656060","full_name":"spiritLHLS/addswap","owner":"spiritLHLS","description":"为kvm、openvz虚拟化的linux服务器增加swap分区，请确保在root权限下使用(Add swap partition for Linux server with kvm or openvz, please make sure to use it with root privileges)","archived":false,"fork":false,"pushed_at":"2025-01-22T11:07:35.000Z","size":61,"stargazers_count":19,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T08:48:38.429Z","etag":null,"topics":["bash","kvm","linux","lxc","openvz","shell","swap","vps"],"latest_commit_sha":null,"homepage":"https://t.me/vps_reviews","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/spiritLHLS.png","metadata":{"files":{"readme":"README.md","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":"2022-08-14T11:49:25.000Z","updated_at":"2025-01-22T11:07:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"7bc60263-c3f4-4a21-9b63-4362639bb649","html_url":"https://github.com/spiritLHLS/addswap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2Faddswap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2Faddswap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2Faddswap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2Faddswap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spiritLHLS","download_url":"https://codeload.github.com/spiritLHLS/addswap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245603733,"owners_count":20642871,"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":["bash","kvm","linux","lxc","openvz","shell","swap","vps"],"created_at":"2024-10-29T22:09:14.787Z","updated_at":"2025-03-26T06:31:27.739Z","avatar_url":"https://github.com/spiritLHLS.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# addswap\n\n更新时间：2024.11.03\n\n为openvz、kvm虚拟化的linux服务器增加swap分区(虚拟内存)\n\n```bash\ncurl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh \u0026\u0026 chmod +x addswap.sh \u0026\u0026 bash addswap.sh\n```\n\n已增加openvz架构重启swap自动添加的\n\nopenvz这个添加=掩耳盗铃，实际受到虚拟化限制应该是无法添加的，只能由虚拟化的宿主机控制，同理LXC虚拟化的也只能由宿主机控制，都无法自主添加虚拟内存SWAP\n\n因此，该项目不再更新，除非另有需求\n\n### 单位换算：输入 1024 产生 1G SWAP内存\n\n# 致谢\n\nkvm分区原版脚本源自 https://www.moerats.com/\n\n```bash\ncurl -L https://www.moerats.com/usr/shell/swap.sh -o swap.sh \u0026\u0026 chmod +x swap.sh \u0026\u0026 bash swap.sh\n```\n\nopenVZ分区原版脚本源自 \n\nhttp://linux-problem-solver.blogspot.com/2013/08/create-fake-swap-in-openvz-vps-if-you-get-swapon-failed-operation-not-permitted-error.html\n\n感谢 [@fscarmen](https://github.com/fscarmen) 提供优化建议\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiritlhls%2Faddswap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspiritlhls%2Faddswap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiritlhls%2Faddswap/lists"}