Mystery device sdg is logging errors. How do I find out what this is?












1















I have an interesting problem on my home file/media server that I can't track down(debian 8.11). I am constantly seeing the following message in dmesg for the last few days:



Buffer I/O error on device sdg, logical block 5


Sometime I'll get a bit more in the logs



[331645.357795] Buffer I/O error on device sdg, logical block 7
[331826.255867] sd 14:0:0:0: [sdg] Command timed out
[331826.255875] sd 14:0:0:0: [sdg]
[331826.255879] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[331826.255883] sd 14:0:0:0: [sdg]
[331826.255886] Sense Key : Not Ready [current]
[331826.255892] sd 14:0:0:0: [sdg]
[331826.255896] Add. Sense: Logical unit is in process of becoming
ready
[331826.255899] sd 14:0:0:0: [sdg] CDB:
[331826.255902] Read(10): 28 00 00 00 00 00 00 00 01 00
[331826.255915] end_request: I/O error, dev sdg, sector 0
[331826.257606] Buffer I/O error on device sdg, logical block 0
[331833.213945] sd 14:0:0:0: timing out command, waited 180s
[331833.215687] sd 14:0:0:0: [sdg] Command timed out
[331833.215692] sd 14:0:0:0: [sdg]
[331833.215695] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[331833.215699] sd 14:0:0:0: [sdg]
[331833.215701] Sense Key : Not Ready [current]
[331833.215717] sd 14:0:0:0: [sdg]
[331833.215731] Add. Sense: Logical unit is in process of becoming
ready
[331833.215735] sd 14:0:0:0: [sdg] CDB:
[331833.215737] Read(10): 28 00 00 00 00 01 00 00 07 00


The problem is, I can't find a figure out what device sdg is?!?!



I am assuming it's block device of some sort, however there are only 6 physical drives in my server(sda, sdb, sdc, sdd, sde, sdf)




  • sda = OS installation drive. Physical disk.

  • sdb & sdc - MDADM RAID 0 as /dev/md1. Physical disks.

  • sdd & sde - MDADM RAID 0 as /dev/md0. Physical disks.

  • sdf - External USB drive used for nightly backups.


I've tried running fdisk -l /dev/sdg and the command just hangs.



ls -all /dev/disk/by-id/ | grep sdg returns 0 results.



I plugged in a USB thumb drive and it mounted as /dev/sdh, so it skipped /dev/sdg for some reason.



smartctl -a /dev/sdg returns the following:



smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local 
build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke,
www.smartmontools.org

Read Device Identity failed: scsi error device will be ready soon

A mandatory SMART command failed: exiting. To continue, add one or
more '-T permissive' options.


cat /proc/diskstats returns:



   8      96 sdg 596 867 1458 163968604 0 0 0 0 1 68509944 164194776


There is nothing in /etc/fstab referencing /dev/sdg.



Other than running samba/ssh for sharing files on my home network, the only other application installed is Plex media server, however I wouldn't think any of those applications would be creating block devices on my system.



It's a bit of a relief to know that it's not any of my disks holding my data that are throwing errors, but now the question is how do I figure out what sdg is and why is it throwing these errors?



Any ideas on how I track this sdg drive down?










share|improve this question























  • There's only 6 physical drives in your computer, and they're all accounted for with sda-sdf... is there another wire connected to some other device? Or some USB? Unplugging USB devices and watching logs & for /dev/sdg to disappear... Or searching earlier logs for when sdg arrived

    – Xen2050
    Dec 28 '18 at 4:09













  • Just double checked, only 2 usb cables plugged into it. 1 goes to the external USB drive(sdf), and the other is the keyboard. I've had that old keyboard for at least a decade too, so I doubt it's anything wonky with that.

    – user3246693
    Dec 28 '18 at 5:24











  • So you unplugged everything USB and sdg was still there? Your other comment mentions a 4GB usb drive, and sdg is 4GB... what happens when you unplug it? I don't usually like to recommend a reboot, but in case sdg is some type of broken orphan...

    – Xen2050
    Dec 29 '18 at 0:46


















