Operation not permitted / HDD-Trouble

Status
Not open for further replies.

Langadang

Cadet
Joined
Apr 4, 2013
Messages
4
Hello Forum!

I got going with FreeNAS some time ago. First having it tested on a Proxmox now it has its own Hardware in my server-rack. I have two 1TB Harddisks (Seagate an Hitachi). The OS is running on a 4GB SD-Card.
The System is mostly going to be used for FTP (archiving Install-Images and stuff). Since I am at university in another city i don't have direct access to the hardware.

Now to my Problem:
I set up the two HDDs as a Mirror (UFS) a few weeks ago. Last weekend i reinstalled FreeNAS due to some fails of mine. At this point i actually don't exactly remember what i did to the HDDs. What i do now is, that i formatted them to NTFS on a windows rig, to get rid of all the data.

When I now try to create a new RAID via the GUI i get an error message: Error Volume Creation Failed GEOM [...] Operation not permitted. The same thing pops up when I try to wipe ada1 (Failed to wipe ... operation not permitted). ada0 works just fine.
Running
Code:
sysctl kern.geom.debugflags=0x10
makes things work till next reboot.

If i click "auto import Volume" i get my good ol' RAID from a few weeks ago listed "FTP[geom]".

Trying to dd the HDD via console quit with the same things above....Operation not Permitted

Sooo....something is still leftover from the old System and i am totally puzzled. I have dug the Internet for days without any major accomplishment.

Would be great to get this thing running again.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
You needed to wipe them. Listed below is the recommended way.

Here's the magic incantation for wiping the beginnning & end of your disk(s), replace ada3 with your disk/device:

Code:
dd if=/dev/zero of=/dev/ada3 bs=1m count=1

dd if=/dev/zero of=/dev/ada3 bs=1m oseek=`diskinfo ada3 | awk '{print int($3 / (1024*1024)) - 4;}'`

 

Langadang

Cadet
Joined
Apr 4, 2013
Messages
4
Hey thanks for your reply,

I'm afraid it does not do the trick.

Still permission-Error
Code:
dd if=/dev/zero of=/dev/ada1 bs=1m count=1
dd: /dev/ada1: Operation not permitted

after using
Code:
sysctl kern.geom.debugflags=0x10

it works
Code:
dd if=/dev/zero of=/dev/ada1 bs=1m count=1                 1+0 records in
1+0 records out
1048576 bytes transferred in 0.009846 secs (106497966 bytes/sec)


The same thing with the other Command. After restarting the System I still cant handle the disk.
Code:
dd if=/dev/zero of=/dev/ada1 bs=1m count=1
dd: /dev/ada1: Operation not permitted
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403

Langadang

Cadet
Joined
Apr 4, 2013
Messages
4
Thank you so much paleoN!!

Using forget, clear and remove has finally done the thing!
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
Using forget, clear and remove has finally done the thing!
Thanks for reporting back. You likely missed a piece somewhere with the dd commands. Besides gmirror is easier.
 

Langadang

Cadet
Joined
Apr 4, 2013
Messages
4
Yeah might be,

Since I knew how to reproduce the Error i played around a little. Every time i detached my UFS-Volume in the Manager, with using the "mark as new" option, ada1 was not usable anymore. Only using gmirror forger, clear etc.. made it usable again. This might be a bug in FreeNAS?
However, i switched to ZFS now and the problem is not occuring anymore.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
Yeah might be,
Actually, you likely overwrote the metadata with dd. I stumbled on a mailing list post yesterday and with gmirror, possibly graid as well, the info is in RAM. On a gmirror stop, which also happens on restart/shutdown, it helpfully rewrites the metadata block to disk. You would need to stop the gmirror first or not have loaded kernel module to begin with when using dd.
 

omcn7

Dabbler
Joined
May 19, 2015
Messages
20
I took a 80 GB disk out of my old Freenas system. I formatted it before connecting to my new freenas system. I had the same issue. Thanks to this article I was able to correct. Here are the steps I took.
I used the web GUI to launch shell.
gmirror list
##note the name in my case it was /mirror/RAID80
gmirror destroy <name of volume>
##you only need to call the last part of the name in my case RAID80
I think closed the shell and went to view disks>selected the disk>wipe disk>quick
I was then able in volume manger to do a single striped volume on the one small disk. The mirror of this disk was legacy and I did not put it in my new system.

Thanks for the help guys.
 
Status
Not open for further replies.
Top