Recover (clean) Freenas USB Drive

Status
Not open for further replies.

Flag815

Cadet
Joined
Oct 8, 2013
Messages
8
I have tried the suggested solution to a Freenas4Noobs tread posted on Feb 1 2013 by FigNewton entitled "Formatting a USB drive to wipe away a previously installed FreeNAS" but I have not had any success. I have not found any way to clean the read-only partition on an old Freenas usb drive. (The drive does not have a write protect switch.) What follows is a copy of my shell output:

[root@freenas /var/log]# camcontrol devlist

<HL-DT-ST CDRW/DVD GCC4482 E114> at scbus0 target 0 lun 0 (cd0,pass0)
<WDC WD20EFRX-68AX9N0 80.00A80> at scbus1 target 0 lun 0 (ada0,pass1)
<WDC WD20EFRX-68EUZN0 80.00A80> at scbus2 target 0 lun 0 (ada1,pass2)
<ST3000DM001-1CH166 CC24> at scbus3 target 0 lun 0 (ada2,pass3)
<Generic Flash Disk 8.07> at scbus7 target 0 lun 0 (pass4,da0)
< Patriot Memory PMAP> at scbus8 target 0 lun 0 (pass5,da1)

[root@freenas /var/log]# dd if=/dev/zero of=/dev/da1 bs=1M
dd: /dev/da1:
Input/output error 1+0
records in 0+0 records out
0 bytes transferred in 0.004943 secs (0 bytes/sec)

The Patriot Memory drive (/dev/da1) is the drive I am trying to clean. System log identifies
the error as a "write protection" issue. Any help will be appreciated.

PS I am currently running Freenas-9.2.1.3-BETA-e3f3e20-x64
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
You can try: mount -uw /

As warri said, I don't know if this will work from FreeNAS.
 

Flag815

Cadet
Joined
Oct 8, 2013
Messages
8
Well, it took me a while to realize how clever your solution was. But once I did, it worked. The "mount -uw /" command removes read-only protection from the root directory. So, the key is to boot from the usb drive that you want to clean. Then execute the "mount -uw /" command, then shutdown. The usb drive can now be formatted or re-partitioned. Thanks.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
Thank you! I will be needing this soon! I need to start fresh, just too many little odd quirks going on with improper previous setups and such.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, it took me a while to realize how clever your solution was. But once I did, it worked. The "mount -uw /" command removes read-only protection from the root directory. So, the key is to boot from the usb drive that you want to clean. Then execute the "mount -uw /" command, then shutdown. The usb drive can now be formatted or re-partitioned. Thanks.

Yeah.. that does nothing. The mounting isn't handled like this. If it "fixed" your problem you're not really recognizing how mounting works. In windows there is no distinction of read-only and write-able. The actual mount in read-only or writable is solely based on how the operating system that is running on the system mounts the drive. In FreeNAS it mounts it read-only on bootup. There is no "flag" for the file system to mount it read-only everywhere. Windows can't read UFS anyway, so it has no ability to even recognize a file system enough to understand this hypothetical read-only flag you think exists.
 

Flag815

Cadet
Joined
Oct 8, 2013
Messages
8
Couple of comments on cyberjock's comment:
1. Have you read rule #6 on posting in a forum?
2. No one said anything about Windows in this post except cyberjock.
3. Gpsguy's solution did work as I stated.
 
Status
Not open for further replies.
Top