1















I have an interesting problem on my home file/media server that I can't track down(debian 8.11). I am constantly seeing the following message in dmesg for the last few days:



Buffer I/O error on device sdg, logical block 5


Sometime I'll get a bit more in the logs



[331645.357795] Buffer I/O error on device sdg, logical block 7
[331826.255867] sd 14:0:0:0: [sdg] Command timed out
[331826.255875] sd 14:0:0:0: [sdg]
[331826.255879] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[331826.255883] sd 14:0:0:0: [sdg]
[331826.255886] Sense Key : Not Ready [current]
[331826.255892] sd 14:0:0:0: [sdg]
[331826.255896] Add. Sense: Logical unit is in process of becoming
ready
[331826.255899] sd 14:0:0:0: [sdg] CDB:
[331826.255902] Read(10): 28 00 00 00 00 00 00 00 01 00
[331826.255915] end_request: I/O error, dev sdg, sector 0
[331826.257606] Buffer I/O error on device sdg, logical block 0
[331833.213945] sd 14:0:0:0: timing out command, waited 180s
[331833.215687] sd 14:0:0:0: [sdg] Command timed out
[331833.215692] sd 14:0:0:0: [sdg]
[331833.215695] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[331833.215699] sd 14:0:0:0: [sdg]
[331833.215701] Sense Key : Not Ready [current]
[331833.215717] sd 14:0:0:0: [sdg]
[331833.215731] Add. Sense: Logical unit is in process of becoming
ready
[331833.215735] sd 14:0:0:0: [sdg] CDB:
[331833.215737] Read(10): 28 00 00 00 00 01 00 00 07 00


The problem is, I can't find a figure out what device sdg is?!?!



I am assuming it's block device of some sort, however there are only 6 physical drives in my server(sda, sdb, sdc, sdd, sde, sdf)




  • sda = OS installation drive. Physical disk.

  • sdb & sdc - MDADM RAID 0 as /dev/md1. Physical disks.

  • sdd & sde - MDADM RAID 0 as /dev/md0. Physical disks.

  • sdf - External USB drive used for nightly backups.


I've tried running fdisk -l /dev/sdg and the command just hangs.



ls -all /dev/disk/by-id/ | grep sdg returns 0 results.



I plugged in a USB thumb drive and it mounted as /dev/sdh, so it skipped /dev/sdg for some reason.



smartctl -a /dev/sdg returns the following:



smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local 
build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke,
www.smartmontools.org

Read Device Identity failed: scsi error device will be ready soon

A mandatory SMART command failed: exiting. To continue, add one or
more '-T permissive' options.


cat /proc/diskstats returns:



   8      96 sdg 596 867 1458 163968604 0 0 0 0 1 68509944 164194776


There is nothing in /etc/fstab referencing /dev/sdg.



Other than running samba/ssh for sharing files on my home network, the only other application installed is Plex media server, however I wouldn't think any of those applications would be creating block devices on my system.



It's a bit of a relief to know that it's not any of my disks holding my data that are throwing errors, but now the question is how do I figure out what sdg is and why is it throwing these errors?



Any ideas on how I track this sdg drive down?










share|improve this question























  • There's only 6 physical drives in your computer, and they're all accounted for with sda-sdf... is there another wire connected to some other device? Or some USB? Unplugging USB devices and watching logs & for /dev/sdg to disappear... Or searching earlier logs for when sdg arrived

    – Xen2050
    Dec 28 '18 at 4:09













  • Just double checked, only 2 usb cables plugged into it. 1 goes to the external USB drive(sdf), and the other is the keyboard. I've had that old keyboard for at least a decade too, so I doubt it's anything wonky with that.

    – user3246693
    Dec 28 '18 at 5:24











  • So you unplugged everything USB and sdg was still there? Your other comment mentions a 4GB usb drive, and sdg is 4GB... what happens when you unplug it? I don't usually like to recommend a reboot, but in case sdg is some type of broken orphan...

    – Xen2050
    Dec 29 '18 at 0:46
















