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 |
This is correct:
Quote:
The actual sequence of operations is different. |
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. |
Hi, Do u want this as a separate partition or are u extending an existing volume?
|
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? |
Quote:
Run this: Code:
pvcreate /dev/cciss/c0d1 |
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 |
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 |
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 |
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!! |
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. |
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 |
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. |
All times are GMT -5. The time now is 07:40 PM. |