Koozali.org: home of the SME Server

External USB

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
External USB
« on: November 12, 2008, 02:01:32 PM »
    Hi,

    I've read thru the wiki's and howto's and googled about mounting etc.

    Here is the senerio:
    • I had plugged in my usb external drive directly to the server for use with DAR2 as backup.
    • It was working fine for a long time now;and doing regular weekly backups.
    • I had a problem with my webmail and some of the fm_account setting which I received help from the forum in another post on this
    • Because of this problem I was considering doing a restore from backup, since I could not fix this problem with webmail initially
    • I did not want to weekly backup to run and actually copy the problem I was having.So I unplugged the USB temporarily thinking I would restore it later this week
    • The forums helped me with my webmail and accessing the mysql database to repair my problem
    • I then plugged the USB drive backing and now I"m getting backup error emails that the backup job failed

    Email to admin:
Quote
Connecting to /media/usbdisk1
mount: can't find /media/usbdisk1 in /etc/fstab or /etc/mtab
I've since also tried this to just list the drives and see what is there > ls /dev/sda* < and there is nothing there. The USB drive was sda1 and was working perfectly and emails confirmed backup jobs.
I've read thru the DAR2 and USBDISK Wiki's and howto's and noticed the subjects regarding mounting multiple usb drives and such, but according to that, it appears that one single drive should not need to do any of these steps and that it should just automount.

I don't know why simply unplugging the drive then plugging it back in again could cause this. I"ve also rebooted the server, and also turned off the server several times thinking that it may re-initialize or re-mount the drive on it's own.

Any pointers or help on this subject would be great I want to do a backup so I can move to another server since one of my drives is now degraded also.

Thanks[/list]
« Last Edit: November 12, 2008, 02:52:21 PM by Agent86 »

Offline mmccarn

  • *
  • 2,635
  • +10/-0
Re: External USB
« Reply #1 on: November 12, 2008, 07:01:49 PM »
unplugging it without unmounting it may have damaged the file system - so you may not get it re-mounted until you can repair the filesystem using fsck.

Sadly, I don't know how to run fsck on a file system that won't mount...

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Re: External USB
« Reply #2 on: November 12, 2008, 09:16:18 PM »
Really ? I thought USB drives could be plugged in or unplugged anytime ?

I've never had this problem on Windoze surprisingly since it's about the only thing I did like about windoze was the plugin stuff ?

Anyhow perhaps I can unplug it and plug into another destkop with more tools on it, and see if I can mount there first.

Thanks

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: External USB
« Reply #3 on: November 12, 2008, 09:25:27 PM »
If you USB drive has ext3 partitions, those ext3 partitions can be mounted in Windows by using the Windows device driver.

Offline Stefano

  • *
  • 10,841
  • +2/-0
Re: External USB
« Reply #4 on: November 12, 2008, 09:48:57 PM »
I've never had this problem on Windoze surprisingly since it's about the only thing I did like about windoze was the plugin stuff ?

Hi

you can consider yourself lucky, because unplugging without umounting properly a usb drive is dangerous ALSO on windows :)

ciao
Stefano

Offline akhilmathema

  • **
  • 42
  • +0/-0
Re: External USB
« Reply #5 on: November 13, 2008, 02:03:04 AM »
    Hi,

    I've read thru the wiki's and howto's and googled about mounting etc.

    Here is the senerio:
    • I had plugged in my usb external drive directly to the server for use with DAR2 as backup.
    • It was working fine for a long time now;and doing regular weekly backups.
    • I had a problem with my webmail and some of the fm_account setting which I received help from the forum in another post on this
    • Because of this problem I was considering doing a restore from backup, since I could not fix this problem with webmail initially
    • I did not want to weekly backup to run and actually copy the problem I was having.So I unplugged the USB temporarily thinking I would restore it later this week
    • The forums helped me with my webmail and accessing the mysql database to repair my problem
    • I then plugged the USB drive backing and now I"m getting backup error emails that the backup job failed

    Email to admin:I've since also tried this to just list the drives and see what is there > ls /dev/sda* < and there is nothing there. The USB drive was sda1 and was working perfectly and emails confirmed backup jobs.
    I've read thru the DAR2 and USBDISK Wiki's and howto's and noticed the subjects regarding mounting multiple usb drives and such, but according to that, it appears that one single drive should not need to do any of these steps and that it should just automount.

    I don't know why simply unplugging the drive then plugging it back in again could cause this. I"ve also rebooted the server, and also turned off the server several times thinking that it may re-initialize or re-mount the drive on it's own.

    Any pointers or help on this subject would be great I want to do a backup so I can move to another server since one of my drives is now degraded also.

    Thanks


Verify if the USB drive is recognized by the SME server
# dmesg
If listed, check the list of all drives connected to the system
# fdisk -l
Track down the partition for usb-drive (sda,sdb ..)
Make sure the usb-drive is UNMOUNTED
If the partition is ext3,
# fsck -y /dev/sda |sdb |sdc

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Re: External USB
« Reply #6 on: November 13, 2008, 02:21:42 AM »
akhilmathema- Thanks
And thanks to all,

I've got this fixed now, I did not know many more commands prior to your post. I was able to plug the usb device into my Ubuntu computer and ran Gparted or Gnome partition. The device did not come up at first and I did not know why so I double checked the connection. Didn't really do anything but push on the connection to see if it was pushed in all the way. It was pushed in, but still must have had some continuity issue because then the USB drive automounted and came up on my screen. So as it turns out I may have had a connection problem.

I don't know why since I've check this about 10 times because I didn't know enough to check much of anything else, but after running a check from Ubuntu, I unmounted and plugged the drive back into SME server and working fine once again.

I wonder if there is a way to run a Live CD of Gparted or some other Live CD with GUI tools. But on the SME server while SME is running ?

Probably too complicated to get working also.

Thanks again for all the help I will still check out your suggested commands in case I have this problem again in the future.



 
« Last Edit: November 13, 2008, 02:29:29 AM by Agent86 »

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Re: External USB
« Reply #7 on: November 13, 2008, 03:47:42 PM »
One more question about DAR2 and External USB's

From the server-manager, If I manually perform a backup should I recieve an email of the backup job report as with a daily or weekly scheduled backup job ?

Please advise
Thanks

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: External USB
« Reply #8 on: November 13, 2008, 05:36:23 PM »
I know that there are quite a few doing it but I would not use USB drives for backup. The MOUNT / UNMOUNT issue is just a bit too flaky and can leave a directory on the local disk which the backup program thinks is the USB drive. It will then back up with no errors but the backup just goes back on the local disk instead of to the USB disk.

Offline petero

  • 1
  • +0/-0
Re: External USB
« Reply #9 on: May 07, 2009, 12:27:58 PM »
I had the problem of filling my hard drive because my USB drive didn't mount. Now I have the following check in place:

mount /dev/sdc1 /media/usbdrive
# Test USB Drive Mounted - otherwise local hard drive will fill up!!!
if [ $? -ne 0 ]
then
        echo "No USB Drive"
        exit
fi