LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-11-2010, 03:44 PM   #1
zimbot
Member
 
Registered: Nov 2005
Location: cincinnati , ohio . USA
Distribution: ubuntu , Opensuse , CentOS
Posts: 122

Rep: Reputation: 17
add a second hard drive centOS 5.3


Friends,

I wish to add a second hard drive

I have 4 x 36 GB drives raid 5 as 1 110 GB HD

and 2 x 18 GB drives raid 1 as 18 GB HD

I of course have the 1st.
But how do i make use - that is mount the second?
How do I Know that it is partitioned and has a filesystem?

I have done some reading - but am unClear.
I think I need this to.
have a partition - have a file system - assign it a lable - created a mount point ( that is mkdir /Data18 , to have this 2nd drive appear as data18 under root ) and then I need to edit the fstab to have it mount every time.


fdisk -l shows

Disk /dev/cciss/c0d0: 109.2 GB, 109244252160 bytes
255 heads, 63 sectors/track, 13281 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 13 104391 83 Linux
/dev/cciss/c0d0p2 14 13281 106575210 8e Linux LVM

Disk /dev/cciss/c0d1: 18.2 GB, 18203197440 bytes
255 heads, 32 sectors/track, 4357 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System

---------------------------------------------------

so _ Disk /dev/cciss/c0d1: 18.2 GB is the 2nd drive
does it have a partition and a fileSystem ?
do i need to make those and if so how?

vgdisplay -v shows



--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 101.62 GB
PE Size 32.00 MB
Total PE 3252
Alloc PE / Size 3252 / 101.62 GB
Free PE / Size 0 / 0
VG UUID OXdvk5-JScL-NCbv-Vj14-IudA-NfGE-rpL6Qp

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID 6HlRaL-bd39-ATGV-VKku-U9hn-v2Uj-81Ccl8
LV Write Access read/write
LV Status available
# open 1
LV Size 97.69 GB
Current LE 3126
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID jjXlwP-LUuu-Zv0i-BXcP-2LYE-lAYA-BONg5e
LV Write Access read/write
LV Status available
# open 1
LV Size 3.94 GB
Current LE 126
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Physical volumes ---
PV Name /dev/cciss/c0d0p2
PV UUID vBs8e4-A48O-yXbm-V6F8-nTKq-qTD3-wXxTU1
PV Status allocatable
Total PE / Free PE 3252 / 0



--------------------
Ok , if i nderstand that then the second ( 18GB ) drive is not in the Volume group.

what do i need to do to have the 18 gb drive mount

lable it?

how can i check that it has a file sys / partition already

and mount it - where? maybe lable it data18 , do a mkdir of data18
and then edit fstab so that data18 always gets mounted?


a lot of what i have found on the web refer to dev/sdb
but I have this /dev/cciss/c0d1 ( that is all it takes to conFuse me...)

thanks
 
Old 02-11-2010, 04:57 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,418

Rep: Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085
This is correct:
Quote:
have a partition - have a file system - assign it a lable - created a mount point ( that is mkdir /Data18 , to have this 2nd drive appear as data18 under root ) and then I need to edit the fstab to have it mount every time.
The qn is, do you want to add it to the vg & lv, or is it going to be separate?
The actual sequence of operations is different.
 
Old 02-12-2010, 12:12 PM   #3
zimbot
Member
 
Registered: Nov 2005
Location: cincinnati , ohio . USA
Distribution: ubuntu , Opensuse , CentOS
Posts: 122

Original Poster
Rep: Reputation: 17
reagrding
"vg & lv, or is it going to be separate?"

which ever you suggest - and just pick one and help me to understand how to 'get there'...
I do not currently have the level of understanding to say...
I reckon i do not know the difference. I suppose I will read up on that later. I am cool with separate to give an answer.
 
Old 02-12-2010, 06:33 PM   #4
adam999
Member
 
Registered: Sep 2006
Posts: 102

Rep: Reputation: 18
Hi, Do u want this as a separate partition or are u extending an existing volume?
 
Old 02-12-2010, 06:51 PM   #5
zimbot
Member
 
Registered: Nov 2005
Location: cincinnati , ohio . USA
Distribution: ubuntu , Opensuse , CentOS
Posts: 122

Original Poster
Rep: Reputation: 17
well it is a different physical drive so a separate partition.

i am uncertian as to if the 18 GB drive currently has a partiion & has a file system -- I think i need to be able to see that.

and then i need a mkdir , maybe under root (/data18) or under mnt (/mnt/data18) and then lable this 18GB partition as something like data18 ... i can mount it.. and if i can do that then i put the same 'stuff' in fstab so that it automounts..

just a wee fuzzy on the details ya see.

fdisk -l shows

Disk /dev/cciss/c0d1: 18.2 GB, 18203197440 bytes
255 heads, 32 sectors/track, 4357 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

so is /dev/cciss/c0d1 got a partition and a file sys and do i need to lable it? how ? and do a mkdir as a 'place ' to mount it?

you see?
 
Old 02-12-2010, 07:15 PM   #6
adam999
Member
 
Registered: Sep 2006
Posts: 102

Rep: Reputation: 18
Quote:
Originally Posted by zimbot View Post
well it is a different physical drive so a separate partition.
with LVM you can extend the logical volume with extra physical volumes then you can extend your partition

Run this:
Code:
pvcreate /dev/cciss/c0d1
vgextend VolGroup00 /dev/cciss/c0d1
lvcreate -L 18G VolGroup00 -n LogVol02
mkfs.ext3 /dev/mapper/VolGroup00-LogVol02
mount /dev/mapper/VolGroup00-LogVol02 /Data18

Last edited by adam999; 02-12-2010 at 07:17 PM.
 
Old 02-13-2010, 01:54 PM   #7
zimbot
Member
 
Registered: Nov 2005
Location: cincinnati , ohio . USA
Distribution: ubuntu , Opensuse , CentOS
Posts: 122

Original Poster
Rep: Reputation: 17
I will give that a try !

reckon i need to read about
pvcreate
vgextend

fuzzy on this part
VolGroup00 /dev/cciss/c0d1
lvcreate -L 18G VolGroup00 -n LogVol02

i think i understand this part
so the below makes the file system ( etx3 - it is linux )
mkfs.ext3 /dev/mapper/VolGroup00-LogVol02

and then THAT gets mounted as /Data18
mount /dev/mapper/VolGroup00-LogVol02 /Data18

thanks - i hope to try it soon
 
Old 02-16-2010, 10:02 AM   #8
zimbot
Member
 
Registered: Nov 2005
Location: cincinnati , ohio . USA
Distribution: ubuntu , Opensuse , CentOS
Posts: 122

Original Poster
Rep: Reputation: 17
Friend,

i tired
pvcreate /dev/cciss/c0d1
vgextend VolGroup00 /dev/cciss/c0d1
at each of the above - it seemed to respond happily

but at this step it complained that

lvcreate -L 18G VolGroup00 -n LogVol02

insufficient free extents (542) in Volume group VolGroup00 : 576 required

and i went no further --
any suggestions? does that mean it failed?

( did not go further with )
mkfs.ext3 /dev/mapper/VolGroup00-LogVol02
mount /dev/mapper/VolGroup00-LogVol02 /Data18
 
Old 02-16-2010, 05:17 PM   #9
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,418

Rep: Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085
No worries, it just means that after the relevant pv/vg hdrs have been added, you've got slightly less than 18GB avail ( = 576 extents).
Just ask for 542 extents using -l (lower L) switch thus

lvcreate -l 542 -n LogVol02 VolGroup00

and on you go
 
Old 02-17-2010, 10:11 AM   #10
zimbot
Member
 
Registered: Nov 2005
Location: cincinnati , ohio . USA
Distribution: ubuntu , Opensuse , CentOS
Posts: 122

Original Poster
Rep: Reputation: 17
ok - so i did

pvcreate /dev/cciss/c0d1
vgextend VolGroup00 /dev/cciss/c0d1
and all that seemed fine

lvcreate -L 18G VolGroup00 -n LogVol02
the above failed with the
insufficent free extents ( 542) in Volume Group VolGroup00 : 576 requireds.

so I did
lvcreate -l 542 -n LogVol02 VolGroup00

and that seemed happy

but then when I tried
mkfs.ext3 /dev/mapper/VolGroup00-LogVol02 /data18

I got a complaint of
invalid Blocks count - /data18
OPPS! my error

i did
mkfs.ext3 /dev/mapper/VolGroup00-LogVol02
and it seemed happy wrote out some num -- reckon that is block counting

super blocks stored in blocks -- and it gave 10 6 digit nums
writing superblocks and filesystem accounting info

mount /dev/mapper/VolGroup00-LogVol02 /data18
that fails -- again - it's me
did a
mkdir /data18

then

mount /dev/mapper/VolGroup00-LogVol02 /data18

and > presto < that shows the drive right where it should be..

so -- thanks to all!

now a few more qs
should i worry about permissions?

and what - exactly do i put in my fstab so that it automatically mounts on reboot

thanks again!!
 
Old 02-17-2010, 07:00 PM   #11
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,418

Rep: Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085
Compare (using cat)

/etc/fstab

with

/etc/mtab

(NEVER edit mtab)

or just run the mount cmd.

fstab is what you edit to ask the system to always mount (ie what you WANT mounted at boot). mtab lists what IS currently mounted. The mount cmd, without options will show you an alternative view of the same thing as mtab.
 
Old 02-18-2010, 08:42 AM   #12
zimbot
Member
 
Registered: Nov 2005
Location: cincinnati , ohio . USA
Distribution: ubuntu , Opensuse , CentOS
Posts: 122

Original Poster
Rep: Reputation: 17
compare with cat?
i never heard of such a thing...
reckon i might doEn some googlEn....
but if i understand the broadstrokes here.

look at /etc/mtab
( i might just open (( not edit )) it w gedit )

and look at /etc/fstab

and I will expect to find a ...something like ....

mount /dev/mapper/VolGroup00-LogVol02 /data18

in mtab -- and if so

PUT that ...something...

into /etc/fstab and for that I will be using gedit , save and done.

ya think?

this has been exciting and a real learning experience - the best part is getting the Good advice - that leads to "what to read about"
I cannot say i understand it ...all.
But I do know that i know more today - than i did last week.
linuxquestions.org - is a lifesaver ( and more & more a favorite thing )

and it is because of - the people
 
Old 02-18-2010, 05:09 PM   #13
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,418

Rep: Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085
mtab is created/updated on the fly by the kernel/mount cmd. I'd stick to using cat on it.
You've got the general idea though.
Basically you copy the line in fstab from your current LogVol and amend the copy it to use the new Logvol name.
You can get alternate views by cat'ing mtab or running the mount cmd.
 
  


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
Add New Hard Drive L1nuxbug Linux - Hardware 5 06-14-2007 02:55 AM
How to Add a Hard Drive? notooth Linux - Newbie 12 10-26-2005 04:16 PM
Add hard drive Wardy Linux - Newbie 3 01-19-2005 05:34 PM
How to add a hard drive vicvac Linux - Hardware 9 03-18-2004 02:17 PM
add hard drive mnauta Linux - Hardware 1 01-09-2004 04:02 PM


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