The setup:
Raspi2 B+ running on a 8GB SD card and 32 GB Sandisk Cruzer Orbit for at least a year. I mounted the drive to my torrent download directory like this:
sudo mount /dev/sda1 torrents/downloads/usb
It's been running smoothly until one day I wanted to do a reboot and it was not working. I can always ssh back to the machine despite it says that it's going to reboot/shutdown. I did a "shutdown -h now" and then unplugged the power, plugged it back.
When I mounted my drive back, the fun started:
pi@raspberrypi ~ $ sudo mount /dev/sda1 torrents/downloads/usb
mount: block device /dev/sda1 is write-protected, mounting read-only
Online research suggested that i remount so, I unmounted and tried this:
pi@raspberrypi ~ $ sudo blockdev --setrw /dev/sda1
pi@raspberrypi ~ $ sudo mount /dev/sda1 torrents/downloads/usb
mount: block device /dev/sda1 is write-protected, mounting read-only
pi@raspberrypi ~ $ sudo mount -t ext3 -o remount,rw /dev/sda1 torrents/downloads/usb
pi@raspberrypi ~ $
I tried to create a file and edit it using sudo vi and this is what I get once I try to save the file:
pi@raspberrypi ~ $ touch torrents/downloads/usb/test
pi@raspberrypi ~ $ sudo vi torrents/downloads/usb/test
The error I get is:
"torrents/downloads/usb/test" E667: Fsync failed
So basically, my usb drive is in Read-Only mode. Here are some diagnostic details from dmesg:
[366650.998500] usb 1-1.3: new high-speed USB device number 6 using dwc_otg
[366651.100045] usb 1-1.3: New USB device found, idVendor=0781, idProduct=557c
[366651.100080] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[366651.100100] usb 1-1.3: Product: Cruzer Orbit
[366651.100120] usb 1-1.3: Manufacturer: SanDisk
[366651.100137] usb 1-1.3: SerialNumber: 4C530009861225104380
[366651.101898] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[366651.102327] scsi2 : usb-storage 1-1.3:1.0
[366652.099937] scsi 2:0:0:0: Direct-Access SanDisk Cruzer Orbit 1.27 PQ: 0 ANSI: 6
[366652.105483] sd 2:0:0:0: [sda] 62530624 512-byte logical blocks: (32.0 GB/29.8 GiB)
[366652.107847] sd 2:0:0:0: [sda] Write Protect is on
[366652.107889] sd 2:0:0:0: [sda] Mode Sense: 43 00 80 00
[366652.110976] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[366652.129022] sda: sda1
And using fdisk I get:
pi@raspberrypi ~ $ sudo fdisk -l
Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes
4 heads, 16 sectors/track, 243200 cylinders, total 15564800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000981cb
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 15564799 7720960 83 Linux
Disk /dev/sda: 32.0 GB, 32015679488 bytes
255 heads, 63 sectors/track, 3892 cylinders, total 62530624 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System /dev/sda1 32 62530623 31265296 c W95 FAT32 (LBA)
I tried to clean the partition using parted as well:
pi@raspberrypi ~ $ sudo parted /dev/sda1
Warning: Unable to open /dev/sda1 read-write (Read-only file system). /dev/sda1 has been opened read-only.
Warning: Unable to open /dev/sda1 read-write (Read-only file system). /dev/sda1 has been opened read-only.
GNU Parted 2.3
Using /dev/sda1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
This is my dosfsck results:
pi@raspberrypi ~ $ sudo dosfsck -v /dev/sda1
dosfsck 3.0.13 (30 Jun 2012)
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
Logical sector size is zero.
pi@raspberrypi ~ $ sudo dosfsck -a -f /dev/sda1
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
open: Read-only file system
I have tried a lot other things like using parted to delete the partition, HDDGURU's low level format tool - nothing work.
Can anyone give any lead on this? I'm willing to try anything.
Thanks a lot!
-mc