View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 5 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Apr 26, 2008 11:33 am 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
I am seeing a strange issue that I do not understand and is perhaps "just the way it works"... I have two external USB drives that work fine - I mount them to /mnt/USB1 and /mnt/USB2 and complete the backups. My problem is that if, say USB1 finishes first and I umount that drive and turn it off, USB2 fails with "mythserv kernel: scsi 3:0:0:0: rejecting I/O to dead device" errors or "mythserv kernel: journal commit I/O error". It is as if I umounted USB2 also in the middle of a write (which I didn't).

I have tried this with both drives (umounting the other first) with the same result - the syslog reports the error above (and a few others) however, if I do not shutoff either USB drive, everything is fine.

So my questions is - am I doing something wrong? Should I not umount a USB drive when multiples are connected until all activity is finished? And, of course, educate me as to why this is happening - what is the root cause?


Last edited by nbdwt73 on Sun Apr 27, 2008 8:46 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 26, 2008 11:59 pm 
Offline
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
You didn't say what kind of backup software you were running...

It sounds to me like each backup program has something open
on both USB drives. You can test this after the first backup is
complete with something like the following (as root):
Code:
lsof | grep 'USB[12]' | less


You should not be able to umount a drive with files still open on
it so I suspect that you are just "pulling the plug" without a
successful umount after the first backup is complete? Before
pulling the plug on either of these USB drives they should be
unmounted with one of these (possibly need to be root here
too):
Code:
umount  /media/USB1
umount  /media/USB2
I suspect that you will find that it says that it cant' umount it
because it is busy.

Cliff

_________________
R5F27 using R5F1 Nvidia drivers
HD-5500 analog from NTSC Sat Rx, with OTA DVB too
GeForce MX-440 SVideo tvout to a TV
Older dual core 3.4ghz Intel CPU
Asus P5PE-VM Motherboard
2 GB RAM
1 TB LVM2
VirtualBox
Samba


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 27, 2008 7:43 am 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
Thanks for the reply Cliff. I am using a standard rsync... And I agree with you - I should be able to umount the drives. That is why I am asking this question. The umount executes fine - it returns no error or message. It just unmounts the first drive then the second immediately has the problem noted above. I am begining to suspect some sort of journaling issue.

I will look for open files and report back - I didn't do that in my last test...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 27, 2008 7:57 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
And if you are properly unmounting the device then I would guess udev is changing device nodes around on you when you power one of the drives down. I know very little about udev and how to "fix" node/device names to hot-pluggable devices, but a Google for "udev persistent naming" yields many promising hits.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 27, 2008 8:46 pm 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
OK - figured it out. What a pain. Turns out it was a compound issue. First, I did have a journal problem; e2fsck fixed that one. But I still had occasional errors when I powered down the external drives and it seemed to be random. Slowtolearn was right - I had some weird udev issue (udevtest pinpointed it) so I wrote some rules for my external mounts, wrote a script to detect them properly and automate my backups. Now they detect and sync to the correct drives, umount and shutdown.

Much better... Thanks.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu