Linux - HardwareThis 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.
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.
Operating system: Debian Linux 6.0
Kernel and CPU: Linux 2.6.32-5-686 on i686
Processor information: AMD Athlon(tm) XP 1900+, 1 cores
Real memory: 502.63 MB total, 88.67 MB used
Local disk space: 1003.43 GB total, 565.60 GB used
Disk name Total size Make and model Partitions Actions
SATA device A 74.53 GB ATA ST380011A 2 IDE parameters
SATA device B 6.03 GB ATA Maxtor 90648D3 1 IDE parameters
SCSI device D 931.51 GB Seagate Portable 1
SATA device A:
Number Type Extent Size Start End Used by
1 Linux 243.17 MB 1 31 /boot
2 Linux LVM 74.29 GB 32 9729 LVM VG debsrv
SATA device B:
Number Type Extent Size Start End Used by
1 Linux LVM 6.03 GB 1 787
SCSI device D:
Number Type Extent Size Start End Used by
1 NTFS 931.51 GB 1 121601 /mnt/Backup
I'm wondering if anyone could help resolve the following problem relating to backup failures:
I mounted a Seagate 1Tb external usb drive (SCSI device C) using the following command:
Quote:
mount -t ntfs-3g /dev/sdc1 /mnt/Backup -o umask=0,nls=utf8
... the device taking in excess of 30 seconds to mount. I was then able browse the contents of the drive without any problem.
However when I run a tar backup from either cron or the command line I get the following error:
Quote:
gzip: stdout: Input/output error
tar: /mnt/Backup/NewBackups/20110308_065435/20110308_065435_Shared.tar.gz: Wrote only 2048 of 10240 bytes
tar: Error is not recoverable: exiting now
tar: Removing leading `/' from member names
tar (child): /mnt/Backup/NewBackups/20110308_065435/20110308_065435_UserShares.tar.gz: Cannot open: Input/output error
tar (child): Error is not recoverable: exiting now
/home/UserShares/
/home/UserShares/CTS/
/home/UserShares/CTS/LYONS/
/home/UserShares/CTS/LYONS/Build Agreement 04th May 2010.pdf
tar: /mnt/Backup/NewBackups/20110308_065435/20110308_065435_UserShares.tar.gz: Cannot write: Broken pipe
tar: Error is not recoverable: exiting now
Shortly after the failure the USB drive reappears unmounted on the system as SCSI device D!
The first few times I ran the backup script it got as far as:
Wrote only 4096 of 10240 bytes
before failing. After which I did some research online and found the following command to disable STANDBY on the USB drive:
Quote:
sdparm --set=STANDBY=0 --long --save /dev/sdc
The current drive settings are as follows:
Quote:
# sdparm -al /dev/sdd
/dev/sdd: Seagate Portable 0130
Direct access device specific parameters: WP=0 DPOFUA=0
Power condition [po] mode page:
IDLE 0 [cha: n, def: 0, sav: 0] Idle timer active
STANDBY 0 [cha: y, def: 1, sav: 0] Standby timer active
ICT 0 [cha: n, def: 0, sav: 0] Idle condition timer (100 ms)
SCT 4294967286 [cha: y, def:3000, sav:4294967286] Standby condition timer (100 ms)
#
The UserShares directory is one I need to back up - it doesn't contain the Linux users' home directories it's just a directory in /home with an smb share of that name.
I'm not convinced this is a backup software issue. As soon as an attempt is made to write more than a small amount of data the USB drive disconnects!
I've since rebooted, cleared the old mountpoint, mounted the USB drive again and run some tests:
Quote:
mount -t ntfs-3g /dev/sdc1 /mnt/backup
I was able to create and edit a file on the USB drive without any problem:
Quote:
touch /mnt/backup/testfile
Next, I thought I would try to see if I could just do a straight copy of one of the directories I need to backup:
Quote:
# cd /mnt/backup
# pwd
/mnt/backup
# cd NewBackups
# pwd
/mnt/backup/NewBackups
# mkdir 20110315_072940
# ls -l
total 0
drwxrwxrwx 1 root root 0 Mar 8 02:03 20110308_020325
drwxrwxrwx 1 root root 0 Mar 15 07:29 20110315_072940
# cd 20110315_072940
# cp -r /home/UserShares .
Within a few seconds I got the same error as before:
I then logged into webmin and checked the Hardware > Partitions on Local Disks section and found the USB drive appearing now as SCSI device D instead of SCSI device C which it was displaying originally.
I checked /var/log/messages:
Quote:
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291306] usb 1-1: USB disconnect, address 2
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291605] sd 2:0:0:0: [sdc] Unhandled error code
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291609] sd 2:0:0:0: [sdc] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291616] sd 2:0:0:0: [sdc] CDB: Write(10): 2a 00 44 d5 fa 6f 00 00 50 00
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291690] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291724] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291751] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291778] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291804] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291831] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291858] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291884] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291911] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.291937] lost page write due to I/O error on sdc1
Mar 15 07:31:09 debsrv-mustang kernel: [19432.296107] sd 2:0:0:0: [sdc] Unhandled error code
Mar 15 07:31:09 debsrv-mustang kernel: [19432.296112] sd 2:0:0:0: [sdc] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Mar 15 07:31:09 debsrv-mustang kernel: [19432.296118] sd 2:0:0:0: [sdc] CDB: Write(10): 2a 00 45 44 ee 8f 00 00 f0 00
Mar 15 07:31:28 debsrv-mustang kernel: [19452.052047] usb 1-1: new full speed USB device using uhci_hcd and address 3
Mar 15 07:31:29 debsrv-mustang kernel: [19452.220023] usb 1-1: New USB device found, idVendor=0bc2, idProduct=2300
Mar 15 07:31:29 debsrv-mustang kernel: [19452.220028] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 15 07:31:29 debsrv-mustang kernel: [19452.220033] usb 1-1: Product: Portable
Mar 15 07:31:29 debsrv-mustang kernel: [19452.220036] usb 1-1: Manufacturer: Seagate
Mar 15 07:31:29 debsrv-mustang kernel: [19452.220039] usb 1-1: SerialNumber: 2GH5QJ2G
Mar 15 07:31:29 debsrv-mustang kernel: [19452.220216] usb 1-1: configuration #1 chosen from 1 choice
Mar 15 07:31:29 debsrv-mustang kernel: [19452.222391] scsi3 : SCSI emulation for USB Mass Storage devices
Mar 15 07:31:34 debsrv-mustang kernel: [19457.224477] scsi 3:0:0:0: Direct-Access Seagate Portable 0130 PQ: 0 ANSI: 4
Mar 15 07:31:34 debsrv-mustang kernel: [19457.227046] sd 3:0:0:0: Attached scsi generic sg4 type 0
Mar 15 07:31:34 debsrv-mustang kernel: [19457.233219] sd 3:0:0:0: [sdd] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
Mar 15 07:31:34 debsrv-mustang kernel: [19457.236381] sd 3:0:0:0: [sdd] Write Protect is off
Mar 15 07:31:34 debsrv-mustang kernel: [19457.244217] sdd: sdd1
Mar 15 07:31:34 debsrv-mustang kernel: [19457.299197] sd 3:0:0:0: [sdd] Attached SCSI disk
The USB drive was bought a few weeks ago and has had no trouble being used to run backups under SBS2008.
I would be grateful if anyone has any ideas what I can do to get the backups working to the USB drive.
Device Boot Start End Blocks Id System
/dev/sdd1 1 121601 976760001 7 HPFS/NTFS
# mount -t ntfs /dev/sdd1 /mnt/backup -o umask=0,nls=utf8
$MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/sdd1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
#
As I am accessing this server remotely it is not possible for me to remove the drive and add it to a Windows PC to run chkdsk /f.
I tried rebooting the server to make sure there was nothing held over from the last ntfs-3g mount/read/write failure and then attempted the ntfs mount operation again with the same result:
Device Boot Start End Blocks Id System
/dev/sdc1 1 121601 976760001 7 HPFS/NTFS
#
# mount -t ntfs /dev/sdc1 /mnt/backup -o umask=0,nls=utf8
$MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/sdc1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
#
n.B. You will note that the drive was reassigned to sdc on reboot!
The only reason I wanted to keep the drive in ntfs format is to make sure the drive can be attached to a Windows PC later on to access the data as required.
I'm not sure if wiping the drive and formatting it as ext3 would resolve this issue. But then, if I do, how would I access the contents of the drive with a Windows PC?
Unfortunately, I do not have physical access to the server - only remote access unless I travel to the site of the server.
In any case, if there was a problem with the system's RAM wouldn't the users also be experiencing problems working on and saving their the data to the server?
They don't appear to be having problems in that respect.
As regards the kernel logging attached is a .zip file containing excerpts from recent syslog files that I hope might provide some insight into what is going on.
I may be wrong, but it looks like the drive is dropping the connection to me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.