-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new post: Add solution to prevent disk spin-up on SSH connect
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
posts/effectively-prevent-disks-from-spinning-up-on-ssh-connect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
layout: doc | ||
date: 2024-07-26 | ||
title: Effectively prevent disks from spinning up on SSH connect | ||
description: If you*re fed up with your NAS' disks spinning up every time you connect to it via SSH, here's a solution for you. | ||
tags: | ||
- linux | ||
- ubuntu | ||
- nas | ||
- hdd | ||
- ssh | ||
--- | ||
|
||
<Title/> | ||
Again, a note to my future self and anyone else who might find this useful. | ||
I was annoyed by the fact that my NAS' disks would spin up every time I connected to the machine via SSH. | ||
More than the noise and wear I hate to wait for the disks to spin up before I can do anything. | ||
I investigated a bit and found a solution that works for me on Ubuntu 22.04 LTS: | ||
Disabling the `Disk` plugin of `landscape-sysinfo` which is responsible for the disk spin-up. `landscape-sysinfo` is a package that provides the system information that is displayed when you log in via SSH. | ||
If you disable the `Disk` plugin, you'll lose the `Usage of /` info item and the warning if some disk is almost full. But if you're like me and don't care about that, you can disable it. | ||
Here's how you do it: | ||
First, run `sudo nano /etc/update-motd.d/50-landscape-sysinfo`<C />, then replace the line | ||
```shell | ||
"$(/usr/bin/landscape-sysinfo)") | ||
``` | ||
with this one | ||
```shell | ||
"$(/usr/bin/landscape-sysinfo --exclude-sysinfo-plugins=Disk)") | ||
``` | ||
No need to restart anything, the changes should take effect immediately for new SSH connections. The connection will now be faster and quieter because the disks won't spin up! | ||
<Comment/> |