LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-08-2010, 11:29 AM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
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?
 
Old 01-08-2010, 11:42 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
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.
 
Old 01-08-2010, 11:42 AM   #3
Mr-Bisquit
Member
 
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Blog Entries: 52

Rep: Reputation: 68
You shouldn't have to do that.
Why not edit it into /etc/fstab?
 
Old 01-08-2010, 12:50 PM   #4
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
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.
 
Old 01-08-2010, 02:11 PM   #5
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
Quote:
Originally Posted by rjo98 View Post
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.
 
Old 01-08-2010, 02:21 PM   #6
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
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.
 
Old 01-08-2010, 02:35 PM   #7
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
Quote:
Originally Posted by rjo98 View Post
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.
 
Old 01-08-2010, 03:14 PM   #8
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
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?
 
Old 01-08-2010, 03:21 PM   #9
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
Quote:
Originally Posted by rjo98 View Post
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??
 
Old 01-08-2010, 04:01 PM   #10
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Thanks, I'll give it a shot, I'll let you know how it went.
 
Old 01-08-2010, 04:28 PM   #11
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Mount: mount point /usbdrive does not exist

What do I do now?
 
Old 01-08-2010, 04:31 PM   #12
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Also, under fdisk for the usb drive, it lists sdd1 and sdd5, assuming I want the fat32 and not ext'd (lba)
 
Old 01-08-2010, 04:36 PM   #13
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
Quote:
Originally Posted by rjo98 View Post
Mount: mount point /usbdrive does not exist

What do I do now?
Code:
mkdir /usbdrive
then mount it again.
 
Old 01-08-2010, 04:37 PM   #14
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
Quote:
Originally Posted by rjo98 View Post
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
 
Old 01-08-2010, 04:48 PM   #15
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lower-casing filenames on fat32 external drive devnull10 Linux - General 2 01-06-2010 03:56 PM
Safely Remove USB External Hard Drive Toods Slackware 12 02-10-2009 02:57 AM
file backup on rehat server to WD my book external usb hard drive justintime24 Linux - Server 2 05-09-2008 12:31 PM
Do I need to defragment an external USB fat32 drive? pwc101 Linux - Software 3 08-22-2007 06:11 PM
USB external drive: NTFS/FAT32 detected, ext3 not blanks77 Linux - Hardware 7 04-25-2006 08:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration