LinuxQuestions.org
Visit Jeremy's Blog.
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 02-14-2013, 08:12 AM   #16
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled

okay. I found a script that I was able to run to show the unmounted drives (fdisk -l does absolutely nothing, I discovered from other posts on the Internet)

the script:
for DISKLABEL in `find /dev/disk/by-label/ -type l`; do RES=`readlink -f $DISKLABEL`;
grep -q "^$RES" /proc/mounts ||echo "$RES (${DISKLABEL//*\//})"
done

I found that my Apps volume is "/dev/sdb1" - That's a start now, onto editing the fstab file!
 
Old 02-14-2013, 08:46 AM   #17
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
I have a question on fstab - from what I read, my new entry should look like:
/dev/sdb1 /Apps ext4 noatime,nodiratime 0 2

I'm asking here in this forum if this looks okay (I understand a bad fstab file will take the entire system down, so I don't want to screw it up)



#
# /etc/fstab
# Created by anaconda on Thu Jan 31 09:42:08 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_nbweb-lv_root / ext4 defaults 1 1
UUID=7058d77b-b4eb-4e0e-8822-d3aab5742847 /boot ext4 defaults 1 2
/dev/mapper/vg_nbweb-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_nbweb-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
 
Old 02-14-2013, 09:21 AM   #18
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
dang! no luck. Adding the line in my post above to the fstab file and rebooting did nothing.

Is there another file elsewhere that I need to edit to get this volume to mount?
 
Old 02-14-2013, 09:32 AM   #19
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
oh brother. now I get "mount point /Apps does not exist"
when running mount -a command
 
Old 02-14-2013, 09:38 AM   #20
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
In an earlier post, you indicated that you found sdb1 at /media/Apps.
Your last post indicates:

Code:
"mount point /Apps does not exist"
Two posts back, you posted an entry you planned to use showing a mount point of /Apps. That would mean you created a directory named Apps in the / (root) of the filesystem and not under media. Apparently not which is why you get the error. You need to either create Apps in the / of the filesystem or create Apps in /media directory and change your fstab entry.
 
Old 02-14-2013, 09:45 AM   #21
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Wow, slow down and wait for advice.

1) fdisk -l does not do "absolutely nothing", it does exactly what you need. It shows you all of the disks attached to the system and their partitioning layout. Had you looked at the output of fdisk that you posted earlier, you'd see that your drive shows up clear as day.

2) Nothing will show up in /etc/fstab until you put it there, so of course there was no entry for your external drive

3) df only shows you mounted filesystems, it didn't show your drive because your drive wasn't mounted at the time

4) John VV's post from two days ago already told you your external drive was /dev/sdb1, which he got from your fdisk -l output

5) Your error in post #19 tells you exactly what the problem is. You're trying to mount the drive to a directory that does not exist. Either change the mount point to somewhere else that does exist, or create the /Apps directory that you're trying to mount to

6) As John VV said yesterday, you do not want to mount USB drives by their name (eg: /dev/sdb1) because this name will change. Instead you want to mount them by some unique identifier, such as the device ID.

7) Always make a backup of your /etc/fstab file before you start modifying it. That way if you screw something up, you can restore the old version much easier than trying to "undo" your changes in rescue mode.

Last edited by suicidaleggroll; 02-14-2013 at 09:52 AM.
 
Old 02-14-2013, 11:33 AM   #22
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
OK. I didn't realize I had to create a directory that represents the drive, so I create the Apps directory for the Apps volume?

I did put the "/dev/sdb1 /Apps ext4 noatime,nodiratime 0 2" entry in, but did not create an /Apps/ directory. I'll do that now.

Thanks!

Last edited by beefydog; 02-14-2013 at 11:36 AM.
 
Old 02-14-2013, 11:38 AM   #23
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by beefydog View Post
so I create the Apps directory for the Apps volume?
It doesn't have to be called Apps, it can be called whatever you want and located wherever you want. Just make sure that the location where fstab is trying to mount the drive (/Apps in your example) exists. If you want the drive mounted in /media/Apps instead, then change your fstab entry to /media/Apps instead of /Apps, or so on for any other location.
 
Old 02-14-2013, 11:42 AM   #24
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
John VV's post from two days ago already told you your external drive was /dev/sdb1, which he got from your fdisk -l output
this is only a guess , but it is a likely candidate
Quote:
/dev/sda1 * 1 64 512000 83 Linux
but it is also a bootable drive ? ( see the " * " )

mounting with the name is "ok" not the best but can be done

cent 6.3 can mount it using the NAME ( though there might be a bit of a bug on turning off the computer ?? maybe ?? but probably not )

Gnomes auto mount IS auto mounting it AS ( this is VERY important )
/media/Apps
once you click on the link on nautilus's left window

if that is 100% correct
then
make a folder called /mnt/Apps
Code:
su -
--- your root password when asked ---
mkdir /mnt/Apps 
chown /mnt/Apps YourNormalUserName:users /mnt/Apps
replace "YourNormalUserName" with your normal user name

for /dev/sdb1 add this to your /etc/fstab file ( if and this is a big if -- it is formatted as ext4 )
if ext3 use that
if MS's NTFS format use "ntsf-3g" ( should have been auto installed during the cent6 install )
Code:
/dev/sdb1  /mnt/Apps          ext4            defaults        1 0
then reboot

but BACK UP "fstab" FIRST!!!!!!
like this
Code:
su -
cp /etc/fstab /etc/fstab.backup
an error in fstab might not allow the system to boot properly
if that happens booting using the install dvd in "rescue mode "
allows you to easily copy the back up over the one you edited
after the "chroot /mnt/sysimage" bit
you run
Code:
mv /etc/fstab.backup /etc/fstab
Warning:
" /Apps " mounting DIRECTLY to / might cause SELinux to have a fit and toss a "SELinuxTroubleShooter" error
and not mount it --it is an issue of selinux context and user permissions
please use /mnt/Apps ( or even /media/Apps )

Last edited by John VV; 02-14-2013 at 11:47 AM.
 
1 members found this post helpful.
Old 02-14-2013, 12:39 PM   #25
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
crap. I got it to work, but should've kept what gnome was using (I created an Apps directory on the root instead of under mnt or media) as the volume won't mount in Gnome. DOH!
 
Old 02-14-2013, 02:51 PM   #26
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Yay! Got it working now. Tested the user account out. Works okay. I'll save my next question for another post (regarding FTP accounts). Thanks all!
 
  


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
Issue with two hard-drives, CentOS 6 and Ubuntu on each vrkrao Linux - Software 5 09-13-2011 03:59 AM
Booting Centos 5.4 Issue: "CentOS CD Not found in any of the media drives. Please i g.navink Red Hat 1 04-07-2010 04:12 PM
centos 5 install - sata drives stecjohn Linux - Hardware 1 09-12-2007 05:34 AM
Mounting Drives in Centos SBN Linux - General 1 05-03-2007 11:31 PM
Mount USB drives in centOS chanakasri Linux - Newbie 2 02-12-2007 01:41 AM

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

All times are GMT -5. The time now is 09:54 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