# filesystem becomes read-only some time while is .. [SOLVED]

## waspishley

Hi, 

i have problem with my external harddisk.

I want to store all my data on this external harddisk and while copying the filesystem becomes read-only.

I made backups with rsnapshot 

```
# rsnapshot hourly

rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)

rsync: connection unexpectedly closed (32112 bytes received so far) [sender]

rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

----------------------------------------------------------------------------

rsnapshot encountered an error! The program was invoked with these options:

/usr/bin/rsnapshot hourly

----------------------------------------------------------------------------

ERROR: /usr/bin/rsync returned 12 while processing /root/

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/opt" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/var" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/sbin" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/lib" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/bin" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/boot" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/mnt" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/usr" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/home" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

rsync: recv_generator: mkdir "/media/extern/rsnapshot/hourly.0/localhost/lost+found" failed: Read-only file system (30)

*** Skipping any contents from this failed directory ***

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

ERROR: Could not utime(time(), time(), "/media/extern/rsnapshot/hourly.0/");
```

/var/log/rsnapshot:

```
[27/Oct/2009:15:03:29] /usr/bin/rsnapshot hourly: started

[27/Oct/2009:15:03:29] echo 5990 > /var/run/rsnapshot.pid

[27/Oct/2009:15:03:29] mkdir -m 0755 -p /media/extern/rsnapshot/hourly.0/

[27/Oct/2009:15:03:29] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /etc /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:03:29] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /root /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:04:52] /usr/bin/rsnapshot hourly: ERROR: /usr/bin/rsync returned 12 while processing /root/

[27/Oct/2009:15:04:52] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /opt /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:04:52] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /var /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:04:52] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /sbin /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:04:52] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /lib /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:04:52] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /bin /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:04:53] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /boot /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:04:53] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /mnt /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:04:53] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /usr /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:05:00] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /home /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:05:01] /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /lost+found /media/extern/rsnapshot/hourly.0/localhost/

[27/Oct/2009:15:05:01] touch /media/extern/rsnapshot/hourly.0/

[27/Oct/2009:15:05:01] /usr/bin/rsnapshot hourly: ERROR: Could not utime(time(), time(), "/media/extern/rsnapshot/hourly.0/");

[27/Oct/2009:15:05:01] rm -f /var/run/rsnapshot.pid

[27/Oct/2009:15:06:39] /usr/bin/rsnapshot hourly: started

[27/Oct/2009:15:06:39] echo 6212 > /var/run/rsnapshot.pid

[27/Oct/2009:15:06:39] native_cp_al("/media/extern/rsnapshot/hourly.0", "/media/extern/rsnapshot/hourly.1")

[27/Oct/2009:15:06:39] /usr/bin/rsnapshot hourly: ERROR: Warning! Could not mkdir("/media/extern/rsnapshot/hourly.1", File::stat=ARRAY(0x8401440)->mode) : Read-only file system

[27/Oct/2009:15:06:39] /usr/bin/rsnapshot hourly: ERROR: Error! cp_al("/media/extern/rsnapshot/hourly.0/", "/media/extern/rsnapshot/hourly.1/")

[27/Oct/2009:15:06:39] rm -f /var/run/rsnapshot.pid
```

mount: 

```
/dev/sda2 on / type ext3 (rw)

/proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)

udev on /dev type tmpfs (rw,nosuid,size=10240k,mode=755)

devpts on /dev/pts type devpts (rw,nosuid,noexec,gid=5,mode=620)

/dev/sda1 on /boot type ext2 (rw)

none on /dev/shm type tmpfs (rw)

usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

truecrypt on /tmp/.truecrypt_aux_mnt1 type fuse.truecrypt (rw,nosuid,nodev,allow_other)

/dev/mapper/truecrypt1 on /home/waspishley/Daten type ext3 (rw)

truecrypt on /tmp/.truecrypt_aux_mnt2 type fuse.truecrypt (rw,nosuid,nodev,allow_other)

/dev/mapper/truecrypt2 on /media/extern type ext3 (rw)
```

Can somebody help me? 

Any ideas what the reason could be?Last edited by waspishley on Fri Nov 06, 2009 9:45 am; edited 1 time in total

----------

## xaviermiller

Isn't your drive full ?

----------

## waspishley

no it isnt full

----------

## xaviermiller

If I see the first error message, you have a broken pipe in rsync.

Can you test each rsync manually ?

----------

## Hypnos

What does dmesg say when this error occurs?  Assuming your setup used to work before, I'm guess your hard disk is dying -- I had the same error when mine was.

----------

## waspishley

 *XavierMiller wrote:*   

> If I see the first error message, you have a broken pipe in rsync.

 

What a "broken pipe" mean?

 *XavierMiller wrote:*   

