Koozali.org: home of the SME Server

USB Harddisk(Seagate & Maxtor) can't access after every reboot (Solved)

Offline David Yip

  • *
  • 18
  • +0/-0
Dear All:

I installed a USB Harddisk for backup.
Vendor: Seagate   Model: FreeAgentDesktop  Rev: 100F

Install & preform the backup is OK but When I reboot the Server.
The server message seems ok

Jul 26 09:39:00 wlserver kernel: usb 1-1: new high speed USB device using address 2
Jul 26 09:39:01 wlserver kernel: Initializing USB Mass Storage driver...
Jul 26 09:39:01 wlserver kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Jul 26 09:39:01 wlserver kernel:   Vendor: Seagate   Model: FreeAgentDesktop  Rev: 100F
Jul 26 09:39:01 wlserver kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Jul 26 09:39:01 wlserver kernel: SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
Jul 26 09:39:01 wlserver kernel: sda: assuming drive cache: write through
Jul 26 09:39:01 wlserver kernel: SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
Jul 26 09:39:01 wlserver kernel: sda: assuming drive cache: write through
Jul 26 09:39:01 wlserver kernel:  sda: sda1
Jul 26 09:39:01 wlserver kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Jul 26 09:39:01 wlserver scsi.agent[12869]: disk at /devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0
Jul 26 09:39:01 wlserver kernel: USB Mass Storage device found at 2
Jul 26 09:39:01 wlserver kernel: usbcore: registered new driver usb-storage
Jul 26 09:39:01 wlserver kernel: USB Mass Storage support registered.
Jul 26 09:39:04 wlserver fstab-sync[12951]: added mount point /media/wlbackup for /dev/sda



but the USB harddisk can't be access with error.
# mount /dev/sda1
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
       or too many mounted file systems


I can make it work via two methods.

Method 1. unplud the USB Harddisk signal & power cable & reconnect again.

Method 2. the server is located in other place. I use SSH issue this two commands
   rmmod usb-storage
   insmod usb-storage

Server message after the commands

Jul 26 12:59:17 wlserver kernel: usbcore: deregistering driver usb-storage
Jul 26 12:59:17 wlserver fstab-sync[4582]: removed mount point /media/wlbackup for /dev/sda1
Jul 26 12:59:17 wlserver kernel: Initializing USB Mass Storage driver...
Jul 26 12:59:17 wlserver kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Jul 26 12:59:28 wlserver kernel:   Vendor: Seagate   Model: FreeAgentDesktop  Rev: 100F
Jul 26 12:59:28 wlserver kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Jul 26 12:59:38 wlserver kernel: SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
Jul 26 12:59:38 wlserver kernel: sda: assuming drive cache: write through
Jul 26 12:59:38 wlserver kernel: SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
Jul 26 12:59:38 wlserver kernel: sda: assuming drive cache: write through
Jul 26 12:59:38 wlserver kernel:  sda: sda1
Jul 26 12:59:38 wlserver kernel: Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
Jul 26 12:59:38 wlserver kernel: USB Mass Storage device found at 2
Jul 26 12:59:38 wlserver kernel: usbcore: registered new driver usb-storage
Jul 26 12:59:38 wlserver kernel: USB Mass Storage support registered.
Jul 26 12:59:38 wlserver scsi.agent[4720]: disk at /devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1:1.0/host1/target1:0:0/1:0:0:0
Jul 26 12:59:38 wlserver fstab-sync[4758]: added mount point /media/wlbackup for /dev/sda1


after method 1 or method 2. I can mount the drive & backup can work.

May I have some fix or edit the config to make USB Drive work just after a reboot.

Thanks in advance!

David Yip
« Last Edit: July 31, 2010, 07:38:11 AM by David Yip »

Offline David Yip

  • *
  • 18
  • +0/-0
Re: USB Harddisk can't access after every reboot
« Reply #1 on: July 26, 2010, 07:56:01 AM »
Dear All:

I find some more info. The USB Drive may be include a sleep function after some idle time. After that, the server can't wake it up & show same error.

mount: wrong fs type, bad option, bad superblock on /dev/sda1,
       or too many mounted file systems

 I can make it work again is performing the commands.

   rmmod usb-storage
   insmod usb-storage

The drive in windows systems is work. Windows can wake it up & continue to work just need wait some more seconds.
Thanks!

David Yip

 

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: USB Harddisk can't access after every reboot
« Reply #2 on: July 26, 2010, 08:42:17 AM »
David Yip

Please lodge a bug report at Bugzilla.
The link is at top of forums.
You will need to create a new account if you have not used bugzilla previously.
The developers and other technical experts will analyse your problem there.
Please provide all the details given in this thread.

Please add the bug report number to this thread for future reference and follow up.
Thank you.
« Last Edit: July 26, 2010, 08:44:20 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline David Yip

  • *
  • 18
  • +0/-0
Re: USB Harddisk can't access after every reboot
« Reply #3 on: July 26, 2010, 06:27:54 PM »
Thank you mary!

I add the problem into Bugzilla with number http://bugs.contribs.org/show_bug.cgi?id=6144.

David Yip

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: USB Harddisk can't access after every reboot
« Reply #4 on: July 26, 2010, 07:55:09 PM »
I installed a USB Harddisk for backup.
Vendor: Seagate   Model: FreeAgentDesktop  Rev: 100F

This drive family is notorious:

http://www.nslu2-linux.org/wiki/FAQ/DealWithAutoSpinDownOnSeagateFreeAgent

Try:

sdparm --command=start /dev/sda

before attempting to access the drive.

Offline David Yip

  • *
  • 18
  • +0/-0
Re: USB Harddisk can't access after every reboot
« Reply #5 on: July 28, 2010, 07:50:45 PM »
Dear CharlieBrady:

Thanks for your reply & instruction. I will try but one things want to ask. I use the USB Harddisk for DAR backup(The SME Default one,workstation backup).

If

sdparm --command=start /dev/sda

is ok for react the harddisk. How can I make it run this command before the schedule backup?

Thanks! & I will let you know the result.

David Yip

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: USB Harddisk can't access after every reboot
« Reply #6 on: July 28, 2010, 08:21:39 PM »
you could:
- create a script and put it into /etc/e-smith/events/actions (name it, for example, usbrecover.sh)
- give it the right permission
Code: [Select]
chmod +x usbrecover.sh
- create a symlink to it in this way:
Code: [Select]
cd /etc/e-smith/events/pre-backup
ln -s /etc/e-smith/events/actions/usbrecover.sh 00usbrecover

it should work

Offline David Yip

  • *
  • 18
  • +0/-0
Re: USB Harddisk can't access after every reboot
« Reply #7 on: July 29, 2010, 06:11:09 AM »
Dear Stefano:

Thanks for you reply. I find a problem is my sme 7.5.1 is not include sdparm. Where can I install it into the server? Is it any yum for this installation.

Thanks!

David Yip

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: USB Harddisk can't access after every reboot
« Reply #8 on: July 29, 2010, 06:24:15 AM »
edited out incorrect details
« Last Edit: July 29, 2010, 07:47:06 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline David Yip

  • *
  • 18
  • +0/-0
Re: USB Harddisk can't access after every reboot
« Reply #9 on: July 29, 2010, 07:07:49 AM »
Dear Mary:

Sorry! I think smartd is not same as sdparm. Is it a wrong link? Or I am wrong, please correct me. Thanks!

I check a numbers of search & make the procedure together is like that. If anyone find this is not correct. Please let me know. Thanks!

*** install sdparm procedure
*** setup dag repository

/sbin/e-smith/db yum_repositories set dag repository \
Name 'Dag - EL4' \
BaseURL 'http://apt.sw.be/redhat/el4/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled

*** update the yum database
signal-event yum-modify

***wait unit yum update is finished. You can use command

ps -A

to see the yum process is still running or not.


*** install sdparm via yum
yum install --enablerepo dag sdparm

***Create a script for start the usb harddisk before backup
pico /etc/e-smith/events/actions/usbrecover.sh

*** put the line into the usbrecover.sh
sdparm --command=start /dev/sda

*** ctrl -X to close & save

*** Change mode of the usbrecover.sh
chmod +x /etc/e-smith/events/actions/usbrecover.sh

***create a symlink to it in this way:
cd /etc/e-smith/events/pre-backup
ln -s /etc/e-smith/events/actions/usbrecover.sh 00usbrecover

Thank you for all who replied to me. This problem encountered for a long time & make the backup not work very well.
Thanks again!

David Yip

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: USB Harddisk can't access after every reboot
« Reply #10 on: July 29, 2010, 07:45:58 AM »
David Yip

Oops, sorry. I have a really bad head cold and my brain was clearly not functioning well today.
Looks like you have it sorted.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline David Yip

  • *
  • 18
  • +0/-0
Dear All:

Thank you for all to reply to me. I do some test and finished. All is normal now & the problem is fixed.

Thank you very much!

God bless you all!

David Yip :P