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.

Unassigned disk seemingly wiped itself after I cleaned my system

Featured Replies

The other week I cleaned out my system which includes removing the drive to make the case lighter.  When I booted it back up I noticed my Unassigned Drive which I use for unimportant file was missing but still detected and asking to be formatted/precleared.  Oddly enough, I believe the Dev # changed from 3 to 1 as it would have been added last. Having said that, Dev 2 and 3 are working fine (see image below).

 

The disk was part of the array but I replaced it months ago when I noticed SMART errors popping up.  I heard the errors weren't that concerning so I figured Id just store things I wanted to keep but wouldn't be hurt if I lost.  It has 760 'Reallocated sector count' and 3 'Reported uncorrect'. I've tried swapping out the SATA power and data cables but not luck and I ran an 'SMART extended self-test' overnight and it passed.

 

I can accept the data is gone but I thought the disk would be dead in this sort of scenario.  If there is a chance to recover I'd like to try it.  If anyone has any suggestions or tips Id appreciate the help!

 

Thanks1688254314_Screenshot2022-10-23124742.png.7ab41b8687cfd0d18e5ba45fce709f63.png

Solved by JorgeB

  • Community Expert

Looks like the partition is missing or not valid, post the output of:

fdisk -l /dev/sdd

and

blkid

 

  • Author
root@MediaFunTime:~# fdisk -l /dev/sdd
Disk /dev/sdd: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 59267C8F-29D9-4B01-BDA7-3AFC685A6362


root@MediaFunTime:~# blkid
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/sda1: LABEL_FATBOOT="UNRAID" LABEL="UNRAID" UUID="272C-EBE2" BLOCK_SIZE="512" TYPE="vfat"
/dev/nvme0n1p1: UUID="5bfebf65-d3db-4084-bf64-34a082029f82" UUID_SUB="abe7e646-d564-4879-8dba-df9e4d7231d8" BLOCK_SIZE="4096" TYPE="btrfs"
/dev/sdc1: UUID="0595ead6-4c55-4db7-8b71-1c0fbe8166b5" BLOCK_SIZE="512" TYPE="xfs"
/dev/sdb1: LABEL="Download_Dri" UUID="68549b1d-504a-4dd0-a02a-5a321053b073" BLOCK_SIZE="4096" TYPE="xfs" PARTUUID="bfd29254-c6e1-4b37-a6bf-5e9511428a16"
/dev/sde1: UUID="9d0086dd-9ad9-44ed-9c4a-36d9cb0331ee" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="40d9db88-bfb2-4f84-b4bd-8b6c941a1e15"
/dev/sdf1: UUID="2d9d8057-1efd-4d4a-a042-20fc665aedfd" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="0e258e4c-ecfa-4945-ade9-62f5be2232e4"
/dev/sdj1: UUID="45cb1f28-67ff-4399-b39c-73d183cf3990" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="e4627d19-0d9b-4361-8a90-1bcd230b941b"
/dev/sdh1: UUID="26e016ba-4450-4178-b687-0b096388b0be" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="625ed22d-7a1c-45a9-895b-40141da627b9"
/dev/sdi1: UUID="49692a33-ddd4-4c6e-8acd-da00d7dc93d7" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="0d24b34f-4295-484d-9536-8efd8f863fa4"
/dev/sdg1: UUID="9adf252b-7a5f-4728-b3de-b4fd9ac2c6ea" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="d2c332e1-207c-4544-82ab-a50a9872a0d8"
/dev/md1: UUID="26e016ba-4450-4178-b687-0b096388b0be" BLOCK_SIZE="512" TYPE="xfs"
/dev/md2: UUID="45cb1f28-67ff-4399-b39c-73d183cf3990" BLOCK_SIZE="512" TYPE="xfs"
/dev/md3: UUID="2d9d8057-1efd-4d4a-a042-20fc665aedfd" BLOCK_SIZE="512" TYPE="xfs"
/dev/md4: UUID="9adf252b-7a5f-4728-b3de-b4fd9ac2c6ea" BLOCK_SIZE="512" TYPE="xfs"
/dev/md5: UUID="9d0086dd-9ad9-44ed-9c4a-36d9cb0331ee" BLOCK_SIZE="512" TYPE="xfs"
/dev/loop2: UUID="0ce6aaf2-571f-4355-bac9-2f8fe66782bc" UUID_SUB="afef9faa-e69a-4f4c-8220-57b88ced15cc" BLOCK_SIZE="4096" TYPE="btrfs"
/dev/loop3: UUID="ce60ba34-4c35-4284-9788-c21a8e5d24b3" UUID_SUB="80d95368-cec6-4b0f-8c8b-fed4ac50bdc6" BLOCK_SIZE="4096" TYPE="btrfs"
/dev/sdd: PTUUID="59267c8f-29d9-4b01-bda7-3afc685a6362" PTTYPE="gpt"

Thank you for replying.  My /dev/sdd is GPT partition?   Isn't that for windows?

Edited by Scruffyunraid

  • Community Expert

Linux also uses GPT, do you know which filesystem was the disk?

  • Author

 My mistake, it should be using xfs as the other disks in Unassigned Devices

  • Community Expert

Partition exists but Linux is not detecting a filesystem, try running

xfs_repair -v /dev/sdd1

 

  • Author

Not looking so great :(

root@MediaFunTime:~# xfs_repair -v /dev/sdd1
/dev/sdd1: No such file or directory
/dev/sdd1: No such file or directory

fatal error -- couldn't initialize XFS library

I snooped through my /dev directory and can find the sdd file but no sdd1.  In that same directory I see the other Unassigned Devices such as sdb, sdb1 and sdc, sdc1

  • Community Expert

Sorry, was distracted, there's no partition, so that won't work, you can try recreating the partition on the same sector, assuming the disk was formatted with UD.

  • Author

Could you elaborate on "recreating the partition on the same sector"? I'm feeling like a bit of of noobie here

  • Community Expert

If the disk was formatted with UD in the last couple of years or so it would have a partition starting on sector 64, so type:
 

sfdisk /dev/sdd
64 (enter)
write (enter)

 

Then run xfs_repair again.

 

  • Author

Really appreciate the help so far Jorge

 

root@MediaFunTime:~# sfdisk /dev/sdd

Welcome to sfdisk (util-linux 2.36).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Checking that no-one is using this disk right now ... OK

Disk /dev/sdd: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 59267C8F-29D9-4B01-BDA7-3AFC685A6362

Old situation:

Type 'help' to get more information.

>>> 64
Created a new GPT disklabel (GUID: 29E65BF6-6552-6B49-A9B4-0BCD79147917).
Sector 64 already used.
Failed to add #1 partition: Numerical result out of range
/dev/sdd1: write

New situation:
Disklabel type: gpt
Disk identifier: 29E65BF6-6552-6B49-A9B4-0BCD79147917

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Running the xfs repair command resulted in the same failure as before.  I obviously didn't add a partition properly, could you recommend another 'sector #' to try or is that just a default value?

  • Community Expert
  • Solution
12 minutes ago, Scruffyunraid said:
Sector 64 already used.
Failed to add #1 partition: Numerical result out of range

Weird, it's saying sector 64 is in use but according to fdisk there's no partition.

 

Try this command instead:

sgdisk -o -a 64 -n 1:64:0 /dev/sdd

Post the output if there's an error.

  • Author

JorgeB, I think I love you.  You are a genius. 

 

The operation has completed successfully.

The partition repopulated right away and I'm able to go through the directories!! Without you I would have just figured the drive was broken and chucked it. Bravo

  • 1 year later...

Hello I have the same problem. I tried Unraid on my Windows desktop and used my (secondary) 500GB SATA SSD as the primary array disk. After connecting an external disk and using it as the cache, my primary 2TB internal NVMe SSD which had Windows 11 / NTFS got formatted apparently. I made sure to not assign that to any disks. Is there any way to undo that? Specifically what sectors would I need to provide?
There were crucial files on that disk, please help

  • Community Expert

Not sure how the drive got formatted as Unraid will only format a drive if you tell it to do so.  Are you sure it actually got formatted rather than repartitioned?

 

The only easy way I would see being able to recover anything in the scenario you describe would be to use disk recovery software such as UFS Explorer.

 

I 100% did NOT tell Unraid to format it. I once accidentally selected it in a Dropdown but *quickly* deselected it (as I was plugging an external disk). I selected the external disk, and I formatted *that*. I didn't check the primary Windows disk at all so I have no idea if it happened sometime during these operations or if it is completely unrelated.

 

Either way, I was able to recover the partitions using TestDisk (first answer in https://superuser.com/questions/133799/how-do-i-restore-a-partition-without-losing-the-data), it was able to find my partitions and write the partition table and thankfully my data is back however I'm not struggling to get the disk bootable again... But this should not have happened in the first place, that is definitely a bug.

  • Community Expert
18 minutes ago, danyel said:

I 100% did NOT tell Unraid to format it. I once accidentally selected it in a Dropdown but *quickly* deselected it (as I was plugging an external disk).

Just doing that won't format a disk.

5 hours ago, JorgeB said:

Just doing that won't format a disk.

And yet that's exactly what happened.

Yesterday I was trying to get the cache drive working and for that I connected my NVMe-2-usb reader, however Unraid was unable to detect it which is why I ran commands like `dmesg`, `lsusb -t` etc. in the console but nothing destructive (I'm am advanced GNU/Linux user), the only command I wasn't sure of which may have caused something, was from this thread: https://github.com/raspberrypi/linux/issues/4130

 

echo "0bda:9210:" | sudo tee /sys/module/usb_storage/parameters/quirks

 

Later I switched the internal drive in the reader and then Unraid was able to detect it, so the other drive was not properly plugged. However, none of this explains why my internal drive which I had never touched, was formatted... Happy to provide more info (tried `journalctl` which doesn't seem to exist)

  • Community Expert
17 hours ago, danyel said:

And yet that's exactly what happened.

I don't see how that is possible.

Neither do I, and yet here we are

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...

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.