> Can you test each rsync manually ?

 

How i can do that? I dont know what you want me to do.

/var/log/messages:

```
Nov  5 16:39:52 ibmT61 CE: hpet increasing min_delta_ns to 15000 nsec

Nov  5 16:40:01 ibmT61 cron[7360]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Nov  5 16:40:02 ibmT61 su[7358]: Successful su for root by waspishley

Nov  5 16:40:02 ibmT61 su[7358]: + pts/3 waspishley:root

Nov  5 16:40:02 ibmT61 su[7358]: pam_unix(su:session): session opened for user root by (uid=1000)

Nov  5 16:40:12 ibmT61 REISERFS (device sdb1): found reiserfs format "3.6" with standard journal

Nov  5 16:40:12 ibmT61 REISERFS (device sdb1): using ordered data mode

Nov  5 16:40:12 ibmT61 REISERFS (device sdb1): journal params: device sdb1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

Nov  5 16:40:12 ibmT61 REISERFS (device sdb1): checking transaction log (sdb1)

Nov  5 16:40:13 ibmT61 REISERFS (device sdb1): Using r5 hash to sort names

Nov  5 16:40:13 ibmT61 REISERFS (device sdb1): Created .reiserfs_priv - reserved for xattr storage.

Nov  5 16:41:54 ibmT61 usb 2-1: reset high speed USB device using ehci_hcd and address 3

Nov  5 16:42:05 ibmT61 usb 2-1: reset high speed USB device using ehci_hcd and address 3

Nov  5 16:42:10 ibmT61 usb 2-1: reset high speed USB device using ehci_hcd and address 3

Nov  5 16:42:10 ibmT61 usb 2-1: device descriptor read/64, error -71

Nov  5 16:42:10 ibmT61 usb 2-1: device descriptor read/64, error -71

Nov  5 16:42:11 ibmT61 usb 2-1: reset high speed USB device using ehci_hcd and address 3

Nov  5 16:42:11 ibmT61 usb 2-1: device descriptor read/64, error -71

Nov  5 16:42:11 ibmT61 usb 2-1: device descriptor read/64, error -71

Nov  5 16:42:11 ibmT61 usb 2-1: reset high speed USB device using ehci_hcd and address 3

Nov  5 16:42:12 ibmT61 usb 2-1: device not accepting address 3, error -71

Nov  5 16:42:12 ibmT61 usb 2-1: reset high speed USB device using ehci_hcd and address 3

Nov  5 16:42:12 ibmT61 usb 2-1: device not accepting address 3, error -71

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: Device offlined - not ready after error recovery

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: [sdb] Unhandled error code

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: [sdb] Result: hostbyte=0x05 driverbyte=0x00

Nov  5 16:42:12 ibmT61 end_request: I/O error, dev sdb, sector 281575

Nov  5 16:42:12 ibmT61 usb 2-1: USB disconnect, address 3

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: rejecting I/O to offline device

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: [sdb] Unhandled error code

Nov  5 16:42:12 ibmT61 sd 3:0:0:0: [sdb] Result: hostbyte=0x01 driverbyte=0x00

Nov  5 16:42:12 ibmT61 end_request: I/O error, dev sdb, sector 281687

Nov  5 16:42:12 ibmT61 REISERFS warning (device sdb1): sh-2029: %s: bitmap block (#%u) reading failed reiserfs_read_bitmap_block: reiserfs_read_bitmap_block

.....

.....

Nov  5 16:42:12 ibmT61 REISERFS warning (device sdb1): sh-2029: %s: bitmap block (#%u) reading failed reiserfs_read_bitmap_block: reiserfs_read_bitmap_block

Nov  5 16:42:12 ibmT61 REISERFS warning (device sdb1): sh-2029: %s: bitmap block (#%u) reading failed reiserfs_read_bitmap_block: reiserfs_read_bitmap_block

```

dmesg:

