LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-12-2013, 01:55 PM   #1
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Rep: Reputation: Disabled
how do i change drives (centos 6.3)


dumb question, but I can't seem to find an answer.
I have another drive volume called "apps" and a couple of directories inside it.
My question is: From the command line, how do I change the drive and directory?
I've tried
cd /apps
cd /apps/

thanks!
 
Old 02-12-2013, 02:02 PM   #2
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
Has the drive been mounted yet?

Post the output of "fdisk -l" and "df -h"
 
Old 02-12-2013, 02:30 PM   #3
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,126
Blog Entries: 1

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
Hi

Should that be
Code:
sudo fdisk -l
Also try mount
 
Old 02-12-2013, 02:51 PM   #4
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 spiky0011 View Post
Hi

Should that be
Code:
sudo fdisk -l
Also try mount
centOS doesn't use sudo by default, he'll need to be root.
 
Old 02-12-2013, 03:01 PM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,126
Blog Entries: 1

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
Sorry I just got mine set for sudo
 
Old 02-12-2013, 03:25 PM   #6
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Disk /dev/sdb: 299.4 GB, 299439751168 bytes
255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d62e5

Device Boot Start End Blocks Id System
/dev/sdb1 1 36404 292415098+ 83 Linux

Disk /dev/sda: 299.4 GB, 299439751168 bytes
255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b87ae

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 36405 291908608 8e Linux LVM

Disk /dev/mapper/vg_nbweb-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_nbweb-lv_swap: 8422 MB, 8422162432 bytes
255 heads, 63 sectors/track, 1023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_nbweb-lv_home: 236.8 GB, 236802015232 bytes
255 heads, 63 sectors/track, 28789 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
 
Old 02-12-2013, 03:57 PM   #7
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
And the output of "df -h" or "mount"?
 
Old 02-12-2013, 04:49 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
I take it you did not add the this partition or drive to the "fstab" file ?

even if you did not CentOS 6.3 using Gnome2
it "should" be auto mounted by autofs on boot
and listen in Nautilus ( on the left side window )
/media/????something , but after you click on it in Nautilus.

if i had to guess it might be "/dev/sdb1"
Code:
su -
---- your root password when asked ---
mkdir /mnt/apps
mount /dev/sdb1 /mnt/apps
 
Old 02-13-2013, 03:51 PM   #9
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
The second drive was under /media/Apps/
is this an alias?
 
Old 02-13-2013, 03:57 PM   #10
Dman58
Member
 
Registered: Nov 2010
Location: The Danger Zone
Distribution: Slackware & everything else in a VM
Posts: 286

Rep: Reputation: 29
No this is a mount point you should read this for better understanding. Or google linux mount in general.
 
Old 02-13-2013, 04:34 PM   #11
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
The second drive was under /media/Apps/
is this an alias?
This comes down to a fundamental difference between Windows and Linux.

In Windows, all drives have their own, unique directory structure. The root of that directory structure is C:\, D:\, etc. All drives are separate.

In Linux, there is ONE directory structure, with a root at /. All drives are mounted somewhere inside this directory structure. Where they're mounted is up to you. You can mount an external drive at /media, or /mnt, or /home, or /this/is/where/i/want/to/mount/my/drive/thank/you/very/much. It is completely up to you. Your drive was auto-mounted by the operating system in a subdirectory of /media, which is pretty common, however there's no real reason for it to be there. You could umount it and then remount it anywhere in the directory structure that you like. /etc/fstab is the file that controls where various drives are mounted (and with what options) when the system boots up.
 
Old 02-13-2013, 04:47 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
You named the drive ( or partition )

when you formatted it you gave it a name

I do that for a large drive i use between two different os's
mine though is called "DATA"

You can mount it by name , ordevice ID, or any of a few options .

for say a usb back up drive ( like one of the 3 terabit drives )
mounting it by it's device id allows it to be plugged into ANY usb port and always be mounted in the SAME place and by the same name

some reading that might be helpful
http://wiki.centos.org/TipsAndTricks/GnomeAutomount
centos 6.3 is using udev ( along with "init" )

if you go beyond simple fstab settings and into udev -- it is not hard but just a bit complex
http://www.reactivated.net/writing_udev_rules.html

a VERY VERY good source for information is ( believe it or not )
" The Arch Linux wiki"
https://wiki.archlinux.org/index.php/Udev

it works for many different distros
https://wiki.archlinux.org/index.php/Table_of_Contents

and is VERY well written

Last edited by John VV; 02-13-2013 at 04:49 PM.
 
Old 02-14-2013, 08:15 AM   #13
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Thanks all. Looks like the Apps volume (what it was named) disappeared after a reboot.
I'm going to have to do some more reading on how to have drives mounted at boot up.
 
Old 02-14-2013, 08:23 AM   #14
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
okay, i see what's going on: Gnome mounts the volume if logging in to a desktop and it stays mounted until the next reboot. However, Linux does not mount the volume on its own (unless I connect to the desktop first), so I need to figure out how to have it mount the volume w/o needing to login to the desktop first.
 
Old 02-14-2013, 08:58 AM   #15
beefydog
Member
 
Registered: Feb 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
okay, I looked into fstab and the volume is not there, so then I ran the df -a command and found that the 299GB hard drive (actually hardware RAID1) is not even listed.
UGH!
Losing hair fast. What to do next...
 
  


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 02:34 AM.

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