dlandon / unassigned.devices

Unassigned Devices plugin for unRAID
Other
81 stars 39 forks source link

SSD not being mounted - was working fine before a power loss. #67

Closed RainOne closed 3 years ago

RainOne commented 3 years ago

Hey! I use an unassigned device SSD as a storage for my VMs - I simply put it in, formatted with UD and set btrfs (because people tell me that unraid prefers btrfs for SSDs).

Today I lost power and the drive wouldn't mount back up:

image

I ran btrfs check and there was an issue with the log file and lost actions. Reading up on multiple tutorials, cleaning the log file and recalculating the free space made the drive mountable (manually). I managed to copy the files off and they seem to be working properly. However, UD still won't mount the partition and the size is still 0B, as shown in the screenshot.

Log seems fine:

Feb 8 18:11:19 Regna kernel: ata1: SATA max UDMA/133 abar m2048@0xf7e16000 port 0xf7e16100 irq 25
Feb 8 18:11:19 Regna kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Feb 8 18:11:19 Regna kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 8 18:11:19 Regna kernel: ata1.00: disabling queued TRIM support
Feb 8 18:11:19 Regna kernel: ata1.00: ATA-9: Samsung SSD 850 EVO 500GB, S2RBNX0H621139H, EMT02B6Q, max UDMA/133
Feb 8 18:11:19 Regna kernel: ata1.00: 976773168 sectors, multi 1: LBA48 NCQ (depth 32), AA
Feb 8 18:11:19 Regna kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 8 18:11:19 Regna kernel: ata1.00: disabling queued TRIM support
Feb 8 18:11:19 Regna kernel: ata1.00: configured for UDMA/133
Feb 8 18:11:19 Regna kernel: sd 1:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/466 GiB)
Feb 8 18:11:19 Regna kernel: sd 1:0:0:0: [sdb] Write Protect is off
Feb 8 18:11:19 Regna kernel: sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
Feb 8 18:11:19 Regna kernel: sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Feb 8 18:11:19 Regna kernel: sdb: sdb1
Feb 8 18:11:19 Regna kernel: sd 1:0:0:0: [sdb] Attached SCSI removable disk
Feb 8 18:11:19 Regna kernel: BTRFS: device label VMs_SSD devid 1 transid 6925081 /dev/sdb1
Feb 8 18:11:47 Regna emhttpd: Samsung_SSD_850_EVO_500GB_S2RBNX0H621139H (sdb) 512 976773168
Feb 8 18:12:46 Regna emhttpd: Samsung_SSD_850_EVO_500GB_S2RBNX0H621139H (sdb) 512 976773168
Feb 8 18:13:44 Regna kernel: BTRFS info (device sdb1): disk space caching is enabled
Feb 8 18:13:44 Regna kernel: BTRFS info (device sdb1): has skinny extents
Feb 8 18:13:44 Regna kernel: BTRFS info (device sdb1): enabling ssd optimizations
Feb 8 18:13:44 Regna kernel: BTRFS info (device sdb1): checking UUID tree

and so does btrfs check:

:~# btrfs check /dev/sdb1
Opening filesystem to check...
Checking filesystem on /dev/sdb1
UUID: cdbc9293-6e79-4bc5-9578-11c72a780d19
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 85637234688 bytes used, no error found
total csum bytes: 75910520
total tree bytes: 143654912
total fs tree bytes: 31211520
total extent tree bytes: 27738112
btree space waste bytes: 15606330
file data blocks allocated: 5630336421888
 referenced 70384996352

Even though I already backuped the contents, any way I can auto mount this drive without having to format it?

RainOne commented 3 years ago

I managed to fix it, just had to manually mount it ONCE and it worked - weird, but it's fine.