```
usb 2-1: new high speed USB device using ehci_hcd and address 3

usb 2-1: configuration #1 chosen from 1 choice

scsi3 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 3

usb-storage: waiting for device to settle before scanning

scsi 3:0:0:0: Direct-Access     WDC WD64 00AAKS-00A7B0         PQ: 0 ANSI: 2 CCS

usb-storage: device scan complete

sd 3:0:0:0: [sdb] 2500527456 512-byte hardware sectors: (1.28 TB/1.16 TiB)

sd 3:0:0:0: [sdb] Write Protect is off

sd 3:0:0:0: [sdb] Mode Sense: 00 38 00 00

sd 3:0:0:0: [sdb] Assuming drive cache: write through

sd 3:0:0:0: [sdb] Assuming drive cache: write through

 sdb: sdb1

sd 3:0:0:0: [sdb] Attached SCSI disk

usb 2-1: reset high speed USB device using ehci_hcd and address 3

CE: hpet increasing min_delta_ns to 15000 nsec

REISERFS (device sdb1): found reiserfs format "3.6" with standard journal

REISERFS (device sdb1): using ordered data mode

REISERFS (device sdb1): journal params: device sdb1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

REISERFS (device sdb1): checking transaction log (sdb1)

REISERFS (device sdb1): Using r5 hash to sort names

REISERFS (device sdb1): Created .reiserfs_priv - reserved for xattr storage.

usb 2-1: reset high speed USB device using ehci_hcd and address 3

usb 2-1: reset high speed USB device using ehci_hcd and address 3

usb 2-1: reset high speed USB device using ehci_hcd and address 3

usb 2-1: device descriptor read/64, error -71

usb 2-1: device descriptor read/64, error -71

usb 2-1: reset high speed USB device using ehci_hcd and address 3

usb 2-1: device descriptor read/64, error -71

usb 2-1: device descriptor read/64, error -71

usb 2-1: reset high speed USB device using ehci_hcd and address 3

usb 2-1: device not accepting address 3, error -71

usb 2-1: reset high speed USB device using ehci_hcd and address 3

usb 2-1: device not accepting address 3, error -71

sd 3:0:0:0: Device offlined - not ready after error recovery

sd 3:0:0:0: [sdb] Unhandled error code

sd 3:0:0:0: [sdb] Result: hostbyte=0x05 driverbyte=0x00

end_request: I/O error, dev sdb, sector 281575

usb 2-1: USB disconnect, address 3

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: rejecting I/O to offline device

sd 3:0:0:0: [sdb] Unhandled error code

sd 3:0:0:0: [sdb] Result: hostbyte=0x01 driverbyte=0x00

end_request: I/O error, dev sdb, sector 281687

REISERFS warning (device sdb1): sh-2029: %s: bitmap block (#%u) reading failed reiserfs_read_bitmap_block: reiserfs_read_bitmap_block

....

....

REISERFS warning (device sdb1): sh-2029: %s: bitmap block (#%u) reading failed reiserfs_read_bitmap_block: reiserfs_read_bitmap_block

REISERFS abort (device sdb1): Journal write error in flush_commit_list

usb 2-1: new high speed USB device using ehci_hcd and address 4

usb 2-1: device descriptor read/64, error -71

usb 2-1: device descriptor read/64, error -71

usb 2-1: new high speed USB device using ehci_hcd and address 5

usb 2-1: device descriptor read/64, error -71

usb 2-1: device descriptor read/64, error -71

usb 2-1: new high speed USB device using ehci_hcd and address 6

usb 2-1: device not accepting address 6, error -71

usb 2-1: new high speed USB device using ehci_hcd and address 7

usb 2-1: device not accepting address 7, error -71

hub 2-0:1.0: unable to enumerate USB device on port 1

usb 5-1: new full speed USB device using uhci_hcd and address 2

usb 5-1: device descriptor read/64, error -71

usb 5-1: device descriptor read/64, error -71

usb 5-1: new full speed USB device using uhci_hcd and address 3

usb 5-1: device descriptor read/64, error -71

usb 5-1: device descriptor read/64, error -71

usb 5-1: new full speed USB device using uhci_hcd and address 4

usb 5-1: device not accepting address 4, error -71

usb 5-1: new full speed USB device using uhci_hcd and address 5

usb 5-1: device not accepting address 5, error -71

hub 5-0:1.0: unable to enumerate USB device on port 1

```

```
fsck /dev/sdb1

fsck 1.41.3 (12-Oct-2008)

reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************

** If you are using the latest reiserfsprogs and  it fails **

** please  email bug reports to reiserfs-list@namesys.com, **

** providing  as  much  information  as  possible --  your **

** hardware,  kernel,  patches,  settings,  all reiserfsck **

** messages  (including version),  the reiserfsck logfile, **

** check  the  syslog file  for  any  related information. **

** If you would like advice on using this program, support **

** is available  for $25 at  www.namesys.com/support.html. **

*************************************************************

Will read-only check consistency of the filesystem on /dev/sdb1

Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes

###########

reiserfsck --check started at Thu Nov  5 16:37:30 2009

###########

Replaying journal..

No transactions found

Checking internal tree..finished

Comparing bitmaps..finished

Checking Semantic tree:

finished

No corruptions found

There are on the filesystem:

        Leaves 1

        Internal nodes 0

        Directories 1

        Other files 0

        Data block pointers 0 (0 of them are zero)

        Safe links 0

###########

reiserfsck finished at Thu Nov  5 16:38:02 2009

###########

```

Problem was solved by changing cable between hdd and notebook.

----------

