banner
herman

herman

哈哈哈哈哈哈哈哈哈哈哈哈哈哈

QNAP Hard Drive Sleep Command

Due to changes in the system mechanism of Synology and QNAP, the command for hard disk hibernation has become ineffective. However, there is still a solution for QNAP.

image

  1. SSH into your QNAP, use "sudo -i" to obtain administrator privileges, and use the following command to find the hard disk you want to hibernate:

qcli_storage -d

These two commands are used to check if the hard disk you want to hibernate is in the system partition under synchronized RAID (including the built-in hard disks and M.2 disks before removal).

For example, if you find that the first hard disk you want to hibernate is "sda".

NVMe disks are not named using "sdx" naming convention.

mdadm /dev/md9 --fail /dev/sda1

mdadm /dev/md13 --fail /dev/sda4

mdadm /dev/md9 --fail /dev/nvme1n1

mdadm /dev/md13 --fail /dev/nvme1n1

Then, using these two commands, remove the RAID and set the hard disk hibernation time in the QNAP system. During this period, the hard disk will not be accessed or work, and it will enter hibernation.

  1. Alternatively, if you have multiple hard disks, you can simply remove the RAID all at once. The command is as follows (this is for solving the hibernation of 10 hard disks at once). Remember to obtain administrator privileges.

mdadm /dev/md9 --fail /dev/sda1

mdadm /dev/md9 --fail /dev/sdb1

mdadm /dev/md9 --fail /dev/sdc1

mdadm /dev/md9 --fail /dev/sdd1

mdadm /dev/md9 --fail /dev/sde1

mdadm /dev/md9 --fail /dev/sdf1

mdadm /dev/md9 --fail /dev/sdg1

mdadm /dev/md9 --fail /dev/sdh1

mdadm /dev/md13 --fail /dev/sda4

mdadm /dev/md13 --fail /dev/sdb4

mdadm /dev/md13 --fail /dev/sdc4

mdadm /dev/md13 --fail /dev/sdd4

mdadm /dev/md13 --fail /dev/sde4

mdadm /dev/md13 --fail /dev/sdf4

mdadm /dev/md13 --fail /dev/sdg4

mdadm /dev/md13 --fail /dev/sdh4

  1. Note that the commands will become ineffective after restarting the QNAP. After restarting, you can execute the commands again. It is convenient to use FinalShell, you can add the commands by right-clicking and selecting "Add Command" below, save the hibernation command, and execute it by clicking on it after each restart (remember to obtain administrator privileges).

image

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.