LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-17-2005, 01:07 PM   #1
landfill
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 53

Rep: Reputation: 15
USB HDD only working read-only.


Hi,
I'm having a problem with my Maxtor 40GB USB HDD. I have always been able to mount it rw fine with 'mount /dev/sda1 /mnt/max', but today, something seems to be amiss. I can mount it just fine using that command, and when I type 'mount' on its own to view the mounted devices, it says that it is mounted rw. The problem comes when I try to write to the drive. I can read files off it, but any writing comes up with a 'Read-only filesystem' error.
Any help with this problem would be much appreciated, I was just trying to back up my home directory while I install ArchLinux, but it looks like I'm gonna be waiting a while before I can do that .
Cheers,
L.
 
Old 06-17-2005, 01:13 PM   #2
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
What filesystem is it? Most Linux filesystems will remount the fs read-only if there's errors, are there any errors in dmesg?
 
Old 06-17-2005, 01:16 PM   #3
landfill
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
The filesystm is ext3, here's the end bit of the output of dmesg:

Code:
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
USB Mass Storage device found at 2
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd: block sizes: ed 64 td 64
NET: Registered protocol family 10
Disabled Privacy Extensions on device c034fa00(lo)
IPv6 over IPv4 tunneling driver
divert: not allocating divert_blk for non-ethernet device sit0
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
eth0: no IPv6 routers present
mtrr: 0xd0000000,0x4000000 overlaps existing 0xd0000000,0x100000
kjournald starting.  Commit interval 5 seconds
EXT3-fs warning (device sda1): ext3_clear_journal_err: Filesystem error recorded from previous mount: IO failure
EXT3-fs warning (device sda1): ext3_clear_journal_err: Marking fs in need of filesystem check.
EXT3-fs warning: mounting unchecked fs, running e2fsck is recommended
EXT3 FS on sda1, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 04 4c 00 3f 00 00 08 00
Current sda: sense = 70  3
ASC=11 ASCQ= 0
Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
end_request: I/O error, dev sda, sector 72089663
scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 04 4c 00 40 00 00 07 00
Current sda: sense = 70  3
ASC=11 ASCQ= 0
Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
end_request: I/O error, dev sda, sector 72089664
scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 04 4c 00 41 00 00 06 00
Current sda: sense = 70  3
ASC=11 ASCQ= 0
Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
end_request: I/O error, dev sda, sector 72089665
EXT3-fs error (device sda1): read_block_bitmap: Cannot read block bitmap - block_group = 275, block_bitmap = 9011200
Aborting journal on device sda1.
ext3_reserve_inode_write: aborting transaction: Journal has aborted in __ext3_journal_get_write_access<2>EXT3-fs error (device sda1) in ext3_reserve_inode_write: Journal has aborted
EXT3-fs error (device sda1) in ext3_truncate: Journal has aborted
ext3_reserve_inode_write: aborting transaction: Journal has aborted in __ext3_journal_get_write_access<2>EXT3-fs error (device sda1) in ext3_reserve_inode_write: Journal has aborted
EXT3-fs error (device sda1) in ext3_orphan_del: Journal has aborted
ext3_reserve_inode_write: aborting transaction: Journal has aborted in __ext3_journal_get_write_access<2>EXT3-fs error (device sda1) in ext3_reserve_inode_write: Journal has aborted
EXT3-fs error (device sda1) in ext3_delete_inode: Journal has aborted
ext3_abort called.
EXT3-fs abort (device sda1): ext3_journal_start: Detected aborted journal
Remounting filesystem read-only
Aaahh, I see, something wrong with the journal. Is this bad, or is it easy to fix? Is fsck destructive when it fixes problems?

Thanks again,
L.
 
Old 06-17-2005, 01:21 PM   #4
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
fsck shouldn't be destructive, although it may delete data or move inodes to lost+found if it can't figure out what else to do with them. And you should also run badblocks on that drive, it's possible it's dying.
 
Old 06-17-2005, 01:22 PM   #5
landfill
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
So, which order should I do them, fsck then badblocks or the other way round?
 
Old 06-17-2005, 01:24 PM   #6
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
Actually e2fsck has an option to run badblocks for you, so you can do them both at the same time if you want =)
 
Old 06-17-2005, 01:28 PM   #7
landfill
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
Ok, well, I just ran badblacks on it's own and it's outputting a load of numbers:

Code:
17920
17921
17922
17923
Are these the numbers of the 'bad blocks'?
 
Old 06-17-2005, 02:04 PM   #8
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
Yes
 
Old 06-17-2005, 02:25 PM   #9
landfill
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
Oh crap, there are hundreds of them now!
Will badblocks do anything about them or just list them?
 
Old 06-17-2005, 02:26 PM   #10
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
It just lists them. If you run it inside of e2fsck with the -c switch e2fsck will mark those blocks bad and not use them, but if you have bad blocks your best bet is to backup and replace the drive immediately.
 
Old 06-17-2005, 02:31 PM   #11
landfill
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
Ok, I might as well put the stuff I needed to back up on my Creative Zen Touch 20GB. Will not using thse blocks significantly decrease the capacity of the drive? Is it on its last legs, and could die any minute? I hope not...thanks for the help...
 
Old 06-17-2005, 02:34 PM   #12
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
Depends on how many are bad. The man page says badblocks tests blocks of 1k by default, so count them up and see. But yes, the drive could stop working at any moment and usually once a few blocks go bad they slowly spread like a disease.
 
Old 06-17-2005, 02:37 PM   #13
landfill
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
That is really bad news, but thanks anyway. I don't have e2fsck, but if I download and use badblocks from it, with the -c switch, do you reckon I'll be able to write to the drive again?

Also, are bad blocks like a permanent thing, or will completely formatting the drive correct them?

Last edited by landfill; 06-17-2005 at 02:40 PM.
 
Old 06-17-2005, 02:48 PM   #14
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
I can't imagine that you don't have e2fsck, every distribution should have it in their base packages. But if you use it, yes you'll be able to write to the drive until a new one pops up.

And you can try low level formatting the drive, but usually once a drive starts going it's not worth fighting with it trying to fix it.
 
Old 06-17-2005, 02:53 PM   #15
landfill
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
Oh sorry, I did have it, I just wasn't logged in as root. I think I might format the drive, just to see if it works.
Again, thanks for all your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive not working properly, read only device? (USB key storage device) Arodef Linux - Hardware 14 01-01-2010 07:32 AM
usb 2.0 hdd working through usb 2.0 pcmcia card full speed in 2.4, but slow in 2.6 chilly_willy2 Linux - Hardware 11 02-02-2006 06:16 PM
USB External HDD Read Only!!! Mandriva 2005 LE ivancauso Linux - Newbie 4 12-01-2005 05:13 AM
Install directly to HDD from iso on HDD/USB, with out burning cd vivinuthappa DamnSmallLinux 7 11-16-2004 10:03 AM
my dvd is read as hdd and my ide cd-rw is read as scsi??? spyghost Linux - Hardware 11 07-16-2003 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration