Linux-Noob Forums
problems with two identical hdd's in fcr4 - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Distro Noob (https://www.linux-noob.com/forums/forum-10.html)
+--- Forum: Fedora (https://www.linux-noob.com/forums/forum-94.html)
+---- Forum: Fedora Core Release 4 (https://www.linux-noob.com/forums/forum-42.html)
+---- Thread: problems with two identical hdd's in fcr4 (/thread-2441.html)

Pages: 1 2


problems with two identical hdd's in fcr4 - anyweb - 2005-09-08


hi guys

 

i installed fedora core release 4 on this box (the one that is currently running linux-noob.com) and during the installation i disabled the 2nd hard disc in the bios as the first time round anaconda crapped out when i had both /dev/hda and /dev/hdb selected....

 

anyway, the installation is done and seems to be working nicely (the websites running on it now !) but i'm still unsure about the 2nd hdd and my hard disc usage/space

 

basically there are two 40 gig hdd's, and i would expect df -h to report between 70 and 80 gb of storage... but not so. See below

 

Quote:[root@www ~]# df -hFilesystem            Size  Used Avail Use% Mounted on

/dev/mapper/VolGroup01-LogVol00

                    36G  7.3G 27G  22% /

/dev/hda1              99M 14M 80M  15% /boot

/dev/shm              189M  0  189M 0% /dev/shm
 

next thing to check was fdisk -l

 

see below

Quote:[root@www ~]# fdisk -l 

Disk /dev/hda: 40.0 GB, 40000000000 bytes

255 heads, 63 sectors/track, 4863 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot      Start      End      Blocks Id  System

/dev/hda1 *        1          13      104391 83  Linux

/dev/hda2              14        4863    38957625 8e  Linux LVM

 

Disk /dev/hdb: 40.0 GB, 40020664320 bytes

255 heads, 63 sectors/track, 4865 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot      Start      End      Blocks Id  System

/dev/hdb1 *        1        4865    39078081 8e  Linux LVM
 

looks like both hdd's are in use doesnt it ?

 

ok, how about what is mounted...

 

Quote:[root@www ~]# mount/dev/mapper/VolGroup01-LogVol00 on / type ext3 (rw)

/dev/proc on /proc type proc (rw)

/dev/sys on /sys type sysfs (rw)

/dev/devpts on /dev/pts type devpts (rw,gid=5,mode=620)

/dev/hda1 on /boot type ext3 (rw)

/dev/shm on /dev/shm type tmpfs (rw)

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

automount(pid1849) on /misc type autofs (rw,fd=4,pgrp=1849,minproto=2,maxproto=4)

automount(pid1899) on /net type autofs (rw,fd=4,pgrp=1899,minproto=2,maxproto=4)
 

so, my question is, is the second hdd being used at all, and if so where is the missing 40gb or so of hdd space ?

 

please advise !

 

cheers

anyweb




problems with two identical hdd's in fcr4 - znx - 2005-09-09


Quote:basically there are two 40 gig hdd's, and i would expect df -h to report between 70 and 80 gb of storage... but not so. See below
 

One of the unusual traits of LVM is that you will only see the LV size not the individual partitions.. :)

 

Quote:[root@www ~]# df -hFilesystem            Size  Used Avail Use% Mounted on

/dev/mapper/VolGroup01-LogVol00 36G  7.3G 27G  22% /

...
 

Indeed this indicates that the volgroup doesnt contain the full 80Gb.. so its not there :)

 

Quote:/dev/hda1  *  1        13          104391  83  Linux/dev/hda2      14      4863 38957625  8e  Linux LVM

/dev/hdb1 * 1        4865  39078081 8e  Linux LVM

 

looks like both hdd's are in use doesnt it ?
 

Not in use, but installed yes....

 

Quote:so, my question is, is the second hdd being used at all, and if so where is the missing 40gb or so of hdd space ?
 

Your 40Gb is just sitting on the other disk, unused :)

 

You can do several things, fdisk alter the partition, format, mount and use. This will give you the standard Linux setup.

 

However, since its preped as a LVM partition, lets use it as that. OK, two methods for this as well. You can create a new volgroup and use that new volume group or you can append it to the current volgroup.

 

FIRST!

 



Code:
# pvdisplay /dev/hdb1




 

If it says:

Quote:PV Status available
 

Then we are good to go.. otherwise the PV is in use..

 

 

-- Extending a VolGroup

 

You will most likely need to do this with a LiveCD .. like knoppix etc.. (due to the fact that you need to umount /).

 

Here I assume ext2/ext3.

 



Code:
# pvcreate /dev/hdb1
# vgextend VolGroup01 /dev/hdb1
# lvextend -L+40G /dev/VolGroup01/LogVol00
# umount /dev/VolGroup01/LogVol00                # if mounted!
# resize2fs /dev/VolGroup01/LogVol00




 

-- New VolGroup

 

For this you don't need to umount the system, unless you wish to mount /usr etc on it.. in which case you might need to drop to single user and do it from the console? Anyhoo

 



Code:
# pvcreate /dev/hdb1
# vgcreate NewVolGroupName /dev/hdb1




 

Create a LV the total size of the volgroup



Code:
# vgdisplay NewVolGroupName | grep "Total PE"
... TOTAL PE VALUE ....
# lvcreate -L TOTALPEVALUE -nNewLogVolName NewVolGroupName




 

 

After this.. format the new volume group and mount somewhere:



Code:
# mkfs.ext3 /dev/NewVolGroupName/NewLogVolName
# mount /dev/NewVolGroupName/NewLogVolName /mnt/point




 

 

OK.. this is a run through.. tell me about issues :)




problems with two identical hdd's in fcr4 - anyweb - 2005-09-09


thank you znx for your wonderful insightful reply

 

i really DO value your input here

 

i'll take this one step at a time

 

tried the first command and got the following message (which incidentally i see a simlar message when booting)

 

could be due to the fact the the first attempt at installing fcr4 on this box crapped out when both hda and hdb were selected, next time round i disabled hdb in the bios and it still appeared in anaconda but i only selected hda to install on

 

here's the error

 



Code:
[root@www review]# pvdisplay /dev/hdb1
 Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.
 Couldn't find all physical volumes for volume group VolGroup00.
 Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.
 Couldn't find all physical volumes for volume group VolGroup00.
 format_text: _vg_read failed to read VG VolGroup00
 --- NEW Physical volume ---
 PV Name               /dev/hdb1
 VG Name
 PV Size               46.85 MB
 Allocatable           NO
 PE Size (KByte)       0
 Total PE              0
 Free PE               0
 Allocated PE          0
 PV UUID               P6Axaz-hVhz-5L3k-n7tt-QuA0-4YWp-7XAdXn




 

any ideas ?




problems with two identical hdd's in fcr4 - znx - 2005-09-09


Quote:
Code:
[root@www review]# pvdisplay /dev/hdb1
 Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.
 Couldn't find all physical volumes for volume group VolGroup00.
 Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.
 Couldn't find all physical volumes for volume group VolGroup00.
 format_text: _vg_read failed to read VG VolGroup00
 --- NEW Physical volume ---
 PV Name               /dev/hdb1
 VG Name
 PV Size               46.85 MB
 Allocatable           NO
 PE Size (KByte)       0
 Total PE              0
 Free PE               0
 Allocated PE          0
 PV UUID               P6Axaz-hVhz-5L3k-n7tt-QuA0-4YWp-7XAdXn

<div>


</div>
 

hrmmm, gives me the feeling that it might be a dud hd :( .. but.. lets try these:

 

Check out your VG(s).



Code:
# vgdisplay
# vgscan




 

Check out your PV(s)



Code:
# pvdisplay /dev/hda2
# pvdisplay /dev/hdb1
# pvscan




 

Then the daddy, scan all available partitions:



Code:
# lvmdiskscan




 

 

hopefully those can help us diagnose.

 

Quote:thank you znx for your wonderful insightful replyi really DO value your input here
 

cheers.. wouldnt be here unless i enjoyed it ;)




problems with two identical hdd's in fcr4 - anyweb - 2005-09-10


here you go

 

Quote:[root@www ~]# vgdisplay  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Volume group "VolGroup00" doesn't exist

  --- Volume group ---

  VG Name            VolGroup01

  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            37.12 GB

  PE Size            32.00 MB

  Total PE              1188

  Alloc PE / Size    1187 / 37.09 GB

  Free  PE / Size    1 / 32.00 MB

  VG UUID            fXT7f1-TcRL-7AHO-HhBA-475Q-bkY2-PGmz5I
 

and then

 

Quote:[root@www ~]# vgscan  Reading all physical volumes.  This may take a while...

  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Volume group "VolGroup00" not found

  Found volume group "VolGroup01" using metadata type lvm2
 

 

and

 

Quote:[root@www ~]# pvdisplay /dev/hda2  --- Physical volume ---

  PV Name            /dev/hda2

  VG Name            VolGroup01

  PV Size            37.12 GB / not usable 0

  Allocatable        yes

  PE Size (KByte)    32768

  Total PE              1188

  Free PE            1

  Allocated PE          1187

  PV UUID            Vj7eg5-ZDYq-OvOA-Qr9R-ZEok-fNtp-iGrTlY
 

then

 

Quote:[root@www ~]# pvdisplay /dev/hdb1  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  format_text: _vg_read failed to read VG VolGroup00

  --- NEW Physical volume ---

  PV Name            /dev/hdb1

  VG Name

  PV Size            46.85 MB

  Allocatable        NO

  PE Size (KByte)    0

  Total PE              0

  Free PE            0

  Allocated PE          0

  PV UUID            P6Axaz-hVhz-5L3k-n7tt-QuA0-4YWp-7XAdXn
 

the scan...

 

Quote:[root@www ~]# pvscan  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  PV /dev/hdb1        VG VolGroup00 lvm2 [32.00 MB / 32.00 MB free]

  PV unknown device VG VolGroup00 lvm2 [37.19 GB / 37.19 GB free]

  PV /dev/hda2        VG VolGroup01 lvm2 [37.12 GB / 32.00 MB free]

  Total: 3 [74.34 GB] / in use: 3 [74.34 GB] / in no VG: 0 [0 ]
 

 

and the final command

 

Quote:[root@www ~]# lvmdiskscan  /dev/hda1 [      101.94 MB]

  /dev/hda2 [    37.15 GB] LVM physical volume

  /dev/hdb1 [    37.27 GB] LVM physical volume

  0 disks

  1 partition

  0 LVM physical volume whole disks

  2 LVM physical volumes
 

does that give you more ideas ?

 

cheers

anyweb




problems with two identical hdd's in fcr4 - anyweb - 2005-09-12

bump!



problems with two identical hdd's in fcr4 - znx - 2005-09-13

sorry sorry.. ill read/reply tomorrow.. busy dont you know :P



problems with two identical hdd's in fcr4 - znx - 2005-09-14


Quote:[root@www ~]# vgdisplay  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Volume group "VolGroup00" doesn't exist

  --- Volume group ---

  VG Name            VolGroup01

  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            37.12 GB

  PE Size            32.00 MB

  Total PE              1188

  Alloc PE / Size    1187 / 37.09 GB

  Free  PE / Size    1 / 32.00 MB

  VG UUID            fXT7f1-TcRL-7AHO-HhBA-475Q-bkY2-PGmz5I
 

Ok, that says that a device (harddisk partition) couldn't be found, therefore the PV for the VG couldn't be found. This could be due to a few different things....

 

Quote:[root@www ~]# vgscan  Reading all physical volumes.  This may take a while...

  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Volume group "VolGroup00" not found

  Found volume group "VolGroup01" using metadata type lvm2
 

The scan couldn't revcover the "missing" device.

 