1












1








1








I have an interesting problem on my home file/media server that I can't track down(debian 8.11). I am constantly seeing the following message in dmesg for the last few days:



Buffer I/O error on device sdg, logical block 5


Sometime I'll get a bit more in the logs



[331645.357795] Buffer I/O error on device sdg, logical block 7
[331826.255867] sd 14:0:0:0: [sdg] Command timed out
[331826.255875] sd 14:0:0:0: [sdg]
[331826.255879] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[331826.255883] sd 14:0:0:0: [sdg]
[331826.255886] Sense Key : Not Ready [current]
[331826.255892] sd 14:0:0:0: [sdg]
[331826.255896] Add. Sense: Logical unit is in process of becoming
ready
[331826.255899] sd 14:0:0:0: [sdg] CDB:
[331826.255902] Read(10): 28 00 00 00 00 00 00 00 01 00
[331826.255915] end_request: I/O error, dev sdg, sector 0
[331826.257606] Buffer I/O error on device sdg, logical block 0
[331833.213945] sd 14:0:0:0: timing out command, waited 180s
[331833.215687] sd 14:0:0:0: [sdg] Command timed out
[331833.215692] sd 14:0:0:0: [sdg]
[331833.215695] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[331833.215699] sd 14:0:0:0: [sdg]
[331833.215701] Sense Key : Not Ready [current]
[331833.215717] sd 14:0:0:0: [sdg]
[331833.215731] Add. Sense: Logical unit is in process of becoming
ready
[331833.215735] sd 14:0:0:0: [sdg] CDB:
[331833.215737] Read(10): 28 00 00 00 00 01 00 00 07 00


The problem is, I can't find a figure out what device sdg is?!?!



I am assuming it's block device of some sort, however there are only 6 physical drives in my server(sda, sdb, sdc, sdd, sde, sdf)




  • sda = OS installation drive. Physical disk.

  • sdb & sdc - MDADM RAID 0 as /dev/md1. Physical disks.

  • sdd & sde - MDADM RAID 0 as /dev/md0. Physical disks.

  • sdf - External USB drive used for nightly backups.


I've tried running fdisk -l /dev/sdg and the command just hangs.



ls -all /dev/disk/by-id/ | grep sdg returns 0 results.



I plugged in a USB thumb drive and it mounted as /dev/sdh, so it skipped /dev/sdg for some reason.



smartctl -a /dev/sdg returns the following:



smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local 
build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke,
www.smartmontools.org

Read Device Identity failed: scsi error device will be ready soon

A mandatory SMART command failed: exiting. To continue, add one or
more '-T permissive' options.


cat /proc/diskstats returns:



   8      96 sdg 596 867 1458 163968604 0 0 0 0 1 68509944 164194776


There is nothing in /etc/fstab referencing /dev/sdg.



Other than running samba/ssh for sharing files on my home network, the only other application installed is Plex media server, however I wouldn't think any of those applications would be creating block devices on my system.



It's a bit of a relief to know that it's not any of my disks holding my data that are throwing errors, but now the question is how do I figure out what sdg is and why is it throwing these errors?



Any ideas on how I track this sdg drive down?










share|improve this question














I have an interesting problem on my home file/media server that I can't track down(debian 8.11). I am constantly seeing the following message in dmesg for the last few days:



Buffer I/O error on device sdg, logical block 5


Sometime I'll get a bit more in the logs



