LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to add and remove an external FAT32 usb drive to RHEL server (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-add-and-remove-an-external-fat32-usb-drive-to-rhel-server-780878/)

anon091 01-08-2010 11:29 AM

How to add and remove an external FAT32 usb drive to RHEL server
 
I need to get a backup copy of a huge directory on one of our RHEL servers. Rather than hook the external USB drive up to my PC and manually copy it all across the network, can I just plug it in to one of my USB ports on the server and rsync it?

I know how to do the rsync, I just don't know how to get the USB drive to show up when I do a df -h and how to properly remove it before unplugging it from the server. this is a live server, so I can't go playing around and possibly mess something up. Can anyone help?

malekmustaq 01-08-2010 11:42 AM

Quote:

can I just plug it in to one of my USB ports on the server and rsync it?
Yes, rsync works either over the network or between local folders. Now this server, is it running a linux or not? To rsync local you have need to --

1. Plug the USB disk, the system must be able to detect it;
2. Mount the disk; check Options must allow an 'rw' permission to write the back up to it, there must be enough space too;
3. Rsync.... (be sure about your Source and Destination disks)

Hope it helps.

Mr-Bisquit 01-08-2010 11:42 AM

You shouldn't have to do that.
Why not edit it into /etc/fstab?

anon091 01-08-2010 12:50 PM

Couple things. One, I only have access to the CLI, no gui on the server.

It's a FAT32 USB drive, 1TB, so it should recognize it I think. The server I want to plug it into is RHEL5.

I'm still at a loss on how to do this.

abefroman 01-08-2010 02:11 PM

Quote:

Originally Posted by rjo98 (Post 3819172)
Couple things. One, I only have access to the CLI, no gui on the server.

It's a FAT32 USB drive, 1TB, so it should recognize it I think. The server I want to plug it into is RHEL5.

I'm still at a loss on how to do this.

You can specify fat32 when you mount it.

anon091 01-08-2010 02:21 PM

My problem is I don't know how to mount or unmount it properly in RHEL's command line. I can do it on my XP PC, but Linux I'm clueless.

abefroman 01-08-2010 02:35 PM

Quote:

Originally Posted by rjo98 (Post 3819277)
My problem is I don't know how to mount or unmount it properly in RHEL's command line. I can do it on my XP PC, but Linux I'm clueless.

Try this:
Code:

mount -tvfat /dev/sd?? /directory
replace ?? with the letter and partition of your usb drive. Try fdisk -l if your not sure.

anon091 01-08-2010 03:14 PM

OK, so I plug the USB drive into my server, then do a fdisk -l to find out what dev it is. then I do mount -tvfat /dev/sd?? /directory

the folder structure was created on my XP PC, so would the directory path be the same as if i went through a windows command prompt or something similar?

Then how do i unmount?

abefroman 01-08-2010 03:21 PM

Quote:

Originally Posted by rjo98 (Post 3819374)
OK, so I plug the USB drive into my server, then do a fdisk -l to find out what dev it is. then I do mount -tvfat /dev/sd?? /directory

the folder structure was created on my XP PC, so would the directory path be the same as if i went through a windows command prompt or something similar?

Then how do i unmount?

Yep! ex:
Code:

mount -tvfat /dev/sda1 /usbdrive
Then to unmount its
Code:

umount /dev/sd??

anon091 01-08-2010 04:01 PM

Thanks, I'll give it a shot, I'll let you know how it went.

anon091 01-08-2010 04:28 PM

Mount: mount point /usbdrive does not exist

What do I do now?

anon091 01-08-2010 04:31 PM

Also, under fdisk for the usb drive, it lists sdd1 and sdd5, assuming I want the fat32 and not ext'd (lba)

abefroman 01-08-2010 04:36 PM

Quote:

Originally Posted by rjo98 (Post 3819473)
Mount: mount point /usbdrive does not exist

What do I do now?

Code:

mkdir /usbdrive
then mount it again.

abefroman 01-08-2010 04:37 PM

Quote:

Originally Posted by rjo98 (Post 3819480)
Also, under fdisk for the usb drive, it lists sdd1 and sdd5, assuming I want the fat32 and not ext'd (lba)

try sdd1 first, if that doesn't have your files, use sdd5

anon091 01-08-2010 04:48 PM

does it matter if i do the mkdir as mkdir /usbdrive or mkdir /dev/usbdrive or mkdir /home/username/usbdrive? is one better or one a huge problem?


All times are GMT -5. The time now is 12:58 PM.