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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-08-2010, 11:29 AM
|
#1
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Rep:
|
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?
|
|
|
01-08-2010, 11:42 AM
|
#2
|
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669
|
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.
|
|
|
01-08-2010, 11:42 AM
|
#3
|
Member
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Rep:
|
You shouldn't have to do that.
Why not edit it into /etc/fstab?
|
|
|
01-08-2010, 12:50 PM
|
#4
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
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.
|
|
|
01-08-2010, 02:11 PM
|
#5
|
Senior Member
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430
Rep:
|
Quote:
Originally Posted by rjo98
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.
|
|
|
01-08-2010, 02:21 PM
|
#6
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
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.
|
|
|
01-08-2010, 02:35 PM
|
#7
|
Senior Member
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430
Rep:
|
Quote:
Originally Posted by rjo98
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.
|
|
|
01-08-2010, 03:14 PM
|
#8
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
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?
|
|
|
01-08-2010, 03:21 PM
|
#9
|
Senior Member
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430
Rep:
|
Quote:
Originally Posted by rjo98
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
|
|
|
01-08-2010, 04:01 PM
|
#10
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
Thanks, I'll give it a shot, I'll let you know how it went.
|
|
|
01-08-2010, 04:28 PM
|
#11
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
Mount: mount point /usbdrive does not exist
What do I do now?
|
|
|
01-08-2010, 04:31 PM
|
#12
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
Also, under fdisk for the usb drive, it lists sdd1 and sdd5, assuming I want the fat32 and not ext'd (lba)
|
|
|
01-08-2010, 04:36 PM
|
#13
|
Senior Member
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430
Rep:
|
Quote:
Originally Posted by rjo98
Mount: mount point /usbdrive does not exist
What do I do now?
|
then mount it again.
|
|
|
01-08-2010, 04:37 PM
|
#14
|
Senior Member
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430
Rep:
|
Quote:
Originally Posted by rjo98
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
|
|
|
01-08-2010, 04:48 PM
|
#15
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
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 07:14 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|