[331645.357795] Buffer I/O error on device sdg, logical block 7
[331826.255867] sd 14:0:0:0: [sdg] Command timed out
[331826.255875] sd 14:0:0:0: [sdg]
[331826.255879] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[331826.255883] sd 14:0:0:0: [sdg]
[331826.255886] Sense Key : Not Ready [current]
[331826.255892] sd 14:0:0:0: [sdg]
[331826.255896] Add. Sense: Logical unit is in process of becoming
ready
[331826.255899] sd 14:0:0:0: [sdg] CDB:
[331826.255902] Read(10): 28 00 00 00 00 00 00 00 01 00
[331826.255915] end_request: I/O error, dev sdg, sector 0
[331826.257606] Buffer I/O error on device sdg, logical block 0
[331833.213945] sd 14:0:0:0: timing out command, waited 180s
[331833.215687] sd 14:0:0:0: [sdg] Command timed out
[331833.215692] sd 14:0:0:0: [sdg]
[331833.215695] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[331833.215699] sd 14:0:0:0: [sdg]
[331833.215701] Sense Key : Not Ready [current]
[331833.215717] sd 14:0:0:0: [sdg]
[331833.215731] Add. Sense: Logical unit is in process of becoming
ready
[331833.215735] sd 14:0:0:0: [sdg] CDB:
[331833.215737] Read(10): 28 00 00 00 00 01 00 00 07 00


The problem is, I can't find a figure out what device sdg is?!?!



I am assuming it's block device of some sort, however there are only 6 physical drives in my server(sda, sdb, sdc, sdd, sde, sdf)




  • sda = OS installation drive. Physical disk.

  • sdb & sdc - MDADM RAID 0 as /dev/md1. Physical disks.

  • sdd & sde - MDADM RAID 0 as /dev/md0. Physical disks.

  • sdf - External USB drive used for nightly backups.


I've tried running fdisk -l /dev/sdg and the command just hangs.



ls -all /dev/disk/by-id/ | grep sdg returns 0 results.



I plugged in a USB thumb drive and it mounted as /dev/sdh, so it skipped /dev/sdg for some reason.



smartctl -a /dev/sdg returns the following:



smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local 
build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke,
www.smartmontools.org

Read Device Identity failed: scsi error device will be ready soon

A mandatory SMART command failed: exiting. To continue, add one or
more '-T permissive' options.


cat /proc/diskstats returns:



   8      96 sdg 596 867 1458 163968604 0 0 0 0 1 68509944 164194776


There is nothing in /etc/fstab referencing /dev/sdg.



Other than running samba/ssh for sharing files on my home network, the only other application installed is Plex media server, however I wouldn't think any of those applications would be creating block devices on my system.



It's a bit of a relief to know that it's not any of my disks holding my data that are throwing errors, but now the question is how do I figure out what sdg is and why is it throwing these errors?



Any ideas on how I track this sdg drive down?







linux hard-drive debian






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 27 '18 at 5:15









user3246693user3246693

61




61













  • There's only 6 physical drives in your computer, and they're all accounted for with sda-sdf... is there another wire connected to some other device? Or some USB? Unplugging USB devices and watching logs & for /dev/sdg to disappear... Or searching earlier logs for when sdg arrived

    – Xen2050
    Dec 28 '18 at 4:09













  • Just double checked, only 2 usb cables plugged into it. 1 goes to the external USB drive(sdf), and the other is the keyboard. I've had that old keyboard for at least a decade too, so I doubt it's anything wonky with that.

    – user3246693
    Dec 28 '18 at 5:24











  • So you unplugged everything USB and sdg was still there? Your other comment mentions a 4GB usb drive, and sdg is 4GB... what happens when you unplug it? I don't usually like to recommend a reboot, but in case sdg is some type of broken orphan...

    – Xen2050
    Dec 29 '18 at 0:46





















  • There's only 6 physical drives in your computer, and they're all accounted for with sda-sdf... is there another wire connected to some other device? Or some USB? Unplugging USB devices and watching logs & for /dev/sdg to disappear... Or searching earlier logs for when sdg arrived

    – Xen2050
    Dec 28 '18 at 4:09













  • Just double checked, only 2 usb cables plugged into it. 1 goes to the external USB drive(sdf), and the other is the keyboard. I've had that old keyboard for at least a decade too, so I doubt it's anything wonky with that.

    – user3246693
    Dec 28 '18 at 5:24











  • So you unplugged everything USB and sdg was still there? Your other comment mentions a 4GB usb drive, and sdg is 4GB... what happens when you unplug it? I don't usually like to recommend a reboot, but in case sdg is some type of broken orphan...

    – Xen2050
    Dec 29 '18 at 0:46



















