Solved

How should I mount this 3 TB USB Hard disk to my Linux server?

Posted on 2016-10-11
9
74 Views
Last Modified: 2016-10-12
This is using Redhat Enterprise Linux Server 6.7. There is only a pair of 300 GB SAS HDD in mirror, plus 2 NAS mapping. However, we wanted to connect a 3 TB USB Hard Disk in order to conduct  backup. The problem,  we don't know how to mount this 3 TB HDD. It looks like this external HDD was detected with correct capacity. But still, what is the next step to get it connected so that we can dump the backup into it?

Please see the attached screenshots for the results of few checking commands.

Thanks in advance.
EE---3-TB-USB-HDD-issue.docx
0
Comment
Question by:MichaelBalack
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 50

Expert Comment

by:Steve Bink
ID: 41839296
I see it alternately detected as /dev/sda2 and /dev/sdb.  Either way, mount it to a folder of your choosing using the mount utility.
0
 
LVL 44

Expert Comment

by:Darr247
ID: 41839317
I recommend mounting it to a location by GUID in the /etc/fstab (file system table) file, so every time that drive's inserted into the USB dock again RHEL will remount it to the same location for you.
0
 
LVL 39

Expert Comment

by:noci
ID: 41839507
After detecting the drive you need to partition it. if to be used as one lump use gdisk or parted
to make the partitions. To keep it flexible in handing out portions of a disk use lvm
(pvcreate, vgcreate, lvcreate) to set it up.
then format the drive (ext4, xfs, ... not zfs as that is not been declared stable yet)

Then you can mount the device.  After that you have to setup and entry in fstab to remount it on next boot.

Any questions about the specific steps?
I mentioned the tools to be used man <tool>   will use the needed info.... if you just want a plain recipe that can be done as well, but you will need to know some of the tools to be able to manage the volume in the future when a mishap occurs ...
0
 
LVL 44

Expert Comment

by:Darr247
ID: 41840441
Running mount -a will also try to mount everything listed in /etc/fstab (i.e. not just at boot time).

By the way, on the next install, put the admin(s) in the /etc/sudoers file, then anytime root-level access is required the admin(s) can just prefix the sudo command and enter their user password... that should allow keeping SELinux in enforcement mode and remove the need to ever have to run *as* root (nor employ/reveal the root password). On initial install, running *as* root is very-rarely (if ever) required. Once you actually switch to the root user and install a few packages, the system becomes more and more dependent on running as root, until eventually that's the only way it will run.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Author Comment

by:MichaelBalack
ID: 41840516
Hi Darr247,

This usb device is only needed to be mounted when needed, probably once per every 2 weeks. So, think not need to set anything on /etc/fstab.

I managed to mount it by "mount -t ext4 /dev/sdb1 /USB3T. Tried able to copy files and folder into this 3TB USB.
0
 
LVL 39

Accepted Solution

by:
noci earned 500 total points
ID: 41841063
@Darr247....
sudo will effectively run a command as root (unless sudo -u someuser  is given).
It just makes the use of a shared root password obsolete.
sudo xxxx
will run the command xxxx as root (UID 0 etc).    so logging in as root or logging in as John Doe and use sudo is equivalent..., except that sudo asks for the password of John Doe, and makes the knowledge of the root password obsolete...., unless you need single usermode during boot, then the root password IS needed).

@michaelbalack: the next time this drive might be named /dev/sdc1 or /dev/sdd1 etc.. depending on the order of plugging in simultanous USB storage devices.  So entering the GUID in /etc/fstab  to mount on /USB3T
might be a wise move, then a backup script can use " mount /USB3T " to mount this device, without knowing the Actual devicename then.
The guid can be found in /dev/disk/by_uuid
and using UUID=xxx-xxxxx-xxxx-xxxx /USB3T ext4 ... etc.
Will make writing script a lot easier.
0
 
LVL 1

Author Closing Comment

by:MichaelBalack
ID: 41841221
Thanks for expert - noci on the suggestion on set the settings in /etc/fstab, it works.
0
 
LVL 44

Expert Comment

by:Darr247
ID: 41841341
When your server gets taken over by hackers 'cause you were running it all the time as root, don't say nobody ever warned you.
0
 
LVL 1

Author Comment

by:MichaelBalack
ID: 41841351
Thanks Darr247 for your advice.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now