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.

Format/Deleting data on data disk

Featured Replies

Hi all,

 

Is there an easy way of formatting a data disk within unRaid?

 

I have a disk with 790gb data on it and I want to get rid of it, ideally i want to perform a quick format but I do not know how to do this. I tried deleting the partition and formatting under windows, but when I connected back on my unraid server the data was still there. I then tried using putty and running the ms command and deleting the files, at first this seemed to work but then I kept getting messages saying that some files were read only. I have been pulling my hair out all afternoon trying to delete these files, at one point I nearly threw the hard drive through the bedroom window :'(

 

 

Hi all,

 

Is there an easy way of formatting a data disk within unRaid?

 

I have a disk with 790gb data on it and I want to get rid of it, ideally i want to perform a quick format but I do not know how to do this. I tried deleting the partition and formatting under windows, but when I connected back on my unraid server the data was still there. I then tried using putty and running the ms command and deleting the files, at first this seemed to work but then I kept getting messages saying that some files were read only. I have been pulling my hair out all afternoon trying to delete these files, at one point I nearly threw the hard drive through the bedroom window :'(

With the array started, you can re-format a specific  "disk" by first un-mounting it by typing

/root/samba stop

umount /dev/mdX

 

(Where /dev/mdX = /dev/md1 for disk1, /dev/md2 for disk2, /dev/md3 for disk3, etc.) If the disk cannot be un-mounted it might be busy... (a file on it is open, or it is the "current" directory for a program. It might even be you id you changed directory to it to list its contents.  Change directory elsewhere and try the "umount" command again.

 

Then once un-mounted, you can re-format it with

mkreiserfs /dev/mdX

(Again substituting the correct md device for mdX)

It will ask you to confirm the format.  Respond with "Yes," exactly as it requests. (I think it needs capital "Y" lower case "es")

 

Then, you can "Stop" the array, re-start it, and the disk will be empty.

 

Joe L.

if you are mainly looking to get rid of the data try the following

 

cd /mnt/disk#      # = disk you are wanting to wipe out

rm -Rf *

 

that will recursively delete everything on that disk with force.  just be sure you are on the right disk

Reformatting a disk is not hard.  What I have done is to write zeros to the beginning of the disk, basically unformatting the disk, and then allowing unRAID to format it.  

 

The "dd" command will write the zeros ... something like the following ...

 

dd if=/dev/zero of=/dev/sdX count=100 bs=512

 

Where sdX is you device.  Make sure to get this right, or you will wipe out the wrong disk!!  The easiest way may be to go to the devices tab in unRAID.  The device is shown in parenthesis.  After this commend, refresh the Web GUI and unRAID should offer to format the disk.

 

But I am more concerned with the steps you have taken to try to reformat the disk may have resulted in corrupting parity.  If you have rebooted the machine under windows (or taken the disk out and put it in a Windows computer) and written to the disk, your parity is hosed.

 

Before you do anything else, run a parity check.  My guess is you'll see a flurry of errors at the beginning of the disk.  The parity check "corrects" parity as it goes, so although it is showing sync errors, they have been corrected.  I would suggest letting the parity check run to completion.  You can even run a second one to confirm that the parity protection is 100% restored.  (It all of the corruption is at the beginning of the disk, you might just let the second parity check run for a short while to confirm all of the corruption has been repaired.).

 

After you know parity is good - you can proceed to reformat your disk.  ;)

  • Author

Thanks for the replies and suggestions. I have had a few beers now so I will try tomorrow, if it goes wrong whilst under the influence of alcohol the drive will definitely go through the window  ;D

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.