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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-17-2005, 01:07 PM
|
#1
|
Member
Registered: Dec 2003
Distribution: Slackware
Posts: 53
Rep:
|
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.
|
|
|
06-17-2005, 01:13 PM
|
#2
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
What filesystem is it? Most Linux filesystems will remount the fs read-only if there's errors, are there any errors in dmesg?
|
|
|
06-17-2005, 01:16 PM
|
#3
|
Member
Registered: Dec 2003
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
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.
|
|
|
06-17-2005, 01:21 PM
|
#4
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
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.
|
|
|
06-17-2005, 01:22 PM
|
#5
|
Member
Registered: Dec 2003
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
So, which order should I do them, fsck then badblocks or the other way round?
|
|
|
06-17-2005, 01:24 PM
|
#6
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
Actually e2fsck has an option to run badblocks for you, so you can do them both at the same time if you want =)
|
|
|
06-17-2005, 01:28 PM
|
#7
|
Member
Registered: Dec 2003
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
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'?
|
|
|
06-17-2005, 02:04 PM
|
#8
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
Yes
|
|
|
06-17-2005, 02:25 PM
|
#9
|
Member
Registered: Dec 2003
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
Oh crap, there are hundreds of them now!
Will badblocks do anything about them or just list them?
|
|
|
06-17-2005, 02:26 PM
|
#10
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
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.
|
|
|
06-17-2005, 02:31 PM
|
#11
|
Member
Registered: Dec 2003
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
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...
|
|
|
06-17-2005, 02:34 PM
|
#12
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
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.
|
|
|
06-17-2005, 02:37 PM
|
#13
|
Member
Registered: Dec 2003
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
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.
|
|
|
06-17-2005, 02:48 PM
|
#14
|
Member
Registered: Jun 2005
Distribution: Debian
Posts: 356
Rep:
|
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.
|
|
|
06-17-2005, 02:53 PM
|
#15
|
Member
Registered: Dec 2003
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
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!
|
|
|
All times are GMT -5. The time now is 06:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|