lvm -> "normal" system conversion
Greetins,
I have Linux Kubuntu Breezy system running completely on software raid, LVM2, including root and boot partitions (LILO boot loader). As for some reasons I found such a structure not very convenient I would like revert it the following one:
- crucial data on software raid matrix (sda & sdb), so home partition etc.;
- boot partition and root partition on separate hard disk (hde).
My questions are:
1. What is the quickiest and easiest way to perform such a conversion?
2. What is at least the rough sequence of steps to do?
Some details around my current system:
+++++++++++++++++++++++++++++++
A. current state
|------------ boot
sda --- |------------- root
|--- md0---------|------------- home
sdb--- |-------------- zasoby1
|-------------- zasoby2boot loader: LILO on LVM2
+++++++++++++++++++++++++++++++
B. required state
sda ---
|--- md0--------|-------------- home
sdb--- |-------------- zasoby1
|-------------- zasoby2hde6-------------------|--------------- boot
|--------------- root
boot loader: GRUB
+++++++++++++++++++++++++++++++
I've already formatted and partitioned hde6. Now I think how to make a copy of root and finally how to install GRUB so it will be able to see LVM2 volumes...
Thanks in advance :-)
Kind regards,
Maciej (mslonik)
Signature · 2 lines
GG: 3321025 Skype: maciej_slojewski
Quoted 3 lines · Maciej S�ojewski
I have Linux Kubuntu Breezy system running completely on software raid, LVM2, including root and boot partitions (LILO boot loader). As for some reasons I found such a structure not very convenient I would like revert it the following one:
- crucial data on software raid matrix (sda & sdb), so home partition etc.;
- boot partition and root partition on separate hard disk (hde).
Hi Maciej,
sorry, I don't exactly understand your current setting:
do sda/sdb form your raid md0? In both cases? Does your LVM then resides on md0?
Are root, boot home and zasoby1/2 logical volumes?
I only see, you want to move off root and boot to an other disk hde.
So, what do you mean by "revert"?
Quoted 1 line
I've already formatted and partitioned hde6. Now I think how to make a copy of root and finally how to install GRUB so it will be able to see LVM2 volumes...
If you move off boot and root to a traditional partition, so why has grub to know anything about LVM any more?
perhaps you should give us an output of "pvs" and "lvs" commands.
regards, Dieter.
Dieter St�ken napisa�(a):
Quoted 7 lines
Hi Maciej,
sorry, I don't exactly understand your current setting:
do sda/sdb form your raid md0? In both cases? Does your LVM then resides on md0?
Are root, boot home and zasoby1/2 logical volumes?
You are right, I should explain my current configuration in more details. I apologize for that. Here it is:
lvm> version
LVM version: 2.02.02 (2006-02-07)
Library version: 1.02.05 (2006-04-19)
Driver version: 4.4.0
lvm> pvs
PV VG Fmt Attr PSize PFree /dev/md0 pv lvm2 a- 74,53G 0
lvm> lvs
LV VG Attr LSize Origin Snap% Move Log Copy% boot pv -wi-ao 100,00M home pv -wi-ao 5,00G root pv -wi-ao 10,00G swap pv -wi-ao 2,00G zasoby1 pv -wi-ao 30,00G zasoby2 pv -wi-ao 27,43G
md0 is software raid type 1 matrix, which is made of sda1 and sdb1. Every part of the system (including boot and root) are on LVM2 LV. LILO as a boot loader.
My goal is to add a new hard drive (hde6) to the sytem and move root and boot from LVM2 to hde6. My second goal is to change boot loader from LILO to GRUB.
My questions are:
1. What is the quickiest and easiest way to perform such a conversion?
2. What is at least the rough sequence of steps to do?
Again, thanks in advance for help.
Kind regards,
Maciej (mslonik)
Signature · 2 lines
GG: 3321025 Skype: maciej_slojewski
[linux-lvm] please help: unable to get rid of LV
In reply to Maciej SłojewskiHi,
i have the following setup:
/dev/md2 --RAID1 (2x250GB)/dev/md0 --RAID-5 (4x160GB)
both md-devices are added to LVM (2)
Library version: 1.02.03 (2006-02-08) Driver version: 4.3.0
There are 1 VG and 10 LV's created. VG00 and LV00-LV09 Everything worked fine until i obviously did a mistake rezising the LV06. (I resized othe LV's without problem before but with LV06 i forgot something ...)
Now i moved all other LV's to /dev/md0 with pvmove -n ..., exept for LV06 However i couldn't "lvremove" the LV06 (error: can't remove open lv or so) I wasn't also able to deactivate the lv nor the vg.
So i tried to pvremove -ff the /dev/md2 PV (maybe the first big mistake) Then i did a pvcreate on /dev/md2 again.
Now everything seems to be messed up:
#pvdisplay
Couldn't find device with uuid 'faoJTZ-VDvh-Gqtd-V0jJ-qbMD-w8be-RvV4Dq'. --- Physical volume ---
PV Name unknown device VG Name vg00 PV Size 232,88 GB / not usable 0 Allocatable yes PE Size (KByte) 4096 Total PE 59618 Free PE 51938 Allocated PE 7680 PV UUID faoJTZ-VDvh-Gqtd-V0jJ-qbMD-w8be-RvV4Dq
--- Physical volume ---
PV Name /dev/md0 VG Name vg00 PV Size 460,16 GB / not usable 0 Allocatable yes PE Size (KByte) 4096 Total PE 117800 Free PE 63272 Allocated PE 54528 PV UUID eydC5O-MF3B-oysT-KvoA-pu1D-o54H-GpPmkL
--- NEW Physical volume ---
PV Name /dev/md2
VG Name
PV Size 232,89 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID L4624h-V1WS-AaXi-4leU-6QBD-9Cs6-4d3NBt
The "unknown" device still contains the data of LV06. This data is not important so i just want consistency back.
#lvremove vg00/lv06
Couldn't find device with uuid 'faoJTZ-VDvh-Gqtd-V0jJ-qbMD-w8be-RvV4Dq'. Couldn't find all physical volumes for volume group vg00. Couldn't find device with uuid 'faoJTZ-VDvh-Gqtd-V0jJ-qbMD-w8be-RvV4Dq'. Couldn't find all physical volumes for volume group vg00. Volume group "vg00" not found
Also, my cryptsetup gives errors:
#/etc/init.d/cryptdisks start
Starting crypto disks: clv00(starting)...
Command failed: Es ist ein Block-Device notwendig (a block device is necessary)
clv01(starting)...
Command failed: Es ist ein Block-Device notwendig
clv02(starting)...
Command failed: Es ist ein Block-Device notwendig
clv04(starting)...
Command failed: Es ist ein Block-Device notwendig
clv05(starting)...
Command failed: Es ist ein Block-Device notwendig
clv07(starting)...
Command failed: Es ist ein Block-Device notwendig
clv08(starting)...
Command failed: Es ist ein Block-Device notwendig
clv09(starting)...
Command failed: Es ist ein Block-Device notwendig
swap0(running) swap1(running).
Any ideas what i can do now ?
Thanks in advance,
AW: [linux-lvm] please help: unable to get rid of LV
Hi again,
i now manged to restore the uuid on /dev/md2, and i'm now able again to access all LV's.
But i can't get rid of LV06:
e2fsck -f /dev/mapper/clv06
e2fsck 1.39 (29-May-2006)
Die Dateisystem Gr��e ( laut SuperBlock) ist 14417920 Blocks Die physikalische Gr��e von Ger�t ist 7864320 Blocks Entweder der SuperBlock oder die Partionstabelle ist besch�digt! Abbrechen<j>? ja
translation: the superblock tells that the filesystem is 14417920 blocks big, but the physical size is 7864320.
#lvremove /dev/vg00/lv06
Can't remove open logical volume "lv06"
here i'm stuck again ...
Quoted 110 lines
-----Urspr�ngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Cisco
Gesendet: Freitag, 16. Juni 2006 13:35
An: 'LVM general discussion and development'
Betreff: [linux-lvm] please help: unable to get rid of LVHi,
i have the following setup:
/dev/md2--RAID1 (2x250GB)/dev/md0--RAID-5 (4x160GB)both md-devices are added to LVM (2)
Library version: 1.02.03 (2006-02-08) Driver version: 4.3.0There are 1 VG and 10 LV's created. VG00 and LV00-LV09 Everything worked fine until i obviously did a mistake rezising the LV06.
(I resized othe LV's without problem before but with LV06 i forgot something
...)Now i moved all other LV's to
/dev/md0with pvmove -n ..., exept for LV06 However i couldn't "lvremove" the LV06 (error:
can't remove open lv or so) I wasn't also able to deactivate the lv nor the vg.So i tried to pvremove -ff the
/dev/md2PV (maybe the first big mistake) Then i did a pvcreate on/dev/md2again.Now everything seems to be messed up:
#pvdisplay
Couldn't find device with uuid
'faoJTZ-VDvh-Gqtd-V0jJ-qbMD-w8be-RvV4Dq'.
--- Physical volume ---PV Name unknown device VG Name vg00 PV Size 232,88 GB / not usable 0 Allocatable yes PE Size (KByte) 4096 Total PE 59618 Free PE 51938 Allocated PE 7680 PV UUID faoJTZ-VDvh-Gqtd-V0jJ-qbMD-w8be-RvV4Dq--- Physical volume ---
PV Name /dev/md0 VG Name vg00 PV Size 460,16 GB / not usable 0 Allocatable yes PE Size (KByte) 4096 Total PE 117800 Free PE 63272 Allocated PE 54528 PV UUID eydC5O-MF3B-oysT-KvoA-pu1D-o54H-GpPmkL--- NEW Physical volume ---
PV Name/dev/md2
VG NamePV Size 232,89 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID L4624h-V1WS-AaXi-4leU-6QBD-9Cs6-4d3NBtThe "unknown" device still contains the data of LV06. This data is not important so i just want consistency back.
#lvremove vg00/lv06
Couldn't find device with uuid
'faoJTZ-VDvh-Gqtd-V0jJ-qbMD-w8be-RvV4Dq'.
Couldn't find all physical volumes for volume group vg00. Couldn't find device with uuid
'faoJTZ-VDvh-Gqtd-V0jJ-qbMD-w8be-RvV4Dq'.
Couldn't find all physical volumes for volume group vg00. Volume group "vg00" not foundAlso, my cryptsetup gives errors:
#/etc/init.d/cryptdisks start
Starting crypto disks: clv00(starting)...
Command failed: Es ist ein Block-Device notwendig (a block device is necessary)
clv01(starting)...
Command failed: Es ist ein Block-Device notwendig clv02(starting)... Command failed: Es ist ein Block-Device notwendig clv04(starting)... Command failed: Es ist ein Block-Device notwendig clv05(starting)... Command failed: Es ist ein Block-Device notwendig clv07(starting)... Command failed: Es ist ein Block-Device notwendig clv08(starting)... Command failed: Es ist ein Block-Device notwendig clv09(starting)... Command failed: Es ist ein Block-Device notwendig
swap0(running) swap1(running).Any ideas what i can do now ?
Thanks in advance,
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/