Quote:[root@www ~]# pvdisplay /dev/hda2  --- Physical volume ---

  PV Name            /dev/hda2

  VG Name            VolGroup01

  PV Size            37.12 GB / not usable 0

  Allocatable        yes

  PE Size (KByte)    32768

  Total PE              1188

  Free PE            1

  Allocated PE          1187

  PV UUID            Vj7eg5-ZDYq-OvOA-Qr9R-ZEok-fNtp-iGrTlY
 

A perfectly good PV.

 

 

Quote:[root@www ~]# pvdisplay /dev/hdb1  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  Couldn't find all physical volumes for volume group VolGroup00.

  format_text: _vg_read failed to read VG VolGroup00

  --- NEW Physical volume ---

  PV Name            /dev/hdb1

  VG Name

  PV Size            46.85 MB

  Allocatable        NO

  PE Size (KByte)    0

  Total PE              0

  Free PE            0

  Allocated PE          0

  PV UUID            P6Axaz-hVhz-5L3k-n7tt-QuA0-4YWp-7XAdXn
 

Ok, so when hdb1 is scanned it complains about a PV on it that doesn't match with uuid. This could be the issue, maybe if we reset the PV's uuid?

 

Quote:[root@www ~]# pvscan  Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.

  PV /dev/hdb1        VG VolGroup00 lvm2 [32.00 MB / 32.00 MB free]

  PV unknown device VG VolGroup00 lvm2 [37.19 GB / 37.19 GB free]

  PV /dev/hda2        VG VolGroup01 lvm2 [37.12 GB / 32.00 MB free]

  Total: 3 [74.34 GB] / in use: 3 [74.34 GB] / in no VG: 0 [0 ]
 

How weird is that, you can see the two PV's.. and then an unknown extra that just happens to be in the same volgroup as the PV we are having issues with.

 

Quote:[root@www ~]# lvmdiskscan  /dev/hda1 [      101.94 MB]

  /dev/hda2 [    37.15 GB] LVM physical volume

  /dev/hdb1 [    37.27 GB] LVM physical volume

  0 disks

  1 partition

  0 LVM physical volume whole disks

  2 LVM physical volumes
 

yeah sort of confirms what i'm thinking.

 

what i think has happened is this, i think that the VolGroup00 has got two PV's assigned to it and that these two PV's are actually meant to be one.

 

so what next... well personally id do the start from scratch choice (only on the dud VG and PV).

 



Code:
# lvremove /dev/VolGroup00/LogVol00       # deletes the logical vol
# vgchange -a n VolGroup00
# vgremove VolGroup00




 

That blows away the LV and the VG.. so we can start again now....

 



Code:
# pvcreate /dev/hdb1
# vgcreate VolGroup00 /dev/hdb1
# vgchange -a y VolGroup00
# vgdisplay testvg | grep "Total PE"
Total PE              XXXX
# lvcreate -l XXXX VolGroup00 -n LogVol00
# mkfs.ext3 /dev/VolGroup00/LogVol00
# mount /dev/VolGroup00/LogVol00 /mnt/point




 

That is, create PV, create VG, activate VG, confirm the total physical extent (PE), create a LV taking up all the PE, format the new LV and mount.

 

i hope this clears it.. im not sure exactly where the pv uuid is stored, it might be in the partition info and if so maybe use fdisk to remove write and recreate the partition info?

 

give it a whizz.. :)




problems with two identical hdd's in fcr4 - anyweb - 2005-09-14


thanks znx for the great replies,

 

not having much luck tho....

 



Code:
[root@www]# lvremove /dev/VolGroup00/LogVol00
 Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.
 Couldn't find all physical volumes for volume group VolGroup00.
 Couldn't find device with uuid 'pORQNQ-hLpc-NkRL-FGW4-bTMF-p6ru-tK2QNj'.
 Couldn't find all physical volumes for volume group VolGroup00.
 Volume group "VolGroup00" not found




 

ideas ?

 

and please bare in mind that this comp is currently serving linux-noob.com amongst other sites,

 

so i don't wanna start again :P

 

cheers

anyweb




problems with two identical hdd's in fcr4 - znx - 2005-09-14

hrmm, continue on with the remove steps..