Commit 1ed1c81a authored by Vitaly Lipatov's avatar Vitaly Lipatov

hdd: commit all files

parent c28d9429
# mdadm --assemble [--force] /dev/md5 /dev/sdd1 /dev/sdc2
#mdadm: No md superblock detected on /dev/sdb5. BIOS boot
# free??
#mdadm: No md superblock detected on /dev/sdc2. ?
#mdadm: No md superblock detected on /dev/sde1. BIOS boot
#!/bin/sh
# arg: /dev/sd?
is_hdd()
{
local rot
local dev="$(echo "$1" | cut -c1-8)"
[ -b "$dev" ] || fatal
#hdparm -i "$1" | grep -q "Model=WDC"
local drive="$(basename $dev)"
# since 2.6.29
rot="$(cat /sys/block/$drive/queue/rotational)"
[ "$rot" = "1" ]
}
# https://unix.stackexchange.com/questions/65595/how-to-know-if-a-disk-is-an-ssd-or-an-hdd
# lsblk -d -o name,rota
# NAME ROTA
# sda 1
# sdb 1
# sdc 0
# sdd 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment