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.

How to access /dev/sda ????

Featured Replies

I've managed to accidentally move a file to /dev/sda and now need to delete it.

 

However I am unable to gain access to /dev/sda as it returns "Permission Denied", can anyone tell me how to get access to it in order to delete the file?

 

Thanks.

 

 

I've managed to accidentally move a file to /dev/sda and now need to delete it.

 

However I am unable to gain access to /dev/sda as it returns "Permission Denied", can anyone tell me how to get access to it in order to delete the file?

 

Thanks.

 

 

/dev/sda would normally be one of your raw disk devices.  (might be your flash drive, or one of your SATA disks)

Only way for us to know is for you to attach a copy of your syslog for analysis to your next post.

 

In any case, you might want to describe what specific exact command you used to move the file. 

(since /dev/sda will not have a file system, odds are you clobbered the master-boot-record on that device and overwrote it. You might have some damage to fix.) 

 

You can get a listing of the devices on your server by typing

ls -l /dev/disk/by-id

 

post the output here.

 

Joe L.

  • Author

Hmm, that doesn't sound good.

 

I believe the command was

mv filename /dev/sda

 

Syslog from the currently running server is attached.

 

Requested output is also attached.

 

Thanks.

 

 

output.txt

syslog-2011-08-19.txt

Where are you actually seeing this file that you moved??

 

My guess is you put something into the file system stored in ram so a reboot would fix it.

 

Peter

 

Where are you actually seeing this file that you moved??

 

My guess is you put something into the file system stored in ram so a reboot would fix it.

 

Peter

 

 

/dev/sda is not in RAM. It is the raw device reference and the MBR may be damaged.

/dev/sda is your disk1.

 

Aug 18 23:39:26 NAS kernel: md: import disk0: [8,32] (sdc) WDC WD20EARX-00P WD-WCAZA6580478 size: 1953514552

Aug 18 23:39:26 NAS kernel: md: import disk1: [8,0] (sda) WDC WD20EARS-00M WD-WCAZA3646980 size: 1953514552

Aug 18 23:39:26 NAS kernel: md: import disk2: [8,16] (sdb) WDC WD10EADS-11M WD-WCAV53474284 size: 976762552

 

  You've clobbered its MBR, that is certain, but you are in luck... you can get it re-constructed by unRAID by

 

Stopping the array

un-assign disk1

start the array with it un-assigned

stop the array once more

re-assign disk1

Start the array and let unRAID re-construct it.

 

Unfortunately, the file itself is gone. (since you moved it).

 

Joe L.

What evidence suggests the MBR is actually clobbered? I don't see the disk being disabled due to the partition missing.

 

It still wouldn't surprize me if you somehow just copied the files into the ram file system.

 

In either case, try an array stop and re-start. If the disks all appear fine then there was likely no damage done.

 

Peter

 

What evidence suggests the MBR is actually clobbered? I don't see the disk being disabled due to the partition missing.

 

It still wouldn't surprize me if you somehow just copied the files into the ram file system.

 

In either case, try an array stop and re-start. If the disks all appear fine then there was likely no damage done.

 

Peter

 

don't need to do that to verify.

 

Type

fdisk -l /dev/sda

and see what it prints.

 

and type

dd if=/dev/sda count=1 | od -x -A d

 

Nobody's looked at the MBR since the system was booted.  That is probably why it is still working.

 

A quick question... How big was the file you moved to /dev/sda?

 

Joe L.

  • Author
Type

fdisk -l /dev/sda

and see what it prints.

 

and type

dd if=/dev/sda count=1 | od -x -A d

 

The output for both these commands is attached.

 

A quick question... How big was the file you moved to /dev/sda?

 

I think it was around 370MB, and the file itself was not important, I don't care if it is lost.

 

I haven't done the rebuild yet, am I right to go ahead and do it now??

 

I assume it will to take a while to reconstruct?? There is 1.5TB of data on the disk.

 

I should also mention the server appears to be functioning fine. It has been powered off twice since the file was moved. Data from that disk still shows up in the user shares and can be read. I haven't written to the disk yet incase it overwrites existing data or something.

 

Thanks, Ash

Output.txt

Type

fdisk -l /dev/sda

and see what it prints.

 

and type

dd if=/dev/sda count=1 | od -x -A d

 

The output for both these commands is attached.

 

A quick question... How big was the file you moved to /dev/sda?

 

I think it was around 370MB, and the file itself was not important, I don't care if it is lost.

 

I haven't done the rebuild yet, am I right to go ahead and do it now??

 

I assume it will to take a while to reconstruct?? There is 1.5TB of data on the disk.

 

I should also mention the server appears to be functioning fine. It has been powered off twice since the file was moved. Data from that disk still shows up in the user shares and can be read. I haven't written to the disk yet incase it overwrites existing data or something.

 

Thanks, Ash

Definitely, go through the steps I outlined.  The file was too large to not have caused damage.

 

Stop the array, un-assign the disk

Start the array with it un-assigned

Stop the array again

re-assign the disk to its same slot in the array.

let it reconstruct.  (This will take about as long as your original parity calculation)

 

Joe L.

The data from the last commands you posted is correct for a 2T drive with the partition starting on sector 63. I'm not seeing any damage done to the MBR.

 

Peter

 

The data from the last commands you posted is correct for a 2T drive with the partition starting on sector 63. I'm not seeing any damage done to the MBR.

 

Peter

 

I don't either... Interesting.
  • Author

The rebuild is just about to finish (just under an hour left).

 

Is there anything else I need to do once it is done, or is it good to go??

 

Do I need to do a parity check??

 

Thanks, Ash

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.