Comments (3)
[growlight](0)> blockdev
Device Model Rev Bytes PSect Flags Table WWN PHY
sdh ST12000NM0007-2A SN02 12.00T 4096B ✔OW⚠. gpt 5000c500b1c2c393 SAT3
sdg ST12000NM0007-2A SN02 12.00T 4096B ✔OW⚠. gpt 5000c500b56a29d4 SAT3
sdi ST12000NM0007-2A SN02 12.00T 4096B ✔OW⚠. gpt 5000c500b56936d2 SAT3
sdf ST12000NM0007-2A SN02 12.00T 4096B ✔OW⚠. gpt 5000c500b5685ea4 SAT3
sdb ST12000NM0007-2A SN02 12.00T 4096B ✔OW⚠. gpt 5000c500b3f4afb4 SAT3
sdd ST12000NM0007-2A SN02 12.00T 4096B ✔OW⚠. gpt 5000c500b49867e5 SAT3
sde ST12000NM0007-2A SN03 12.00T 4096B ✔OW⚠. gpt 5000c500a5c0e61d SAT3
sda ST12000NM0007-2A SN02 12.00T 4096B ✔OW⚠. gpt 5000c500b4104bf5 SAT3
sdc ST12000NM0007-2A SN02 12.00T 4096B ✔OW⚠. gpt 5000c500b4984eca SAT3
sr0 iHBS112 2 CL0F 1.07G 512B UO... none n/a PATA
nvme0n1 WDS100T3X0C-00SJ n/a 1.00T 512B ✔.... gpt 1908E1805012 NVMe
nvme1n1 WDS100T3X0C-00SJ n/a 1.00T 512B ✔.... gpt 1908E1801188 NVMe
md127 Linux mdadm 1.2 106.23G 512B VM... none root NVMe
loop5 n/a n/a 0.00 512B VO... none n/a n/a
loop3 n/a n/a 0.00 512B VO... none n/a n/a
loop0 n/a n/a 0.00 512B VO... none n/a n/a
pktcdvd0 n/a n/a 0.00 2048B RO... none n/a n/a
loop2 n/a n/a 0.00 512B VO... none n/a n/a
loop7 n/a n/a 0.00 512B VO... none n/a n/a
loop4 n/a n/a 0.00 512B VO... none n/a n/a
loop6 n/a n/a 0.00 512B VO... none n/a n/a
loop1 n/a n/a 0.00 512B VO... none n/a n/a
sdl MS/MS-PRO 1.03 0.00 512B UO... none n/a PATA
sdj Compact Flash 1.01 0.00 512B UO... none n/a PATA
sdk SD/MMC 1.00 0.00 512B UO... none n/a PATA
sdm xD-Picture 1.02 0.00 512B UO... none n/a PATA
Flags: (R)emovable, (U)nloaded, (V)irtual, (M)dadm, (Z)pool,
(D)M, r(O)tational, (r)ead-only, (W)ritecache enabled,
(B)IOS bootable, v/⚠: Read-Write-Verify, ✓/✗/☠: SMART status
[growlight](0)>
sr0 doesn't show up as removable, but pktcdvd0 helpfully does...
from growlight.
I think the way to do this is check /sys/block/DEV/device/type:
#define TYPE_DISK 0x00
#define TYPE_TAPE 0x01
#define TYPE_PRINTER 0x02
#define TYPE_PROCESSOR 0x03 /* HP scanners use this */
#define TYPE_WORM 0x04 /* Treated as ROM by our system */
#define TYPE_ROM 0x05
#define TYPE_SCANNER 0x06
#define TYPE_MOD 0x07 /* Magneto-optical disk -
* - treated as TYPE_DISK */
#define TYPE_MEDIUM_CHANGER 0x08
#define TYPE_COMM 0x09 /* Communications device */
#define TYPE_RAID 0x0c
#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
#define TYPE_RBC 0x0e
#define TYPE_NO_LUN 0x7f
This is 0 for every device I have save my cdrom, which is 0x05.
from growlight.
We now properly show "optical" for my BD-RW.
from growlight.
Related Issues (20)
- growlight 1.2.28 blows up in debian autopkgtests HOT 2
- growlight-readline crashes when stdout is redirected HOT 1
- GPT test fails to compile on openSUSE Tumbleweed HOT 7
- 1.2.34 Build failure on voidlinux. HOT 8
- freshen up udeb, reintegrate with modern debian-installer
- Submit a Linux brew HOT 3
- zfs virtual devices don't show stats
- discoverable GPT partitions
- need get rid of NCSTYLE_REVERSE for notcurses 2.4.0 HOT 1
- growlight-readline eating input HOT 4
- support network block device configuration
- segfault in debian autopkgtests arising from redirected output HOT 5
- misleading diagnostic printed on failure HOT 2
- debian autopkgtests fail with timeout HOT 6
- exit on ctrl-D
- growlight segfaults on startup with notcurses 3.0.4 HOT 3
- can't wipe a filesystem listed as part of a linux raid
- batch execution
- entering partition name seems cross-keyed with ALT(?)
- mkfs.ufs support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from growlight.