Page 1 of 1

New drive [Solved]

Posted: Thu Nov 24, 2005 4:27 pm
by josh
I am trying to add a new drive to my fedora core 4 box, before I added it I had 2 X 400Gb SATA drives (NON-Raid).

From what it looks like fedora automatically detected the first 2 drives while I was installing it, and mounted them both as a logical volume on /

Code: Select all

[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      721G  1.3G  683G   1% /
/dev/sda1              99M   15M   79M  16% /boot
/dev/shm              245M     0  245M   0% /dev/shm
Here is the new disk I just installed and used fdisk to partition

Code: Select all

Disk /dev/sdc: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       48641   390708801   83  Linux
df is still showing root ( / ) to be 800 Gbs, but I have now 1.2TR of drives in the box, I'm guessing I have to do something to mount it or add it to LVM

Please be nice I'm new at this :-)

Posted: Thu Nov 24, 2005 6:01 pm
by pickle
I've never done this myself, but I talked with a co-worker about this very topic this morning. He said that ya, you have to mount the drives. You also need to put a line in the startup script that will mount it at every boot.

Posted: Thu Nov 24, 2005 6:30 pm
by Chris Corbyn
You need to edit /etc/fstab to include that drive. I could talk you through it but if you open the file and do some copying & pasting with a bit of editting you'll get it. That's to mount the drive at startup among a handful of other less important things.

You could just mount it while the OS is running by running the following but it won't stick after reboot:

Code: Select all

mkdir /mnt/new-drive     #optional
mount /dev/sdc1   /mnt/new-drive   #try just /dev/sdc if that fails
df -h   #Yippee... new drive :)
If you need help editting you fstab just ask :)

EDIT | Doh! Mis-understood you sorry. You want to just *add* it to the existing space on / ? Never done that sorry :?

Posted: Thu Nov 24, 2005 8:14 pm
by josh
d11wtq wrote:EDIT | Doh! Mis-understood you sorry. You want to just *add* it to the existing space on / ? Never done that sorry :?
Yeah, I did some googling and it looks like I need to use something called LVM, I found the docs but I'm stuck


Heres my physical volumes

Code: Select all

[root@localhost ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               372.50 GB / not usable 0
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              11920
  Free PE               0
  Allocated PE          11920
  PV UUID               1NQ7gW-Zk56-2C1v-Xvy1-Vhxw-ckXt-Y6kmoe

  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               VolGroup00
  PV Size               372.59 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              11923
  Free PE               2
  Allocated PE          11921
  PV UUID               VjnV3a-Bo1a-q3xw-ddyr-24hN-ey8F-50K6Va

  --- Physical volume ---
  PV Name               /dev/sdc1
  VG Name               VolGroup00
  PV Size               372.59 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              11923
  Free PE               11923
  Allocated PE          0
  PV UUID               qMP8Vy-sqN0-P6WL-Ck82-4Fl4-9yJi-92XD8C


But my third disk got added to the wrong logical volume it looks like

Code: Select all

[root@localhost ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                64tpc9-uVNH-qG9w-tf2p-jJjw-ZlaS-76PM0m
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                744.06 GB
  Current LE             23810
  Segments               2
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
  LV UUID                5DWUAN-1EFX-VqST-MV6w-Or2v-lHhs-hsXoW3
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                992.00 MB
  Current LE             31
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1
Here's the documentation I've been going by http://www.tldp.org/HOWTO/LVM-HOWTO/index.html

I was trying to extend my volume

Code: Select all

[root@localhost ~]# lvextend -L+400G /dev/VolGroup00/LogVol00
  Extending logical volume LogVol00 to 1.12 TB
  Insufficient allocatable logical extents (35735) for logical volume LogVol00: 36610 required
It looks like it's trying to take it from somewhere other then my third drive, if anyone could shed a little light as to what I did / am doing wrong it'd be much appreciated.



EDIT Solved the issue thanks to this very informative tutorial

Edit: Maybe not, I thought it was becase

Code: Select all

[root@localhost ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                64tpc9-uVNH-qG9w-tf2p-jJjw-ZlaS-76PM0m
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.09 TB
  Current LE             35714
  Segments               4
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

but df -h shows a size of 721GB still


Triple edit: 4 hours of google turned up http://forums.teamphoenixrising.net/sho ... hp?t=32150 which did the trick!!!

Posted: Fri Nov 25, 2005 6:36 am
by Chris Corbyn
Sweet. I'll have to play around with this. I'm curious what happens if one drive fails? You just have less space or does it cuase major issues once you've started saving stuff on all drives?

Posted: Fri Nov 25, 2005 9:11 am
by josh
d11wtq wrote:major issues