LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-08-2014, 11:31 AM   #1
adrian9af
LQ Newbie
 
Registered: Nov 2014
Posts: 5

Rep: Reputation: Disabled
How to mount an external USB on Redhat/Centos ?


I'm looking at 3TB USB drives from Western Digital, Seagate and Toshiba. It's for backing up a Raid1 configuration. These products all advertise that they are compatible with Windows or Mac OS. What are the steps to re-format and mount for Centos ?
 
Old 11-08-2014, 04:05 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,506

Rep: Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618
just plug it in !!!
it will auto mount


now
you might want to REMOVE the Microsoft software that is PREINSTALLED
and you might want to reformat the drive to ext3 or 4 ( depending on the version of RHEL )
and use GPT and NOT a dos table
or
make three 1TB partitions

I would use a current "Gparted live CD" and reformat the drive with that

Last edited by John VV; 11-08-2014 at 04:06 PM.
 
1 members found this post helpful.
Old 11-08-2014, 09:21 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,523

Rep: Reputation: 3295Reputation: 3295Reputation: 3295Reputation: 3295Reputation: 3295Reputation: 3295Reputation: 3295Reputation: 3295Reputation: 3295Reputation: 3295Reputation: 3295
Hello and welcome to LQ.

Assumes the user has permissions. One may have to add in a user or switch to a user that does have permission to use and access the drive besides permission to format.

Assumes current versions able to use device that size too. If we knew the version and bit length might be better.

RedHat did go to a lot of trouble making great documentation for their distro. The best place is their documentation. I'm having trouble right now but the web site ought to be back up soon. Use web search for terms and seek redhat and centos domains as starting points.
 
1 members found this post helpful.
Old 11-09-2014, 04:01 PM   #4
adrian9af
LQ Newbie
 
Registered: Nov 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you both. I see that CentOS 6.4 is recognizing the new disk as follows:

Disk /dev/sdb: 3000.6 GB, 3000558944256 bytes
255 heads, 63 sectors/track, 45599 cylinders
Units = cylinders of 16065 * 4096 = 65802240 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00028375

Device Boot Start End Blocks Id System
/dev/sdb1 1 45600 2930232320 7 HPFS/NTFS

I'm going to reformat with ext4 & update this thread when done.
 
Old 11-09-2014, 04:35 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,506

Rep: Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618
CentOS 6.4 ???
upgrade ASAP!!!!!!
6.4 is OUT OF DATE!!!!
it was LAST updated in Dec. 2013

it is MISSING almost a full YEARS OF SECURITY UPDATES

-- do not use !!! --


please upgrade to 6.6 ASAP
 
1 members found this post helpful.
Old 11-09-2014, 08:44 PM   #6
adrian9af
LQ Newbie
 
Registered: Nov 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
Smile

This is an old system that i'm testing with on closed network. The new system will run Centos 7.

I noticed that after rebooting with the USB drive attached, it gets assigned as disk /dev/sda instead of /dev/sdb as indicated above when I had plugged in the drive after power up. So for now the drive is mounted as follows.

1. # mkdir /u01
2. # vi /etc/fstab
3. Append the following to the file:
/dev/sda1 /u01 ext4 defaults 0 0
4. # reboot

I probably won't continue to use the /etc/fstab to auto mount because the intent of the USB drive is to backup Raid1 disks that are going in the new system. I think the procedure will be something like:

1. # mkdir backup_drive
2. Connect the USB drive
3. # fdisk -l
4. Get the assigned USB disk name, for example /dev/sdb1
5. # mount -t ext4 /dev/sdb1 /backup_drive
6. Backup files from the Raid1
7. # umount /backup_drive
8. Unplug the USB disk.

Thanks again for the help.
 
Old 11-09-2014, 08:50 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,506

Rep: Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618
cent6 and cent 7
mount drives and usb VERY DIFFERENTLY
VERY DIFFERENTLY !!!
what works on 6 WILL NOT work on 7

it is a systemV VS systemD issue

you can NOT use cent 6 to test things out for cent7 !!!!!

Think of it as using Windows XP sp2
to TEST code for Windows7 !!!
-- it will not work --

Last edited by John VV; 11-09-2014 at 08:53 PM.
 
1 members found this post helpful.
Old 11-09-2014, 09:02 PM   #8
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
If you do not want to get it automounted on boot, add "noauto" option to fstab.
To prevent mess (sda or sdb or sdwhateverelse) mount it by UUID or by LABEL or by PARTUUID
here the sample from my fstab:
Code:
LABEL=GENTOO	/mnt/gentoo	ext4	noauto,noatime 	0 0
When I have to deal with this partition I just run
Code:
# mount LABEL=GENTOO
If you have no label assosiated to your drive, you can set it by e2label

Last edited by Teufel; 11-09-2014 at 09:07 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Not able mount External USB sunilpopaliya Linux - Hardware 4 12-03-2013 10:32 PM
external usb will not mount qwertyjjj Linux - Newbie 10 06-19-2013 02:44 AM
Mount external hard drive to redhat 5 bala06 Linux - Distributions 1 05-17-2012 08:33 PM
[SOLVED] How r/w mount external USB with NTFS automatically within GNOME on CentOS 5.6 PatDB Linux - Desktop 2 04-09-2011 12:56 PM
can't mount external usb hd jnsenit Linux - Hardware 2 12-03-2004 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:00 PM.

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