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.

Existing Parition got wiped after mount without formatting

Featured Replies

Hi,

After mounting a drive (without formatting) and rebooting the system, the system hard drive's partition got changed to a linux FS with nothing on it.

 

Some warning should be in place that this could happen...

Is there any way to recover the partition without formatting?

Hi,

After mounting a drive (without formatting) and rebooting the system, the system hard drive's partition got changed to a linux FS with nothing on it.

 

Some warning should be in place that this could happen...

Is there any way to recover the partition without formatting?

What version of unRAID were you using?  What command did you use to "mount" the drive?

 

Unless you actually formatted a disk, it is fairly straightforward to change a partition type using fdisk.

 

Do you know how the disk was previously partitioned?  Was it a single partition?  Was it NTFS?  Was it FAT or FAT32?

 

Assigning a drive in unRAID will re-write the MBR and replace the partition table.  Did you assign the drive to the array?

 

 

Hi,

After mounting a drive (without formatting) and rebooting the system, the system hard drive's partition got changed to a linux FS with nothing on it.

 

Some warning should be in place that this could happen...

Is there any way to recover the partition without formatting?

To set the partition type, easiest is to use a command similar to this:

sfdisk --change-id /dev/sdX 1 83

 

you must use the correct disk "device" instead of sdX, the "1" in the above example indicates partition 1, the "83" is the partition type and is for a linux partition. 

 

NTFS is file system type 7.  To set the first partition of /dev/sdb to an NTFS partition you would use:

sfdisk --change-id /dev/sdb 1 7

Again, you must use the correct "device" based on your hardware.

 

Joe L.

  • Author

Using unRAID v4.7

 

I used the web interface to mount the drive, not the command line interface.

The drive was formatted FAT32 (two partitions).

 

There ought to be a warning that the MBR/Partition tables are about to be wiped.

It basically wiped the boot drive on the laptop.

 

Since the drive had multiple partitions, I'm not sure if I can use the command lines suggested.

 

It's the wife's laptop and now she's pissed.  The machine has important documents I'm trying to recover now :(

 

Using unRAID v4.7

 

I used the web interface to mount the drive, not the command line interface.

The drive was formatted FAT32 (two partitions).

 

There ought to be a warning that the MBR/Partition tables are about to be wiped.

It basically wiped the boot drive on the laptop.

 

Since the drive had multiple partitions, I'm not sure if I can use the command lines suggested.

 

It's the wife's laptop and now she's pissed.  The machine has important documents I'm trying to recover now :(

 

 

I assume you are talking about unMenu and trying to use it to mount the drive.

 

It has been a while since I looked at the unMenu page, but I don't think it gives you any "Mount" button unless the drive can be mounted.  It might have given you a partition or format, or something along those lines.  Those options obviously will wipe out a drive, and if you don't know what they do then you should not be pushing the button before finding out.

 

I will have to check when I get home to see what buttons are available when I plug in different format drives into my machine.

  • Author

I didn't select any partitioning or format options.

 

I just set data drive #1 to the selected drive and then on the main unMenu page, I clicked the mount button.

I didn't select any partitioning or format options.

 

I just set data drive #1 to the selected drive and then on the main unMenu page, I clicked the mount button.

 

OK, I am trying to understand what steps you took... because you are confusing me a little bit.

 

I am trying to figure out if you did this via the unRAID webGUI or the unMenu interface.  They are two VERY different things.  Have you installed anything besides unRAID on the machine?  If not then you are more than likely talking about the unRAID webGUI.

 

unRAID ONLY uses reiserFS for its drives that are assigned as data drives in the array.  If you assigned a drive with data on it into the array and then started the array, then you would "lose" the drive.  That is your own fault, sorry to say.  There is no way from the unRAID webGUI to mount a drive outside of the array via a few button clicks.  You can assign a drive as a data drive on the devices page and then start the array from the Main page, that will clear the drive so unRAID can prep it for use in the system.

I didn't select any partitioning or format options.

 

I just set data drive #1 to the selected drive and then on the main unMenu page, I clicked the mount button.

unMENU is a user-add-on, it has no capability to assign a disk as data drive 1.    unMENU must be installed by you, it is not part of the unRAID distribution.  It does have the ability to create a file system on a disk and mount it, but only on one not assigned to the unRAID. It has no capability to assign disks to the protected array.

 

Only the stock unRAID web-management pages have the ability to assign drives to the array. 

 

Can you clairify which you used?

I am starting to think Blight put his wife's drive into his unraid box (that or booted his wife's laptop with the unraid USB).

 

on the "Device Status" Page, he used the pull-down to set the drive as disk1.

 

Hit the "Start" button to bring the array online...therefor mounting the drive as /mnt/drive1 and wiping the drive (as it is supposed to do)

 

 

Edit: I'm going to guess the problem is related to this post: http://lime-technology.com/forum/index.php?topic=13014.msg123368#msg123368

 

  • Author

Sorry, I got confused by a previous posted regarding 'unMenu', which I didn't use.

I only used the web interface via browser from a separate computer on the same subnet.

 

The computer I used got fubared, so I can't recreate the steps exactly.

But basically, I just booted a laptop from flash drive and reached the login prompt.

I then logged in through a separate desktop computer using '//tower'.

 

Once logged in, I selected the laptop's only drive as data drive #1 (as I was unaware that you couldn't just mount an existing drive as-is for sharing).

And finally, from the main WebUI dialog, I selected to mount data drive #1.

I couldn't find the shared drive, so I decided to reboot the machine, only to find out that the MBT and Partition tables got wiped.

 

What I'm saying is... There should be some sort of user-notification that mounting a drive can cause that.

 

One other thing I did, which I don't think is related, but I'm including just in case is:

At first, I selected the laptop's drive as the parity drive, but did not mount it.  I just selected it, went to the main WebUI page, then returned to set the drive as the data drive.

 

Sorry, I got confused by a previous posted regarding 'unMenu', which I didn't use.

I only used the web interface via browser from a separate computer on the same subnet.

 

The computer I used got fubared, so I can't recreate the steps exactly.

But basically, I just booted a laptop from flash drive and reached the login prompt.

I then logged in through a separate desktop computer using '//tower'.

 

Once logged in, I selected the laptop's only drive as data drive #1 (as I was unaware that you couldn't just mount an existing drive as-is for sharing).

And finally, from the main WebUI dialog, I selected to mount data drive #1.

I couldn't find the shared drive, so I decided to reboot the machine, only to find out that the MBT and Partition tables got wiped.

 

What I'm saying is... There should be some sort of user-notification that mounting a drive can cause that.

 

One other thing I did, which I don't think is related, but I'm including just in case is:

At first, I selected the laptop's drive as the parity drive, but did not mount it.  I just selected it, went to the main WebUI page, then returned to set the drive as the data drive.

 

 

OK, now we know what happened and that you did indeed assign a drive as a data drive from the devices page of the unRAID webGUI we might be able to help.  JoeL is a little more versed in this sort of thing, so I will defer to him.

 

 

The mistake you made is in assuming unRAID does nothing but mount a drive when it is assigned as a data drive.  This is, as you figured out the hard way, not the case.  A search on the forums, or a quick question here would have told you that.  The short answer is that you should NEVER assign a drive with data on it to the unRAID array unless you do not want the data on the drive anymore.

Do you know if the disk had a single partition? or multiple partitions? 

 

If it was a single partition, the odds are it started on sector 63, but depending on the version of unRAID you used, it might start the partition on sector 64.  I'll ask the question once more...  Which version of unRAID did you boot? 

 

regardless of which it was, in the distribution for unRAID 5.obeta6a is a utility to re-write the MBR. (and only the MBR)

 

It can be used to set the partition start back to sector 63.  I think it can also be uesd to set the file system type back to NTFS.  (I need to go find the post where Tom described its use)

 

I think it is named mkmbr.

 

Let me go find the post.

 

Joe L.

What I'm saying is... There should be some sort of user-notification that mounting a drive can cause that.

Did you miss the fact that the disk said "unformatted"? It should have been obvious as it is the main purpose of unRAID. unRAID is not a rescue disc, which seems to be what you tried to use it as.

The instructions describing mkmbr are here:

http://lime-technology.com/forum/index.php?topic=11540.0

 

If your disk was detected as /dev/sda, the command to fix the MBR to point to a partition starting on sector 63 with an NTFS file system would be:

mkmbr /dev/sda 63 7

 

  • Author

Used unRAID v4.7

It wasn't a single partition, one was NTFS the other was FAT32.

I'm managing to recover the partition using various tools, so my main point is not the end result, but rather the missing notification of data loss.

 

xamindar:

That's just bad attitude, I'm a long time developer and it's a norm that if you take an action that can cause damage, you throw up a warning.

Not everyone understands that a drive being labeled as 'unformatted' (which it wasn't) gets wiped out as soon as you mount it.

 

Not to step on any eggshells or point out anyone is right or wrong.

I have a feeling the OP is not the first to do this. (and not the last)

 

It is is documented in the official documentation : http://lime-technology.com/wiki/index.php?title=UnRAID_Manual#Starting_and_Stopping_the_array While people should read first, they don't

 

Maybe the OP has a point. whenever you hit "Start" with a "new configuration" with non-precleared drives , maybe you can have a check box (like with format) stating  "All data on diskX, diskX, and DiskX will be deleted" (placing the id of the new disk(s) there) the logic seems possible

 

*On a side note for future reference* almost any NAS appliance or NASlike hardware or software will wipe the drive as soon as you plug it in.

Not to step on any eggshells or point out anyone is right or wrong.

I have a feeling the OP is not the first to do this. (and not the last)

 

It is is documented in the official documentation : http://lime-technology.com/wiki/index.php?title=UnRAID_Manual#Starting_and_Stopping_the_array While people should read first, they don't

 

Maybe the OP has a point. whenever you hit "Start" with a "new configuration" with non-precleared drives , maybe you can have a check box (like with format) stating  "All data on diskX, diskX, and DiskX will be deleted" (placing the id of the new disk(s) there) the logic seems possible

 

*On a side note for future reference* almost any NAS appliance or NASlike hardware or software will wipe the drive as soon as you plug it in.

I think that the MBR might be written when you assign the drive to the protected array, not when you press "Start"

 

In any case, a larger warning is not out of order. 

 

Also, very frequently people try unRAID on other existing hardware, and we always tell them "be sure to NOT assign any existing disk with data you wish to keep to the protected array" as it will be re-partitioned if you do.

 

Joe L.

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.