Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Determine block device from md device

Featured Replies

Sorry if this is obvious but I cant quite nail it down.

 

I have a need for a thing I am doing to find the device name and disk serial starting knowing either "/mnt/disk4" or "/dev/md4" from the shell

 

Does anyone know how to get for example "/dev/sdb1"  from this?

 

 

You can try it with : lsblk

 

  • Author

I have tried I think all the obvious ways although I still think i missed the one obvious one that works

 

lsblk /dev/md4
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
md4    9:4    0  3.7T  0 md   /mnt/disk4

 

grep -A1 '"disk4"' /var/local/emhttp/disks.ini

or if you want only the device designation

grep -A1 '"disk4"' /var/local/emhttp/disks.ini | grep -Po 'device="\K[^"]+'

 

Edited by bonienl

  • Author

That is excellent thank you very much. I would not have thought to do it like this at all.

  • Author

hehe

Out of curiusoty i never did find a way to do this by query /proc. Any idea if this data is in there somewhere?

  • Author

@limetech can you confirm if this is indeed in `proc` just so I can close this thread down as solved and anyone else that happens upon it knows the definitive answer.

  • Author

yeah i dont think it is there either but i suspect this thread will hang about for years and hit first page on google since its so niche.

 

(anyone else find themselves answering their own question via google in old forum posts... i do more than I care to admit)

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.