RH9 and LVM's

Place to discuss Fedora and/or Red Hat

RH9 and LVM's

Postby Basher52 » Thu Jan 22, 2004 2:16 pm

Im trying to add a hdd to an LVM i got there which i created at install.
now...i cant find any toold for it so i tried to add it commandbased but im not really sure how to do this without crashing the entire installation...lol

any done this?

Ive looked thru some howto's and found some stuff about vgcreate...
and lvextend etc but i do not dare toch it.

The system in not on the LVM so it should be ok, so if i try this now...
can anyne help me fix it later...lol
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Basher52 » Thu Jan 22, 2004 5:19 pm

yep...i scre**d it up :(
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Void Main » Thu Jan 22, 2004 6:17 pm

I have always done LVM and RAID at install time, at least where the root partition is to reside. Also, the partition where "/boot" resides can not be in an LV so if you'll want "/boot" to be it's own partition outside of your logical volume if you want the rest of the root partition to be on a logical volume:

http://www.redhat.com/docs/manuals/linu ... h-lvm.html
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Basher52 » Thu Jan 22, 2004 6:49 pm

is there a way for me to fix this you think?

i was trying to ad another disk to the LVM, but the result didnt increase the total diskspace...lol
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Void Main » Thu Jan 22, 2004 6:51 pm

Basher52 wrote:is there a way for me to fix this you think?

i was trying to ad another disk to the LVM, but the result didnt increase the total diskspace...lol


I have no idea without knowing exactly what you did to break it. There is usually a way to fix just about anything as long as it wasn't formatted.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Basher52 » Fri Jan 23, 2004 4:55 am

well...since i scr**d it up, i cant really say what i did, but what i inteded to do was to add a new drive and add this to the already existing LVM.

i read some paper about this and the following is probably as closest i can get...:

i put the disk in the computer.
i used fdisk to create partitions and set the 't' flag to 8e and the partitions.
and its probably here i did something wrong...
i used vgextend to add the new disk.
and some more of the programs called vg*, but which, and in which order, i cant remember :(
rebooted the comp and it stoped at boot time giving errors about the LVM which i now cant find in the logs :(
i open fstab and removed the LVM line and the comp came up without the LVM.

this is the only data i can give about my fiddling with the LVM, but i think im gonna try start all over.
Delete the old LVM and create a new one, but only add the "oginial" partitions i once had there and hope i can rescue the data there, before i do something more.

B52
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Basher52 » Fri Jan 23, 2004 5:39 am

Some displays about the problem...

The names:
Volume00 and LogVol00 and is the default names that RedHat9 put at installtime
----------------------------------------------------------------------------------------------------

[root@FTP /]# lvmdiskscan
lvmdiskscan -- reading all disks / partitions (this may take a while...)
lvmdiskscan -- /dev/hde1 [ 10.74 GB] Primary LVM partition [0x8E]
lvmdiskscan -- /dev/hde2 [ 10.74 GB] Primary LVM partition [0x8E]
lvmdiskscan -- /dev/hde3 [ 10.74 GB] Primary LVM partition [0x8E]
lvmdiskscan -- /dev/hde4 [ 10.74 GB] Primary LVM partition [0x8E]
lvmdiskscan -- /dev/hdc1 [ 21.05 GB] Primary LVM partition [0x8E]
lvmdiskscan -- /dev/hda1 [ 101.94 MB] Primary LINUX native partition [0x83]
lvmdiskscan -- /dev/hda2 [ 4.94 GB] Primary LINUX native partition [0x83]
lvmdiskscan -- /dev/hda3 [ 1019.75 MB] Primary LINUX swap partition [0x82]
lvmdiskscan -- /dev/hdb1 [ 16.15 GB] Primary LVM partition [0x8E]
lvmdiskscan -- 4 disks
lvmdiskscan -- 0 whole disks
lvmdiskscan -- 0 loop devices
lvmdiskscan -- 0 multiple devices
lvmdiskscan -- 0 network block devices
lvmdiskscan -- 9 partitions
lvmdiskscan -- 6 LVM physical volume partitions

As shown ablove the hde disk is made as LVM's
and before i did anything the LVM was made of
hdb1 and hdc1 (in that order)
----------------------------------------------------------------------------------------------------

[root@FTP /]# lvscan
lvscan -- no volume groups found
----------------------------------------------------------------------------------------------------

[root@FTP /]# lvremove /dev/Volume00/
lvremove -- volume group "Volume00" doesn't exist
[root@FTP /]# lvremove /dev/Volume00/LogVol00
lvremove -- volume group "Volume00" doesn't exist

I didnt really understand what they asked for so i tried them both
----------------------------------------------------------------------------------------------------

[root@FTP /]# pvdisplay /dev/hdb1
--- Physical volume ---
PV Name /dev/hdb1
VG Name Volume00
PV Size 16.15 GB [33864957 secs] / NOT usable 4.19 MB [LVM: 144 KB]
PV# 1
PV Status NOT available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 4096
Total PE 4132
Free PE 0
Allocated PE 4132
PV UUID RjEvio-gC2Z-E4Zv-LlQg-wN8x-zwzr-ItgL3b

[root@FTP /]# pvdisplay /dev/hdc1
--- Physical volume ---
PV Name /dev/hdc1
VG Name Volume00
PV Size 21.05 GB [44150337 secs] / NOT usable 4.19 MB [LVM: 149 KB]
PV# 2
PV Status NOT available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 4096
Total PE 5388
Free PE 0
Allocated PE 5388
PV UUID YKEHn4-U4hH-vroB-Lm17-XEpd-6NnY-p12oeb

[root@FTP /]# pvdisplay /dev/hde1
--- Physical volume ---
PV Name /dev/hde1
VG Name Volume00
PV Size 10.65 GB [22330287 secs] / NOT usable 4.19 MB [LVM: 138 KB]
PV# 3
PV Status NOT available
Allocatable yes
Cur LV 0
PE Size (KByte) 4096
Total PE 2724
Free PE 2724
Allocated PE 0
PV UUID JNQaiQ-NmkU-tDSw-kMCl-mb1o-ah2T-M6Ijt7

[root@FTP /]# pvdisplay /dev/hde2
pvdisplay -- no physical volume identifier on "/dev/hde2"

[root@FTP /]# pvdisplay /dev/hde3
pvdisplay -- no physical volume identifier on "/dev/hde3"

[root@FTP /]# pvdisplay /dev/hde4
pvdisplay -- no physical volume identifier on "/dev/hde4"

As shown, the 3 last partitions wont show up as a part of it


I really hope you can, and has the energy enough to even try,
to make sence of this, cu Ive tried and I'm starting to think
that I should reinstall the entire OS.


//////Basher52
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Basher52 » Tue Jan 27, 2004 3:08 am

More Data of the problem...:

[root@FTP /]# vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of volume group "Volume00" from physical volume(s)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume group

[root@FTP /]# lvscan
lvscan -- no volume groups found

[root@FTP /]# lvmdiskscan
lvmdiskscan -- reading all disks / partitions (this may take a while...)
lvmdiskscan -- /dev/hde1 [ 10.74 GB] Primary LINUX native partition [0x83]
lvmdiskscan -- /dev/hde2 [ 10.74 GB] Primary LINUX native partition [0x83]
lvmdiskscan -- /dev/hde3 [ 10.74 GB] Primary LINUX native partition [0x83]
lvmdiskscan -- /dev/hde4 [ 10.74 GB] Primary LINUX native partition [0x83]
lvmdiskscan -- /dev/hdc1 [ 21.05 GB] Primary LVM partition [0x8E]
lvmdiskscan -- /dev/hda1 [ 101.94 MB] Primary LINUX native partition [0x83]
lvmdiskscan -- /dev/hda2 [ 4.94 GB] Primary LINUX native partition [0x83]
lvmdiskscan -- /dev/hda3 [ 1019.75 MB] Primary LINUX swap partition [0x82]
lvmdiskscan -- /dev/hdb1 [ 16.15 GB] Primary LVM partition [0x8E]
lvmdiskscan -- 4 disks
lvmdiskscan -- 0 whole disks
lvmdiskscan -- 0 loop devices
lvmdiskscan -- 0 multiple devices
lvmdiskscan -- 0 network block devices
lvmdiskscan -- 9 partitions
lvmdiskscan -- 2 LVM physical volume partitions

[root@FTP /]# vgcreate Volume00 /dev/hdb1
vgcreate -- "/dev/hdb1" is not a new physical volume
vgcreate -- physical volume "/dev/hdb1" already belongs to volume group "Volume00"

[root@FTP /]# vgcreate Volume00 /dev/hdc1
vgcreate -- "/dev/hdc1" is not a new physical volume
vgcreate -- physical volume "/dev/hdc1" already belongs to volume group "Volume00"
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Basher52 » Thu Jan 29, 2004 2:07 am

I couldnt get this to work, so I nuked all data on these drives.

I just installed Fedora, but even this OS couldnt find the LVM, so I formated the drives to be able tu use them at all.

btw... After putting some 4 hours installing the OS and all the other apps what i use, restarted and it stoped...
The disk that i used for the OS had BadBlocks on it :( and quite a few.
Now I have to do it all over again :(

B52
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Void Main » Thu Jan 29, 2004 11:20 am

When you reinstalled, did you delete all partitions and create the LVM, partitions and file systems at installation time in the installation GUI? Including formatting of the file system? There is also an option to check for bad blocks during the format. If you still have bad block problems then I would say you have a bad hard drive or some other hardware issue. But as I mentioned, I don't have a lot of LVM experience. I usually do all my RAID and logical volumes in the controller and not the OS (hardware RAID).
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Basher52 » Sat Jan 31, 2004 10:34 am

i only formated the drive that intended to be the drive for the OS, not the
drive holding the LVM's since i hoped the new installation would found it and recreate the faulty thing so i could reuse all the data.
but after i saw that it didnt find the LVM i formated these drives too.
the bad blocks i think is only on one older drive(the ine intende for the OS)
so i think im gonna remove that before the next reinstall

B52
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Void Main » Sat Jan 31, 2004 11:12 am

Yeah, if you have a drive with bad blocks it's usually safe to assume that more will come. I can't imagine this would be good for an LV although I don't know if it would be any more devastating that on a non-LV, depending on what data resides on those bad blocks. Heck, you should be an expert at logical volumes by time you get all this sorted out. Maybe you could write up a HOWTO for the tips section if you get it all sorted out? :)
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Basher52 » Sat Jan 31, 2004 11:56 am

hehe...me an expert...i dont think so lol
i'll let u carry that heavy stone...lol

but i did come across a nice little webbased...all feature admin tool:
Webmin...i even tried this for my LVM needs but it didnt work.
this application can do anything that u can do on ur disks, network...any hardware...etc etc(but i havent looked it all through)

anyways...if u get this tool, you can do anything, even by https, and u dont need to know anything at all...almost :)

__________________________
RH9: http://rpm.pbone.net/index.php3/stat/4/ ... h.rpm.html

Fedora: http://rpm.pbone.net/index.php3/stat/4/ ... h.rpm.html

/urs trouly B52
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Void Main » Sat Jan 31, 2004 12:04 pm

Yeah, Webmin is excellent for people who are not already comfortable with Linux administration. I had set it up for my partners to use for things like making DNS changes or Apache virtual host additions. I prefer to do everything via SSH so I personally do not use it.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Basher52 » Sat Jan 31, 2004 12:08 pm

me also... but in the cases where i dont yet know the commands for it...this will do :)
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE


Return to Fedora/Red Hat

Who is online

Users browsing this forum: No registered users and 0 guests

cron