There's only 6 physical drives in your computer, and they're all accounted for with sda-sdf... is there another wire connected to some other device? Or some USB? Unplugging USB devices and watching logs & for /dev/sdg to disappear... Or searching earlier logs for when sdg arrived

– Xen2050
Dec 28 '18 at 4:09







There's only 6 physical drives in your computer, and they're all accounted for with sda-sdf... is there another wire connected to some other device? Or some USB? Unplugging USB devices and watching logs & for /dev/sdg to disappear... Or searching earlier logs for when sdg arrived

– Xen2050
Dec 28 '18 at 4:09















Just double checked, only 2 usb cables plugged into it. 1 goes to the external USB drive(sdf), and the other is the keyboard. I've had that old keyboard for at least a decade too, so I doubt it's anything wonky with that.

– user3246693
Dec 28 '18 at 5:24





Just double checked, only 2 usb cables plugged into it. 1 goes to the external USB drive(sdf), and the other is the keyboard. I've had that old keyboard for at least a decade too, so I doubt it's anything wonky with that.

– user3246693
Dec 28 '18 at 5:24













So you unplugged everything USB and sdg was still there? Your other comment mentions a 4GB usb drive, and sdg is 4GB... what happens when you unplug it? I don't usually like to recommend a reboot, but in case sdg is some type of broken orphan...

– Xen2050
Dec 29 '18 at 0:46







So you unplugged everything USB and sdg was still there? Your other comment mentions a 4GB usb drive, and sdg is 4GB... what happens when you unplug it? I don't usually like to recommend a reboot, but in case sdg is some type of broken orphan...

– Xen2050
Dec 29 '18 at 0:46












1 Answer
1






active

oldest

votes


















1














In theory lsblk -O /dev/sdg should tell you a lot. There are two problems though:




  1. Faulty device may report little anyway.


  2. Usually the output of lsblk -O is cryptic because long lines get wrapped in the terminal, the entire output becomes unreadable. To overcome this:





    • use a pager with handy horizontal scrolling, e.g.:



      lsblk -O /dev/sdg | less -S -# 8


    • or redirect to a file (lsblk -O /dev/sdg >/tmp/lsblk_sdg) and examine the file in any editor that can show non-wrapped lines and scrolls properly;


    • or view few columns at a time, like lsblk -o VENDOR,MODEL,SERIAL (run lsblk --help to know all available columns).




Alternatively cd to /sys/class/block/sdg/device and see what you can find (e.g. cat model). Again, if the device is faulty, you may not be able to retrieve much information.



Additionally find entries in dmesg (or in logs) from when the device was first discovered after reboot. They may or may not tell you something.






share|improve this answer
























  • This is interesting. lsblk returned the following line "sdg 8:96 0 3.9G 0 disk "

    – user3246693
    Dec 28 '18 at 5:24













  • so it's a 3.9 gig disk. I just went through every usb port and am not seeing anything plugged in that shouldn't be there. the 2 data partitions are encrypted(LUKS) and I use luks passdev script to unlock them on boot using a key stored on a USB thumb drive, which coincidentally happens to be 4GB. I've been running this setup for years, is it possible the USB thumb drive didn't properly unmount after decrypting the drives and is now hanging out as a broken /dev/sdg block device?

    – user3246693
    Dec 28 '18 at 5:29











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1388016%2fmystery-device-sdg-is-logging-errors-how-do-i-find-out-what-this-is%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














In theory lsblk -O /dev/sdg should tell you a lot. There are two problems though:




  1. Faulty device may report little anyway.


  2. Usually the output of lsblk -O is cryptic because long lines get wrapped in the terminal, the entire output becomes unreadable. To overcome this:





    • use a pager with handy horizontal scrolling, e.g.:



      lsblk -O /dev/sdg | less -S -# 8


    • or redirect to a file (lsblk -O /dev/sdg >/tmp/lsblk_sdg) and examine the file in any editor that can show non-wrapped lines and scrolls properly;


    • or view few columns at a time, like lsblk -o VENDOR,MODEL,SERIAL (run lsblk --help to know all available columns).




Alternatively cd to /sys/class/block/sdg/device and see what you can find (e.g. cat model). Again, if the device is faulty, you may not be able to retrieve much information.



Additionally find entries in dmesg (or in logs) from when the device was first discovered after reboot. They may or may not tell you something.






share|improve this answer
























  • This is interesting. lsblk returned the following line "sdg 8:96 0 3.9G 0 disk "

    – user3246693
    Dec 28 '18 at 5:24













  • so it's a 3.9 gig disk. I just went through every usb port and am not seeing anything plugged in that shouldn't be there. the 2 data partitions are encrypted(LUKS) and I use luks passdev script to unlock them on boot using a key stored on a USB thumb drive, which coincidentally happens to be 4GB. I've been running this setup for years, is it possible the USB thumb drive didn't properly unmount after decrypting the drives and is now hanging out as a broken /dev/sdg block device?

    – user3246693
    Dec 28 '18 at 5:29
















1














In theory lsblk -O /dev/sdg should tell you a lot. There are two problems though:




  1. Faulty device may report little anyway.


  2. Usually the output of lsblk -O is cryptic because long lines get wrapped in the terminal, the entire output becomes unreadable. To overcome this:





    • use a pager with handy horizontal scrolling, e.g.:



      lsblk -O /dev/sdg | less -S -# 8


    • or redirect to a file (lsblk -O /dev/sdg >/tmp/lsblk_sdg) and examine the file in any editor that can show non-wrapped lines and scrolls properly;


    • or view few columns at a time, like lsblk -o VENDOR,MODEL,SERIAL (run lsblk --help to know all available columns).




Alternatively cd to /sys/class/block/sdg/device and see what you can find (e.g. cat model). Again, if the device is faulty, you may not be able to retrieve much information.



Additionally find entries in dmesg (or in logs) from when the device was first discovered after reboot. They may or may not tell you something.






share|improve this answer
























  • This is interesting. lsblk returned the following line "sdg 8:96 0 3.9G 0 disk "

    – user3246693
    Dec 28 '18 at 5:24













  • so it's a 3.9 gig disk. I just went through every usb port and am not seeing anything plugged in that shouldn't be there. the 2 data partitions are encrypted(LUKS) and I use luks passdev script to unlock them on boot using a key stored on a USB thumb drive, which coincidentally happens to be 4GB. I've been running this setup for years, is it possible the USB thumb drive didn't properly unmount after decrypting the drives and is now hanging out as a broken /dev/sdg block device?

    – user3246693
    Dec 28 '18 at 5:29














1












1








1







In theory lsblk -O /dev/sdg should tell you a lot. There are two problems though:




  1. Faulty device may report little anyway.


  2. Usually the output of lsblk -O is cryptic because long lines get wrapped in the terminal, the entire output becomes unreadable. To overcome this:





    • use a pager with handy horizontal scrolling, e.g.:



      lsblk -O /dev/sdg | less -S -# 8


    • or redirect to a file (lsblk -O /dev/sdg >/tmp/lsblk_sdg) and examine the file in any editor that can show non-wrapped lines and scrolls properly;


    • or view few columns at a time, like lsblk -o VENDOR,MODEL,SERIAL (run lsblk --help to know all available columns).




Alternatively cd to /sys/class/block/sdg/device and see what you can find (e.g. cat model). Again, if the device is faulty, you may not be able to retrieve much information.



Additionally find entries in dmesg (or in logs) from when the device was first discovered after reboot. They may or may not tell you something.






share|improve this answer













In theory lsblk -O /dev/sdg should tell you a lot. There are two problems though:




  1. Faulty device may report little anyway.


  2. Usually the output of lsblk -O is cryptic because long lines get wrapped in the terminal, the entire output becomes unreadable. To overcome this:





    • use a pager with handy horizontal scrolling, e.g.:



      lsblk -O /dev/sdg | less -S -# 8


    • or redirect to a file (lsblk -O /dev/sdg >/tmp/lsblk_sdg) and examine the file in any editor that can show non-wrapped lines and scrolls properly;


    • or view few columns at a time, like lsblk -o VENDOR,MODEL,SERIAL (run lsblk --help to know all available columns).




Alternatively cd to /sys/class/block/sdg/device and see what you can find (e.g. cat model). Again, if the device is faulty, you may not be able to retrieve much information.



Additionally find entries in dmesg (or in logs) from when the device was first discovered after reboot. They may or may not tell you something.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 27 '18 at 9:59









Kamil MaciorowskiKamil Maciorowski

26.1k155679




26.1k155679













  • This is interesting. lsblk returned the following line "sdg 8:96 0 3.9G 0 disk "

    – user3246693
    Dec 28 '18 at 5:24













  • so it's a 3.9 gig disk. I just went through every usb port and am not seeing anything plugged in that shouldn't be there. the 2 data partitions are encrypted(LUKS) and I use luks passdev script to unlock them on boot using a key stored on a USB thumb drive, which coincidentally happens to be 4GB. I've been running this setup for years, is it possible the USB thumb drive didn't properly unmount after decrypting the drives and is now hanging out as a broken /dev/sdg block device?

    – user3246693
    Dec 28 '18 at 5:29



















  • This is interesting. lsblk returned the following line "sdg 8:96 0 3.9G 0 disk "

    – user3246693
    Dec 28 '18 at 5:24













  • so it's a 3.9 gig disk. I just went through every usb port and am not seeing anything plugged in that shouldn't be there. the 2 data partitions are encrypted(LUKS) and I use luks passdev script to unlock them on boot using a key stored on a USB thumb drive, which coincidentally happens to be 4GB. I've been running this setup for years, is it possible the USB thumb drive didn't properly unmount after decrypting the drives and is now hanging out as a broken /dev/sdg block device?

    – user3246693
    Dec 28 '18 at 5:29

















This is interesting. lsblk returned the following line "sdg 8:96 0 3.9G 0 disk "

– user3246693
Dec 28 '18 at 5:24







This is interesting. lsblk returned the following line "sdg 8:96 0 3.9G 0 disk "

– user3246693
Dec 28 '18 at 5:24















so it's a 3.9 gig disk. I just went through every usb port and am not seeing anything plugged in that shouldn't be there. the 2 data partitions are encrypted(LUKS) and I use luks passdev script to unlock them on boot using a key stored on a USB thumb drive, which coincidentally happens to be 4GB. I've been running this setup for years, is it possible the USB thumb drive didn't properly unmount after decrypting the drives and is now hanging out as a broken /dev/sdg block device?

– user3246693
Dec 28 '18 at 5:29





so it's a 3.9 gig disk. I just went through every usb port and am not seeing anything plugged in that shouldn't be there. the 2 data partitions are encrypted(LUKS) and I use luks passdev script to unlock them on boot using a key stored on a USB thumb drive, which coincidentally happens to be 4GB. I've been running this setup for years, is it possible the USB thumb drive didn't properly unmount after decrypting the drives and is now hanging out as a broken /dev/sdg block device?

– user3246693
Dec 28 '18 at 5:29


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1388016%2fmystery-device-sdg-is-logging-errors-how-do-i-find-out-what-this-is%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

If I really need a card on my start hand, how many mulligans make sense? [duplicate]

Alcedinidae

Can an atomic nucleus contain both particles and antiparticles? [duplicate]