Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
1ed1c81a
Commit
1ed1c81a
authored
Jun 11, 2018
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hdd: commit all files
parent
c28d9429
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
assemble.sh
hdd/assemble.sh
+6
-0
functions.sh
hdd/functions.sh
+23
-0
No files found.
hdd/assemble.sh
0 → 100755
View file @
1ed1c81a
# 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
hdd/functions.sh
0 → 100755
View file @
1ed1c81a
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment