Unassigned Devices - Managing Disk Drives and Remote Shares Outside of The Unraid Array


Recommended Posts

I have common script so that when users plug in their USB drive it copies the files from a specific folder to the array.

The usb gets automounted, backed up and then unmounted.

 

I have set up a usb hub so that multiple usb drives can be plugged in at once.

 

The script works fine however the issue i am having is when a second usb gets plugged in the common script gets executed again on the first usb which causes it to backup twice.

 

I though the common script gets called once for the device that gets plugged in and not on all plugged in devices? Is this intended? Is there a workaround so it only runs once on the drive?

 

There are many of these backup drives so i would like to do it from a common script if possible but cant have it run multiple times on each plugin. 

 

 

Just to add for clarity i start my script with the following.


case $ACTION in
  'ADD' )

    if [ -d $MOUNTPOINT ]
    then

 

Edited by TonyF
Link to comment

Let me start off by saying I really love your plugin. I actually have 2 issues with Unassigned Devices plugin. Some information:

Now, my 2 issues:

  1. I am used to Unassigned Devices identifying my disks in the following fashion: {Model Number}-{Part Number}_{Serial Number}. For example: ST4000DM000-1F2168_XXXXXXXX. Instead what I'm getting is: 000-1F2168_000000000000
  2. I am used to Unassigned Devices mounting my disks in the following fashion: {Model Number}_{Part Number}_{Serial Number}. For example: ST4000DM000_1F2168_XXXXXXXX. I attempted to change this by unmounting the disk, clicking on the mount point, entering it in that format, and pressing enter. It results in the disk being mounted like this: ST4000DM000 1F2168 XXXXXXXX. 

It doesn't matter the brand of the disk, all of my disks have appeared this way after recently reformatting the drives. I don't know if this is a bug or if it's simply the combination of devices I am using possibly misrepresenting the devices to unRAID and Unassigned Devices. This isn't something that kills the plugin for me, but if at all possible I would like to get the old behavior back for these devices. 

 

I plugged the disk into the same array device where my pool lives, and the disk almost shows up correctly. The Identification part shows up 100% the way I'm used to seeing it, but the mount point was just set to: ST4000DM000_1F2168 and the issue with renaming with underscores turning into spaces still exists here. This is why I'm unsure if it's a bug or the combination of devices misrepresenting the data to unraid and unassigned devices.

 

Any and all help is appreciated.

Link to comment
7 hours ago, TonyF said:

I have common script so that when users plug in their USB drive it copies the files from a specific folder to the array.

The usb gets automounted, backed up and then unmounted.

 

I have set up a usb hub so that multiple usb drives can be plugged in at once.

 

The script works fine however the issue i am having is when a second usb gets plugged in the common script gets executed again on the first usb which causes it to backup twice.

 

I though the common script gets called once for the device that gets plugged in and not on all plugged in devices? Is this intended? Is there a workaround so it only runs once on the drive?

 

There are many of these backup drives so i would like to do it from a common script if possible but cant have it run multiple times on each plugin. 

 

 

Just to add for clarity i start my script with the following.


case $ACTION in
  'ADD' )

    if [ -d $MOUNTPOINT ]
    then

 

 

What do you mean by a "common script"?

 

Here?

59c8d59aee93d_UDSettings.png.be6f38bb425afb531779aadb5a3c9bb8.png

 

This script is executed for all drives plugged in.

 

Each drive has its own script here:

59c8d6dd0ecfb_DriveScript.png.fed7082812c88bd49c6806472ba4c925.png

 

This is the script that runs once for each drive.

Link to comment
5 hours ago, destrugter said:

Let me start off by saying I really love your plugin. I actually have 2 issues with Unassigned Devices plugin. Some information:

Now, my 2 issues:

  1. I am used to Unassigned Devices identifying my disks in the following fashion: {Model Number}-{Part Number}_{Serial Number}. For example: ST4000DM000-1F2168_XXXXXXXX. Instead what I'm getting is: 000-1F2168_000000000000
  2. I am used to Unassigned Devices mounting my disks in the following fashion: {Model Number}_{Part Number}_{Serial Number}. For example: ST4000DM000_1F2168_XXXXXXXX. I attempted to change this by unmounting the disk, clicking on the mount point, entering it in that format, and pressing enter. It results in the disk being mounted like this: ST4000DM000 1F2168 XXXXXXXX. 

It doesn't matter the brand of the disk, all of my disks have appeared this way after recently reformatting the drives. I don't know if this is a bug or if it's simply the combination of devices I am using possibly misrepresenting the devices to unRAID and Unassigned Devices. This isn't something that kills the plugin for me, but if at all possible I would like to get the old behavior back for these devices. 

 

I plugged the disk into the same array device where my pool lives, and the disk almost shows up correctly. The Identification part shows up 100% the way I'm used to seeing it, but the mount point was just set to: ST4000DM000_1F2168 and the issue with renaming with underscores turning into spaces still exists here. This is why I'm unsure if it's a bug or the combination of devices misrepresenting the data to unraid and unassigned devices.

 

Any and all help is appreciated.

 

1. Do you have the preclear plugin installed?  Can I see a screen shot of the UD page?

 

2. Underscores are turned into spaces when renaming the mount point.

Link to comment
1 hour ago, dlandon said:

 

What do you mean by a "common script"?

 

Here?

59c8d59aee93d_UDSettings.png.be6f38bb425afb531779aadb5a3c9bb8.png

 

This script is executed for all drives plugged in.

 

Each drive has its own script here:

59c8d6dd0ecfb_DriveScript.png.fed7082812c88bd49c6806472ba4c925.png

 

This is the script that runs once for each drive.

 

Thats the one i was using. I wanted to avoid assigning a script to every individual drive (Theres quite a few usb drives and i dont have them all at once to preset).

 

I guess if thats the case i can maintain a flat file database to determine what was just plugged in and run the routine only on that one.

Link to comment
8 hours ago, dlandon said:

 

1. Do you have the preclear plugin installed?  Can I see a screen shot of the UD page?

 

2. Underscores are turned into spaces when renaming the mount point.

 

I do not have precede plugin.

 

It also looks like it's messing it up to give all of the disks the same mount point as well.

image.thumb.png.594fa6e44cfc6b7db8a454aa6aa757c3.png

Edited by destrugter
Link to comment
3 hours ago, dlandon said:

 

Show me the output from this command:


ls /dev/disk/by-id/

 

 

root@Tower:~# ls /dev/disk/by-id/
ata-ST4000DM000-1F2168_W300N23H@        ata-ST4000DM000-2AE166_WCD00SKM-part1@           ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1RXZRX5@        ata-WDC_WD80EFAX-68LHPN0_7SGEH6ZC-part1@                  wwn-0x15347340737589170177x@        wwn-0x17869328123984629760x-part1@  wwn-0x7337873558900592640x@
ata-ST4000DM000-1F2168_W300N23H-part1@  ata-ST4000DM000-2AE166_WCD00W9K@                 ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1RXZRX5-part1@  ata-WDC_WD80EFAX-68LHPN0_7SGGS10C@                        wwn-0x15347340737589170177x-part1@  wwn-0x2448360361219477504x@         wwn-0x7337873558900592640x-part1@
ata-ST4000DM000-1F2168_W301BFZE@        ata-ST4000DM000-2AE166_WCD00W9K-part1@           ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E5RF7ZFA@        ata-WDC_WD80EFAX-68LHPN0_7SGGS10C-part1@                  wwn-0x16487769232413708288x@        wwn-0x2448360361219477504x-part1@   wwn-0x8009008642695254017x@
ata-ST4000DM000-1F2168_W301BFZE-part1@  ata-ST4000DM000-2AE166_WCD01D8E@                 ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E5RF7ZFA-part1@  usb-SanDisk_Cruzer_Glide_20051941900F434249FC-0:0@        wwn-0x16487769232413708288x-part1@  wwn-0x2674452748132438016x@         wwn-0x8009008642695254017x-part1@
ata-ST4000DM000-1F2168_Z301EWPM@        ata-ST4000DM000-2AE166_WCD01D8E-part1@           ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E2074065@        usb-SanDisk_Cruzer_Glide_20051941900F434249FC-0:0-part1@  wwn-0x16930046281319993344x@        wwn-0x2674452748132438016x-part1@   wwn-0x8049149434923208704x@
ata-ST4000DM000-1F2168_Z301EWPM-part1@  ata-ST500DM002-1BD142_Z3TS29S3@                  ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E2074065-part1@  wwn-0x10710563513610293248x@                              wwn-0x16930046281319993344x-part1@  wwn-0x4942871422373482496x@         wwn-0x8049149434923208704x-part1@
ata-ST4000DM000-1F2168_Z3066X52@        ata-ST500DM002-1BD142_Z3TS29S3-part1@            ata-WDC_WD40EZRX-00SPEB0_WD-WCC4EME6RLLH@        wwn-0x10710563513610293248x-part1@                        wwn-0x17180219197074984960x@        wwn-0x4942871422373482496x-part1@   wwn-0x9493789144843964417x@
ata-ST4000DM000-1F2168_Z3066X52-part1@  ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E0AHA407@        ata-WDC_WD40EZRX-00SPEB0_WD-WCC4EME6RLLH-part1@  wwn-0x12063343908222947328x@                              wwn-0x17180219197074984960x-part1@  wwn-0x5796585026736902144x@         wwn-0x9493789144843964417x-part1@
ata-ST4000DM000-1F2168_Z306BCX1@        ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E0AHA407-part1@  ata-WDC_WD80EFAX-68LHPN0_7SG6BAPC@               wwn-0x12063343908222947328x-part1@                        wwn-0x17553825102953598977x@        wwn-0x5796585026736902144x-part1@
ata-ST4000DM000-1F2168_Z306BCX1-part1@  ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E0XYDPLE@        ata-WDC_WD80EFAX-68LHPN0_7SG6BAPC-part1@         wwn-0x12945688142666682368x@                              wwn-0x17553825102953598977x-part1@  wwn-0x604058783246864385x@
ata-ST4000DM000-2AE166_WCD00PES@        ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E0XYDPLE-part1@  ata-WDC_WD80EFAX-68LHPN0_7SG7KANC@               wwn-0x12945688142666682368x-part1@                        wwn-0x17824789654740815873x@        wwn-0x604058783246864385x-part1@
ata-ST4000DM000-2AE166_WCD00PES-part1@  ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1RXZPUA@        ata-WDC_WD80EFAX-68LHPN0_7SG7KANC-part1@         wwn-0x1477663287396159489x@                               wwn-0x17824789654740815873x-part1@  wwn-0x6059429298605936640x@
ata-ST4000DM000-2AE166_WCD00SKM@        ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1RXZPUA-part1@  ata-WDC_WD80EFAX-68LHPN0_7SGEH6ZC@               wwn-0x1477663287396159489x-part1@                         wwn-0x17869328123984629760x@        wwn-0x6059429298605936640x-part1@

 

Link to comment
On 21/08/2017 at 9:36 AM, johnieutah said:

I'm not 100% sure this is the right thread, but here goes...

 

I have a couple of Western Digital 5TB Element drives arriving this week. I want to preclear them in their enclosures using UD, crack open the cases once completed and then add/update the Unraid array. I haven't precleared a drive for years and the last time was over the command line. Is there anything I need to be wary of with preclearing through UD?  If I install the preclear plugin am I good to go or is there some "tuning" required?

 

Many thanks guys.

 

Apologies if this has already been answered. I'm catching up on this thread. I've got five more pages to go.

 

I've used WD Elements drives in the past and once you take them out of their shells the 5.25-inch ones work fine as SATA disks. However, the USB to SATA bridge card they use employs encryption so whatever you write to the disk with it in place is completely scrambled when you bypass the card and access the disk via SATA. If you plan to keep the disk in its shell than you have no problem, though there is little air flow and during a prolonged pre-clearing session it will get quite warm. WD seems to be the only company that uses encrypting bridge cards. I've used Seagate and Toshiba external drives via USB and had no problems when accessing them via SATA but they do all get warmer than I would like when kept in their shells.

 

I hope this helps but it's probably weeks too late :)

 

Link to comment

Not sure if this has been covered, I have a NVME drive unassigned. It wont show as "active" or the temps don't show either (recently fixed in rc9f and was working when I had the NVME as the cache drive)

 

I am using the NVME drive just fine as a unassigned drive for VM's, function wise it works.

 

image.png.e30766253e5ed3f306352e249caac292.png

 

Shows correctly here however (but no temps)

image.thumb.png.7931721f13b15fa96e6dabf966405eff.png

 

Edited by Lebowski
Link to comment
22 hours ago, Lebowski said:

Not sure if this has been covered, I have a NVME drive unassigned. It wont show as "active" or the temps don't show either (recently fixed in rc9f and was working when I had the NVME as the cache drive)

 

I am using the NVME drive just fine as a unassigned drive for VM's, function wise it works.

 

image.png.e30766253e5ed3f306352e249caac292.png

 

Shows correctly here however (but no temps)

image.thumb.png.7931721f13b15fa96e6dabf966405eff.png

 

The Dashboard display is controlled by Dynamix.  The UD temperature is displayed by the UD plugin.

 

What is the output of this command?

/usr/sbin/smartctl -A -d sat,12 /dev/nvme0

 

Link to comment
1 hour ago, dlandon said:

The Dashboard display is controlled by Dynamix.  The UD temperature is displayed by the UD plugin.

 

What is the output of this command?


/usr/sbin/smartctl -A -d sat,12 /dev/nvme0

 

 

Cheers

 

# /usr/sbin/smartctl -A -d sat,12 /dev/nvme0
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.12.14-unRAID] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: Inappropriate ioctl for device

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

Link to comment
51 minutes ago, Lebowski said:

 

Cheers

 

# /usr/sbin/smartctl -A -d sat,12 /dev/nvme0
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.12.14-unRAID] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: Inappropriate ioctl for device

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

Try:

/usr/sbin/smartctl -A -d sat,12 /dev/nvme0n1

 

Link to comment
41 minutes ago, dlandon said:

/usr/sbin/smartctl -A -d sat,12 /dev/nvme0n1

 

/usr/sbin/smartctl -A -d sat,12 /dev/nvme0n1
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.12.14-unRAID] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: Inappropriate ioctl for device

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

Link to comment
36 minutes ago, Lebowski said:

 

/usr/sbin/smartctl -A -d sat,12 /dev/nvme0n1
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.12.14-unRAID] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: Inappropriate ioctl for device

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

Show the results of the command:

ls /dev

 

Link to comment
14 hours ago, dlandon said:

Show the results of the command:


ls /dev

 


root@Server:~# ls /dev
aer_inject       loop1               pts/    sdi1     tty18  tty44  ttyp3
block/           loop2               ptyp0   sdj      tty19  tty45  ttyp4
bsg/             loop3               ptyp1   sdj1     tty2   tty46  ttyp5
btrfs-control    loop4               ptyp2   sg0      tty20  tty47  ttyp6
bus/             loop5               ptyp3   sg1      tty21  tty48  ttyp7
char/            loop6               ptyp4   sg10     tty22  tty49  urandom
console          loop7               ptyp5   sg2      tty23  tty5   usb/
core@            mapper/             ptyp6   sg3      tty24  tty50  vcs
cpu/             md1                 ptyp7   sg4      tty25  tty51  vcs1
cpu_dma_latency  md2                 random  sg5      tty26  tty52  vcs2
disk/            md3                 rtc@    sg6      tty27  tty53  vcs3
fd@              md4                 rtc0    sg7      tty28  tty54  vcs4
full             md5                 sda     sg8      tty29  tty55  vcs5
fuse             mem                 sda1    sg9      tty3   tty56  vcs6
hidraw0          memory_bandwidth    sdb     shm/     tty30  tty57  vcsa
hidraw1          mouse@              sdb1    stderr@  tty31  tty58  vcsa1
hidraw2          net/                sdc     stdin@   tty32  tty59  vcsa2
hidraw3          network_latency     sdc1    stdout@  tty33  tty6   vcsa3
hidraw4          network_throughput  sdd     tty      tty34  tty60  vcsa4
hpet             null                sdd1    tty0     tty35  tty61  vcsa5
hwrng            nvme0               sde     tty1     tty36  tty62  vcsa6
initctl|         nvme0n1             sde1    tty10    tty37  tty63  vfio/
input/           nvme0n1p1           sdf     tty11    tty38  tty7   vga_arbiter
kmem             port                sdf1    tty12    tty39  tty8   vhost-net
kmsg             ppp                 sdg     tty13    tty4   tty9   xconsole|
kvm              pps0                sdg1    tty14    tty40  ttyS0  zero
log=             ptmx                sdh     tty15    tty41  ttyp0
loop-control     ptp0                sdh1    tty16    tty42  ttyp1
loop0            ptp1                sdi     tty17    tty43  ttyp2
 

Link to comment

I asked this in the general support forum without realising that there is a thread for this plug-in. Can someone please tell me how i would go about assigning a NFS share to a disk which is mounted by unassigned devices. The disk gets mounted, a SMB share get created but i would like to assign a NFS share to it.

 

I would appreciate any guidance / assistance provided. 

Link to comment
16 minutes ago, bennymundz said:

I asked this in the general support forum without realising that there is a thread for this plug-in. Can someone please tell me how i would go about assigning a NFS share to a disk which is mounted by unassigned devices. The disk gets mounted, a SMB share get created but i would like to assign a NFS share to it.

 

I would appreciate any guidance / assistance provided. 

Have you looked at the Settings for the plugin?

Link to comment
On 10/6/2017 at 12:35 AM, Lebowski said:


root@Server:~# ls /dev
aer_inject       loop1               pts/    sdi1     tty18  tty44  ttyp3
block/           loop2               ptyp0   sdj      tty19  tty45  ttyp4
bsg/             loop3               ptyp1   sdj1     tty2   tty46  ttyp5
btrfs-control    loop4               ptyp2   sg0      tty20  tty47  ttyp6
bus/             loop5               ptyp3   sg1      tty21  tty48  ttyp7
char/            loop6               ptyp4   sg10     tty22  tty49  urandom
console          loop7               ptyp5   sg2      tty23  tty5   usb/
core@            mapper/             ptyp6   sg3      tty24  tty50  vcs
cpu/             md1                 ptyp7   sg4      tty25  tty51  vcs1
cpu_dma_latency  md2                 random  sg5      tty26  tty52  vcs2
disk/            md3                 rtc@    sg6      tty27  tty53  vcs3
fd@              md4                 rtc0    sg7      tty28  tty54  vcs4
full             md5                 sda     sg8      tty29  tty55  vcs5
fuse             mem                 sda1    sg9      tty3   tty56  vcs6
hidraw0          memory_bandwidth    sdb     shm/     tty30  tty57  vcsa
hidraw1          mouse@              sdb1    stderr@  tty31  tty58  vcsa1
hidraw2          net/                sdc     stdin@   tty32  tty59  vcsa2
hidraw3          network_latency     sdc1    stdout@  tty33  tty6   vcsa3
hidraw4          network_throughput  sdd     tty      tty34  tty60  vcsa4
hpet             null                sdd1    tty0     tty35  tty61  vcsa5
hwrng            nvme0               sde     tty1     tty36  tty62  vcsa6
initctl|         nvme0n1             sde1    tty10    tty37  tty63  vfio/
input/           nvme0n1p1           sdf     tty11    tty38  tty7   vga_arbiter
kmem             port                sdf1    tty12    tty39  tty8   vhost-net
kmsg             ppp                 sdg     tty13    tty4   tty9   xconsole|
kvm              pps0                sdg1    tty14    tty40  ttyS0  zero
log=             ptmx                sdh     tty15    tty41  ttyp0
loop-control     ptp0                sdh1    tty16    tty42  ttyp1
loop0            ptp1                sdi     tty17    tty43  ttyp2
 

Try this command:

/usr/sbin/smartctl -A /dev/nvme0n1

Also try this one:

/usr/sbin/smartctl -A -d nvme /dev/nvme0n1

 

Edited by dlandon
Link to comment
1 hour ago, dlandon said:

Try this command:


/usr/sbin/smartctl -A /dev/nvme0n1

Also try this one:


/usr/sbin/smartctl -A -d nvme /dev/nvme0n1

 

 

root@Server:~# /usr/sbin/smartctl -A /dev/nvme0n1
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.12.14-unRAID] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF SMART DATA SECTION ===
SMART/Health Information (NVMe Log 0x02, NSID 0x1)
Critical Warning:                   0x00
Temperature:                        41 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    5%
Data Units Read:                    43,844,337 [22.4 TB]
Data Units Written:                 135,220,574 [69.2 TB]
Host Read Commands:                 344,940,024
Host Write Commands:                1,297,135,981
Controller Busy Time:               13,293
Power Cycles:                       126
Power On Hours:                     12,443
Unsafe Shutdowns:                   67
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
-----------------------------------------------------------------------------


root@Server:~# /usr/sbin/smartctl -A -d nvme /dev/nvme0n1
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.12.14-unRAID] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF SMART DATA SECTION ===
SMART/Health Information (NVMe Log 0x02, NSID 0x1)
Critical Warning:                   0x00
Temperature:                        41 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    5%
Data Units Read:                    43,844,337 [22.4 TB]
Data Units Written:                 135,220,578 [69.2 TB]
Host Read Commands:                 344,940,025
Host Write Commands:                1,297,136,152
Controller Busy Time:               13,293
Power Cycles:                       126
Power On Hours:                     12,443
Unsafe Shutdowns:                   67
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
 

 

 

Link to comment
13 minutes ago, Lebowski said:

 

root@Server:~# /usr/sbin/smartctl -A /dev/nvme0n1
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.12.14-unRAID] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF SMART DATA SECTION ===
SMART/Health Information (NVMe Log 0x02, NSID 0x1)
Critical Warning:                   0x00
Temperature:                        41 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    5%
Data Units Read:                    43,844,337 [22.4 TB]
Data Units Written:                 135,220,574 [69.2 TB]
Host Read Commands:                 344,940,024
Host Write Commands:                1,297,135,981
Controller Busy Time:               13,293
Power Cycles:                       126
Power On Hours:                     12,443
Unsafe Shutdowns:                   67
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
-----------------------------------------------------------------------------


root@Server:~# /usr/sbin/smartctl -A -d nvme /dev/nvme0n1
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.12.14-unRAID] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF SMART DATA SECTION ===
SMART/Health Information (NVMe Log 0x02, NSID 0x1)
Critical Warning:                   0x00
Temperature:                        41 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    5%
Data Units Read:                    43,844,337 [22.4 TB]
Data Units Written:                 135,220,578 [69.2 TB]
Host Read Commands:                 344,940,025
Host Write Commands:                1,297,136,152
Controller Busy Time:               13,293
Power Cycles:                       126
Power On Hours:                     12,443
Unsafe Shutdowns:                   67
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
 

 

 

Try this one for me:

/usr/sbin/smartctl -A -d nvme /dev/nvme0n1 2>/dev/null | /bin/grep -m 1 -i Temperature | /bin/awk '{print $2}'

 

Edited by dlandon
  • Upvote 2
Link to comment
  • trurl pinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.