Jump to content

mount usb hard drive for backups


tomdchi

Recommended Posts

I am running centos 5.2 and I have so far been unable to figure out what to do to have a usb hard drive auto mounted at boot.  If I am logged into xserver as root then it will mount under /media but only if logged in.  I am using this for normal backups and cpanel backups.  I have searched on the net and found very few instructions that deal with this specific setup and have tried them all but nothing has worked.  Can someone please help?

Link to comment
Share on other sites

Try the following:

 

df -h  (shows current mounted disks etc.)

In the above, check to see if your usb key is showing. Check based on size of space on device.

 

If the usb is not mounted automatically, you need to do:

mkdir /mnt

mount /dev/sda1 /mnt  (see if that works)

ls /mnt

 

mount /dev/sda2 /mnt (see if that works)

ls /mnt

 

mount /dev/sdb1 /mnt (see if that works)

Keep trying from sda to sdd etc.

 

-steve

Link to comment
Share on other sites

  • 2 weeks later...

Hello :),

 

First, install autofs on workstation(s).

yum install autofs

 

vi /etc/autofs/auto.master

add

/mnt/auto      /etc/autofs/auto.auto    --timeout=5

 

now vi /etc/autofs/auto.auto

usb                          -fstype=auto                                  :/dev/sda1

add

auto    -fstype=auto    :/dev/sda1

 

restart the autofs

/etc/init.d/autofs restart

8)

 

Try the following:

 

df -h  (shows current mounted disks etc.)

In the above, check to see if your usb key is showing. Check based on size of space on device.

 

If the usb is not mounted automatically, you need to do:

mkdir /mnt

mount /dev/sda1 /mnt  (see if that works)

ls /mnt

 

mount /dev/sda2 /mnt (see if that works)

ls /mnt

 

mount /dev/sdb1 /mnt (see if that works)

Keep trying from sda to sdd etc.

 

-steve

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.