LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   usb hd errors - loses read-write as user and other problems (https://www.linuxquestions.org/questions/debian-26/usb-hd-errors-loses-read-write-as-user-and-other-problems-647781/)

troupa 06-08-2008 09:23 AM

usb hd errors - loses read-write as user and other problems
 
distro: debian stable.

I have a 500GB FreeAgent USB drive formatted as ext3. I have my fstab set as follows:

Code:

/dev/sdc1      /media/usbdisk  ext3    rw,users,defaults 0    0
I mount the drive as a user. However after some time I attempt to write to the drive and it gives me errors. Also I go to the drive in nautilus and it gives me an error that it cannot display the contents of the drive. It seems to do this when the computer has been idle or perhaps something that gets run automatically though I'm not sure where to look.

I did "dmesg | grep sdc1" to see what messages were there and got some errors that confuse and concern me. Here is a section from the output:

Code:

lost page write due to I/O error on sdc1
EXT3-fs error (device sdc1) in ext3_reserve_inode_write: IO failure
EXT3-fs error (device sdc1) in ext3_dirty_inode: IO failure
EXT3-fs error (device sdc1): ext3_journal_start_sb: Detected aborted journal
Buffer I/O error on device sdc1, logical block 1289
lost page write due to I/O error on sdc1
VFS: Can't find a valid FAT filesystem on dev sdc1.
NTFS-fs error (device sdc1): read_ntfs_boot_sector(): Primary boot sector is inv alid.
NTFS-fs error (device sdc1): read_ntfs_boot_sector(): Mount option errors=recove r not used. Aborting without trying to recover.
NTFS-fs error (device sdc1): ntfs_fill_super(): Not an NTFS volume.
hfs: can't find a HFS filesystem on dev sdc1.
EXT3 FS on sdc1, internal journal
EXT3-fs error (device sdc1): ext3_find_entry: reading directory #2 offset 0
Aborting journal on device sdc1.
Buffer I/O error on device sdc1, logical block 1289
lost page write due to I/O error on sdc1
Buffer I/O error on device sdc1, logical block 0
lost page write due to I/O error on sdc1
EXT3-fs error (device sdc1): ext3_journal_start_sb: Detected aborted journal
VFS: Can't find a valid FAT filesystem on dev sdc1.
NTFS-fs error (device sdc1): read_ntfs_boot_sector(): Primary boot sector is inv alid.
NTFS-fs error (device sdc1): read_ntfs_boot_sector(): Mount option errors=recove r not used. Aborting without trying to recover.
NTFS-fs error (device sdc1): ntfs_fill_super(): Not an NTFS volume.
hfs: can't find a HFS filesystem on dev sdc1.

Firstly I don't understand why it's losing write access as the user I originally mounted it with. If I unmount it as root and remount it as a user then write access is restored for a time. Also I don't understand why it's looking for an NTFS, FAT, HFS, etc filesystem. Finally, the I/O errors and journal errors worry me.

I have one directory on the drive used by apache so I can access files when I am not at home. The rest of the drive I use to save files as a normal user. I don't know if apache tries to mount it as a different user? The only thing there is that a folder in my home directory is also shared by apache and I don't have problems with the (internal) drive that my home directory is on. I need the usb drive to stay read-write as the user I mount it with.

Thanks in advance :-)

EDIT: I ran fsck on the drive and remounted it as a user and still it is remounted read-only after some time. dmesg output starting right after I mounted it until now, a few hours later, I came in and tried "touch /media/usbdisk/test" and it gave me the error "touch: cannot touch '/media/usbdisk/test' : Read only filesystem.
Code:

sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
    Additional sense: Logical unit not ready, initializing command required
end_request: I/O error, dev sdc, sector 794703
EXT3-fs error (device sdc1): read_inode_bitmap: Cannot read inode bitmap - block_group = 3, inode_bitmap = 99330
Aborting journal on device sdc1.
sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
    Additional sense: Logical unit not ready, initializing command required
end_request: I/O error, dev sdc, sector 10375
Buffer I/O error on device sdc1, logical block 1289
lost page write due to I/O error on sdc1
sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
    Additional sense: Logical unit not ready, initializing command required
end_request: I/O error, dev sdc, sector 63
Buffer I/O error on device sdc1, logical block 0
lost page write due to I/O error on sdc1
EXT3-fs error (device sdc1) in ext3_new_inode: IO failure
EXT3-fs error (device sdc1) in ext3_create: IO failure

issuing "mount" shows the device mounted:
Code:

/dev/sdc1 on /media/usbdisk type ext3 (rw,noexec,nosuid,nodev)

amani 06-08-2008 05:49 PM

Does your /dev/sdc go to bed early?
Some drives do


Best

A. Mani

troupa 06-08-2008 07:08 PM

I checked the drive with sdparm -al /dev/sdc1 and noticed:

Code:

Power condition mode page:
  IDLE        0  [cha: n, def:  0, sav:  0]  Idle timer active
  STANDBY    1  [cha: y, def:  1, sav:  1]  Standby timer active
  ICT        0  [cha: n, def:  0, sav:  0]  Idle condition timer (100 ms)
  SCT      9000  [cha: y, def:9000, sav:9000]  Standby condition timer (100 ms)

I cleared the STANDBY by issuing:
Code:

sdparm clear STANDBY -6 /dev/sdc1
we'll see if it works.

troupa 06-10-2008 11:03 AM

OK it worked!
Thank you amani for the suggestion.


All times are GMT -5. The time now is 10:33 PM.