LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 09: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, 09: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, 10: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, 10: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, 10:38 AM   #20
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
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, 10:45 AM   #21
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
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 10:52 AM.
 
Old 02-14-2013, 12:33 PM   #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 12:36 PM.
 
Old 02-14-2013, 12:38 PM   #23
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
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, 12:42 PM   #24
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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 12:47 PM.
 
1 members found this post helpful.
Old 02-14-2013, 01: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, 03: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


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
Issue with two hard-drives, CentOS 6 and Ubuntu on each vrkrao Linux - Software 5 09-13-2011 04: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 05:12 PM
centos 5 install - sata drives stecjohn Linux - Hardware 1 09-12-2007 06:34 AM
Mounting Drives in Centos SBN Linux - General 1 05-04-2007 12:31 AM
Mount USB drives in centOS chanakasri Linux - Newbie 2 02-12-2007 02:41 AM


All times are GMT -5. The time now is 06:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration