FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 05-15-2010, 11:17 PM
Luis Paulo
 
Default undo LVM

On Sat, May 15, 2010 at 11:47 PM, Michel Racic <michel.racic@gmail.com> wrote:
> Hi Luis
>
> Did you get a solution for your problem?
>
> I made the same (similar) mistake...
> I have a 1TB Data disk that is encrypted with luks (cryptsetup) and I
> installed a new SSD disk because my old HD has crashed and wanted to
> install lucid lynx on it.
> On the partition screen I accidentally added the encrypted partition
> to the LVM and have seen it after I accepted the writing of the
> partition table to the disk.
> Now I have the problem how to revert the LVM part that I can decrypt
> my luks partition with cryptsetup again.
>
> Could you manage reverting LVM to get to your data or finishing LVM
> without deleting the content of that disk?
>
> Best regards
>
> Michel
>

Hi, Michel

I didn't had any problem with LVM, i think it was Herman.

And I don't know anything about encryption.

Maybe if you can give more details, like:

Do you see the encrypted files, or nothing at all?

Post the output of
$ sudo vgdisplay
$ sudo lvdysplay

and of
$ sudo pvdysplay
pointing out what is the partition you want to rescue.

I don't really know if lvm erases the content of the partition when
added during install process, it may just be a simple matter of
removing it from the lvm. Don't know.

Regards
Luis

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2010, 02:12 PM
Michel Racic
 
Default undo LVM

Hi Luis and Herman

Sorry, it was late when I answered to the thread I found but I see it
was Herman that opened the thread...

As my main problem is the LVM and not the encryption, maybe you have some hint.

As its full disk encryption, you can think of just a partition with
any FS on it that has been added to a LVM group.

Here is the output of the three commands:
~# vgdisplay
--- Volume group ---
VG Name data
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 931.51 GiB
PE Size 4.00 MiB
Total PE 238466
Alloc PE / Size 0 / 0
Free PE / Size 238466 / 931.51 GiB
VG UUID E9bMha-PSAi-YjNd-dPXi-WSrf-HDdN-jbk1k6

~# lvdisplay
~# pvdisplay
--- Physical volume ---
PV Name /dev/sdb1
VG Name data
PV Size 931.51 GiB / not usable 3.19 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 238466
Free PE 238466
Allocated PE 0
PV UUID DIPP4J-oNdp-NF46-cPa0-qE3N-enbs-SIIBFX

/dev/sdb is the disk with the encrypted volume on, the process of
making an LVM out of it was a second so I hope it hasn't overwritten
any important information.
Basically I try to find a way to remove the lvm container around and
normally use this encrypted partition again.
I still researching with google how LVM works and how I can revert that process.

I'm not sure what lvmremove actually will do to my disk (as the man
page isn't very helpful) or if there is a possibility to complete the
lvm setup without data loss (from my current understanding this is not
possible).

Maybe someone of you have a hint or can point me to a new research
direction as I'm a little bit lost.

Regards Michel


2010/5/16 Luis Paulo <luis.barbas@gmail.com>:
> On Sat, May 15, 2010 at 11:47 PM, Michel Racic <michel.racic@gmail.com> wrote:
>> Hi Luis
>>
>> Did you get a solution for your problem?
>>
>> I made the same (similar) mistake...
>> I have a 1TB Data disk that is encrypted with luks (cryptsetup) and I
>> installed a new SSD disk because my old HD has crashed and wanted to
>> install lucid lynx on it.
>> On the partition screen I accidentally added the encrypted partition
>> to the LVM and have seen it after I accepted the writing of the
>> partition table to the disk.
>> Now I have the problem how to revert the LVM part that I can decrypt
>> my luks partition with cryptsetup again.
>>
>> Could you manage reverting LVM to get to your data or finishing LVM
>> without deleting the content of that disk?
>>
>> Best regards
>>
>> Michel
>>
>
> Hi, Michel
>
> I didn't had any problem with LVM, i think it was Herman.
>
> And I don't know anything about encryption.
>
> Maybe if you can give more details, like:
>
> Do you see the encrypted files, or nothing at all?
>
> Post the output of
> $ sudo vgdisplay
> $ sudo lvdysplay
>
> and of
> $ sudo pvdysplay
> pointing out what is the partition you want to rescue.
>
> I don't really know if lvm erases the content of the partition when
> added during install process, it may just be a simple matter of
> removing it from the lvm. Don't know.
>
> Regards
> Luis
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2010, 02:41 PM
Luis Paulo
 
Default undo LVM

On Sun, May 16, 2010 at 3:12 PM, Michel Racic <michel.racic@gmail.com> wrote:
> Hi Luis and Herman
>
> Sorry, it was late when I answered to the thread I found but I see it
> was Herman that opened the thread...
>
> As my main problem is the LVM and not the encryption, maybe you have some hint.
>
> As its full disk encryption, you can think of just a partition with
> any FS on it that has been added to a LVM group.
>
> Here is the output of the three commands:
> ~# vgdisplay
> *--- Volume group ---
> *VG Name * * * * * * * data
> *System ID
> *Format * * * * * * * *lvm2
> *Metadata Areas * * * *1
> *Metadata Sequence No *1
> *VG Access * * * * * * read/write
> *VG Status * * * * * * resizable
> *MAX LV * * * * * * * *0
> *Cur LV * * * * * * * *0
> *Open LV * * * * * * * 0
> *Max PV * * * * * * * *0
> *Cur PV * * * * * * * *1
> *Act PV * * * * * * * *1
> *VG Size * * * * * * * 931.51 GiB
> *PE Size * * * * * * * 4.00 MiB
> *Total PE * * * * * * *238466
> *Alloc PE / Size * * * 0 / 0
> *Free *PE / Size * * * 238466 / 931.51 GiB
> *VG UUID * * * * * * * E9bMha-PSAi-YjNd-dPXi-WSrf-HDdN-jbk1k6
>
> ~# lvdisplay
> ~# pvdisplay
> *--- Physical volume ---
> *PV Name * * * * * * * /dev/sdb1
> *VG Name * * * * * * * data
> *PV Size * * * * * * * 931.51 GiB / not usable 3.19 MiB
> *Allocatable * * * * * yes
> *PE Size * * * * * * * 4.00 MiB
> *Total PE * * * * * * *238466
> *Free PE * * * * * * * 238466
> *Allocated PE * * * * *0
> *PV UUID * * * * * * * DIPP4J-oNdp-NF46-cPa0-qE3N-enbs-SIIBFX
>
> /dev/sdb is the disk with the encrypted volume on, the process of
> making an LVM out of it was a second so I hope it hasn't overwritten
> any important information.
> Basically I try to find a way to remove the lvm container around and
> normally use this encrypted partition again.
> I still researching with google how LVM works and how I can revert that process.
>
> I'm not sure what lvmremove actually will do to my disk (as the man
> page isn't very helpful) or if there is a possibility to complete the
> lvm setup without data loss (from my current understanding this is not
> possible).
>
> Maybe someone of you have a hint or can point me to a new research
> direction as I'm a little bit lost.
>
> Regards Michel
>
>
> 2010/5/16 Luis Paulo <luis.barbas@gmail.com>:
>> On Sat, May 15, 2010 at 11:47 PM, Michel Racic <michel.racic@gmail.com> wrote:
>>> Hi Luis
>>>
>>> Did you get a solution for your problem?
>>>
>>> I made the same (similar) mistake...
>>> I have a 1TB Data disk that is encrypted with luks (cryptsetup) and I
>>> installed a new SSD disk because my old HD has crashed and wanted to
>>> install lucid lynx on it.
>>> On the partition screen I accidentally added the encrypted partition
>>> to the LVM and have seen it after I accepted the writing of the
>>> partition table to the disk.
>>> Now I have the problem how to revert the LVM part that I can decrypt
>>> my luks partition with cryptsetup again.
>>>
>>> Could you manage reverting LVM to get to your data or finishing LVM
>>> without deleting the content of that disk?
>>>
>>> Best regards
>>>
>>> Michel
>>>
>>
>> Hi, Michel
>>
>> I didn't had any problem with LVM, i think it was Herman.
>>
>> And I don't know anything about encryption.
>>
>> Maybe if you can give more details, like:
>>
>> Do you see the encrypted files, or nothing at all?
>>
>> Post the output of
>> $ sudo vgdisplay
>> $ sudo lvdysplay
>>
>> and of
>> $ sudo pvdysplay
>> pointing out what is the partition you want to rescue.
>>
>> I don't really know if lvm erases the content of the partition when
>> added during install process, it may just be a simple matter of
>> removing it from the lvm. Don't know.
>>
>> Regards
>> Luis
>>
>

Hi, Michel

I think the way will be
http://tldp.org/HOWTO/LVM-HOWTO/removepvsfromvg.html

like in
$ sudo vgreduce data /dev/sdb1

Please wait a little, do wait, to see what other may say about it.

Regards
Luis

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2010, 03:00 PM
Michel Racic
 
Default undo LVM

Hi Luis

Thanks for the hint, I will research some more to see what exactly the
vgreduce command will do on my disk.

regards Michel

2010/5/16 Luis Paulo <luis.barbas@gmail.com>:
> On Sun, May 16, 2010 at 3:12 PM, Michel Racic <michel.racic@gmail.com> wrote:
>
> Hi, Michel
>
> I think the way will be
> http://tldp.org/HOWTO/LVM-HOWTO/removepvsfromvg.html
>
> like in
> $ sudo vgreduce data /dev/sdb1
>
> Please wait a little, do wait, to see what other may say about it.
>
> Regards
> Luis
>
>> Hi Luis and Herman
>>
>> Sorry, it was late when I answered to the thread I found but I see it
>> was Herman that opened the thread...
>>
>> As my main problem is the LVM and not the encryption, maybe you have some hint.
>>
>> As its full disk encryption, you can think of just a partition with
>> any FS on it that has been added to a LVM group.
>>
>> Here is the output of the three commands:
>> ~# vgdisplay
>> *--- Volume group ---
>> *VG Name * * * * * * * data
>> *System ID
>> *Format * * * * * * * *lvm2
>> *Metadata Areas * * * *1
>> *Metadata Sequence No *1
>> *VG Access * * * * * * read/write
>> *VG Status * * * * * * resizable
>> *MAX LV * * * * * * * *0
>> *Cur LV * * * * * * * *0
>> *Open LV * * * * * * * 0
>> *Max PV * * * * * * * *0
>> *Cur PV * * * * * * * *1
>> *Act PV * * * * * * * *1
>> *VG Size * * * * * * * 931.51 GiB
>> *PE Size * * * * * * * 4.00 MiB
>> *Total PE * * * * * * *238466
>> *Alloc PE / Size * * * 0 / 0
>> *Free *PE / Size * * * 238466 / 931.51 GiB
>> *VG UUID * * * * * * * E9bMha-PSAi-YjNd-dPXi-WSrf-HDdN-jbk1k6
>>
>> ~# lvdisplay
>> ~# pvdisplay
>> *--- Physical volume ---
>> *PV Name * * * * * * * /dev/sdb1
>> *VG Name * * * * * * * data
>> *PV Size * * * * * * * 931.51 GiB / not usable 3.19 MiB
>> *Allocatable * * * * * yes
>> *PE Size * * * * * * * 4.00 MiB
>> *Total PE * * * * * * *238466
>> *Free PE * * * * * * * 238466
>> *Allocated PE * * * * *0
>> *PV UUID * * * * * * * DIPP4J-oNdp-NF46-cPa0-qE3N-enbs-SIIBFX
>>
>> /dev/sdb is the disk with the encrypted volume on, the process of
>> making an LVM out of it was a second so I hope it hasn't overwritten
>> any important information.
>> Basically I try to find a way to remove the lvm container around and
>> normally use this encrypted partition again.
>> I still researching with google how LVM works and how I can revert that process.
>>
>> I'm not sure what lvmremove actually will do to my disk (as the man
>> page isn't very helpful) or if there is a possibility to complete the
>> lvm setup without data loss (from my current understanding this is not
>> possible).
>>
>> Maybe someone of you have a hint or can point me to a new research
>> direction as I'm a little bit lost.
>>
>> Regards Michel
>>
>>
>> 2010/5/16 Luis Paulo <luis.barbas@gmail.com>:
>>> On Sat, May 15, 2010 at 11:47 PM, Michel Racic <michel.racic@gmail.com> wrote:
>>>> Hi Luis
>>>>
>>>> Did you get a solution for your problem?
>>>>
>>>> I made the same (similar) mistake...
>>>> I have a 1TB Data disk that is encrypted with luks (cryptsetup) and I
>>>> installed a new SSD disk because my old HD has crashed and wanted to
>>>> install lucid lynx on it.
>>>> On the partition screen I accidentally added the encrypted partition
>>>> to the LVM and have seen it after I accepted the writing of the
>>>> partition table to the disk.
>>>> Now I have the problem how to revert the LVM part that I can decrypt
>>>> my luks partition with cryptsetup again.
>>>>
>>>> Could you manage reverting LVM to get to your data or finishing LVM
>>>> without deleting the content of that disk?
>>>>
>>>> Best regards
>>>>
>>>> Michel
>>>>
>>>
>>> Hi, Michel
>>>
>>> I didn't had any problem with LVM, i think it was Herman.
>>>
>>> And I don't know anything about encryption.
>>>
>>> Maybe if you can give more details, like:
>>>
>>> Do you see the encrypted files, or nothing at all?
>>>
>>> Post the output of
>>> $ sudo vgdisplay
>>> $ sudo lvdysplay
>>>
>>> and of
>>> $ sudo pvdysplay
>>> pointing out what is the partition you want to rescue.
>>>
>>> I don't really know if lvm erases the content of the partition when
>>> added during install process, it may just be a simple matter of
>>> removing it from the lvm. Don't know.
>>>
>>> Regards
>>> Luis
>>>
>>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2010, 08:21 PM
Michel Racic
 
Default undo LVM

Hi

Someone on #LVM channel (freenode) meant that pvremove could help as
it wipes the LVM headers for that disc if I used pcvreate for the
creation.
Does someone know what exactly the alternate installer does on the
step in manual partition if you create a LVM group and ad a disk to
it?

My concern is that if I just wipe the LVM headers it still wont be
recognized as a Luks partition instead it will be just like an empty
disc with no content...

Regarding to this messages
(http://dbaspot.com/forums/linux-misc/263673-lvm-possible-undo-pvcreate.html)
that guy used the fact that ext3 stores the superblock on various
locations of the disc so he could reconstruct the ext3 header.
I found another blog
(http://www.effinger.org/blog/2008/10/12/daten-von-mit-luks-verschlusselter-platte-retten/)
that describes a process of geting the luks header with hexedit from
the disk to replace a missing one
but I'm stuck on the part for identifying the luks header.

Have you guys any idea what exactly happens (physically) on the
pvremove command?
It should wipe the LVM headers from the disc but I'm not sure if that
would get me a step closer or if it could destroy more than I already
destroyed.

Regards Michel

2010/5/16 Michel Racic <michel.racic@gmail.com>:
> Hi Luis
>
> Thanks for the hint, I will research some more to see what exactly the
> vgreduce command will do on my disk.
>
> regards Michel
>
> 2010/5/16 Luis Paulo <luis.barbas@gmail.com>:
>> On Sun, May 16, 2010 at 3:12 PM, Michel Racic <michel.racic@gmail.com> wrote:
>>
>> Hi, Michel
>>
>> I think the way will be
>> http://tldp.org/HOWTO/LVM-HOWTO/removepvsfromvg.html
>>
>> like in
>> $ sudo vgreduce data /dev/sdb1
>>
>> Please wait a little, do wait, to see what other may say about it.
>>
>> Regards
>> Luis
>>
>>> Hi Luis and Herman
>>>
>>> Sorry, it was late when I answered to the thread I found but I see it
>>> was Herman that opened the thread...
>>>
>>> As my main problem is the LVM and not the encryption, maybe you have some hint.
>>>
>>> As its full disk encryption, you can think of just a partition with
>>> any FS on it that has been added to a LVM group.
>>>
>>> Here is the output of the three commands:
>>> ~# vgdisplay
>>> *--- Volume group ---
>>> *VG Name * * * * * * * data
>>> *System ID
>>> *Format * * * * * * * *lvm2
>>> *Metadata Areas * * * *1
>>> *Metadata Sequence No *1
>>> *VG Access * * * * * * read/write
>>> *VG Status * * * * * * resizable
>>> *MAX LV * * * * * * * *0
>>> *Cur LV * * * * * * * *0
>>> *Open LV * * * * * * * 0
>>> *Max PV * * * * * * * *0
>>> *Cur PV * * * * * * * *1
>>> *Act PV * * * * * * * *1
>>> *VG Size * * * * * * * 931.51 GiB
>>> *PE Size * * * * * * * 4.00 MiB
>>> *Total PE * * * * * * *238466
>>> *Alloc PE / Size * * * 0 / 0
>>> *Free *PE / Size * * * 238466 / 931.51 GiB
>>> *VG UUID * * * * * * * E9bMha-PSAi-YjNd-dPXi-WSrf-HDdN-jbk1k6
>>>
>>> ~# lvdisplay
>>> ~# pvdisplay
>>> *--- Physical volume ---
>>> *PV Name * * * * * * * /dev/sdb1
>>> *VG Name * * * * * * * data
>>> *PV Size * * * * * * * 931.51 GiB / not usable 3.19 MiB
>>> *Allocatable * * * * * yes
>>> *PE Size * * * * * * * 4.00 MiB
>>> *Total PE * * * * * * *238466
>>> *Free PE * * * * * * * 238466
>>> *Allocated PE * * * * *0
>>> *PV UUID * * * * * * * DIPP4J-oNdp-NF46-cPa0-qE3N-enbs-SIIBFX
>>>
>>> /dev/sdb is the disk with the encrypted volume on, the process of
>>> making an LVM out of it was a second so I hope it hasn't overwritten
>>> any important information.
>>> Basically I try to find a way to remove the lvm container around and
>>> normally use this encrypted partition again.
>>> I still researching with google how LVM works and how I can revert that process.
>>>
>>> I'm not sure what lvmremove actually will do to my disk (as the man
>>> page isn't very helpful) or if there is a possibility to complete the
>>> lvm setup without data loss (from my current understanding this is not
>>> possible).
>>>
>>> Maybe someone of you have a hint or can point me to a new research
>>> direction as I'm a little bit lost.
>>>
>>> Regards Michel
>>>
>>>
>>> 2010/5/16 Luis Paulo <luis.barbas@gmail.com>:
>>>> On Sat, May 15, 2010 at 11:47 PM, Michel Racic <michel.racic@gmail.com> wrote:
>>>>> Hi Luis
>>>>>
>>>>> Did you get a solution for your problem?
>>>>>
>>>>> I made the same (similar) mistake...
>>>>> I have a 1TB Data disk that is encrypted with luks (cryptsetup) and I
>>>>> installed a new SSD disk because my old HD has crashed and wanted to
>>>>> install lucid lynx on it.
>>>>> On the partition screen I accidentally added the encrypted partition
>>>>> to the LVM and have seen it after I accepted the writing of the
>>>>> partition table to the disk.
>>>>> Now I have the problem how to revert the LVM part that I can decrypt
>>>>> my luks partition with cryptsetup again.
>>>>>
>>>>> Could you manage reverting LVM to get to your data or finishing LVM
>>>>> without deleting the content of that disk?
>>>>>
>>>>> Best regards
>>>>>
>>>>> Michel
>>>>>
>>>>
>>>> Hi, Michel
>>>>
>>>> I didn't had any problem with LVM, i think it was Herman.
>>>>
>>>> And I don't know anything about encryption.
>>>>
>>>> Maybe if you can give more details, like:
>>>>
>>>> Do you see the encrypted files, or nothing at all?
>>>>
>>>> Post the output of
>>>> $ sudo vgdisplay
>>>> $ sudo lvdysplay
>>>>
>>>> and of
>>>> $ sudo pvdysplay
>>>> pointing out what is the partition you want to rescue.
>>>>
>>>> I don't really know if lvm erases the content of the partition when
>>>> added during install process, it may just be a simple matter of
>>>> removing it from the lvm. Don't know.
>>>>
>>>> Regards
>>>> Luis
>>>>
>>>
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2010, 09:42 PM
Tom H
 
Default undo LVM

On Sun, May 16, 2010 at 4:21 PM, Michel Racic <michel.racic@gmail.com> wrote:
>
> Someone on #LVM channel (freenode) meant that pvremove could help as
> it wipes the LVM headers for that disc if I used pcvreate for the
> creation.
>
> Does someone know what exactly the alternate installer does on the
> step in manual partition if you create a LVM group and ad a disk to
> it?

I have not followed this thread from the beginning so I am only
commenting on the post above.

If you want to run pvremove make sure that you precede it with a
pvmove and vgremove.

If you are creating a VG manually (and I assume that the installer
does this in the background), you
- run pvcreate to turn a partition into an LVM physical volume
- run vgcreate to add the newly created PV to a VG (or vgextend if
adding a PV to an existing VG)
- run lvcreate to carve out a logical volume in that VG

If you want to remove a partition from a VG, you
- run pvmove to move any data ("physical extents") from that PV to another PV
- run vgreduce to remove that PV from the VG
- run pvremove to remove that PV from LVM

Just running pvremove will not work - or if does work, will leave you
with an LVM mess.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2010, 10:06 PM
Michel Racic
 
Default undo LVM

Hi Tom

Thanks for explaining the process of manual LVM setup.
Just to repeat the facts, vgdisplay and pvdisplay show the partition
but lvdisplay doesn't have any output.
This seems to me that the installer did just the step with pvcreate
(which wrote the LVM headers to my encrypted disc) and vgcreate which
added the pv to a group but the last step with creating a logical
volume hasn't been done by the installer because I aborted the
installation as soon as I saw the mess I created.

You suggest pvmove to move any data but I think that is meant if the
pv actually was used in an LVM setup or did I get that wrong?

I don't use the VG that this PV is in, so I don't care about the LVM
stuff (in the meaning it is not a disc I want to take out of a
productive LVM setup) but I need to get to the data on that disk and
its a ext3 FS but encrypted with Luks.

Just to get my situation from the Thread:
The disc was in use as a Luks encrypted partition and I just
accidentaly added it to a LVM group but if I open the device in
hexedit I see that the Luks header should still be OK but I don't know
how to recover the partition header that I can mount it again with
cryptsetup.

Regards Michel

2010/5/16 Tom H <tomh0665@gmail.com>:
> On Sun, May 16, 2010 at 4:21 PM, Michel Racic <michel.racic@gmail.com> wrote:
>>
>> Someone on #LVM channel (freenode) meant that pvremove could help as
>> it wipes the LVM headers for that disc if I used pcvreate for the
>> creation.
>>
>> Does someone know what exactly the alternate installer does on the
>> step in manual partition if you create a LVM group and ad a disk to
>> it?
>
> I have not followed this thread from the beginning so I am only
> commenting on the post above.
>
> If you want to run pvremove make sure that you precede it with a
> pvmove and vgremove.
>
> If you are creating a VG manually (and I assume that the installer
> does this in the background), you
> - run pvcreate to turn a partition into an LVM physical volume
> - run vgcreate to add the newly created PV to a VG (or vgextend if
> adding a PV to an existing VG)
> - run lvcreate to carve out a logical volume in that VG
>
> If you want to remove a partition from a VG, you
> - run pvmove to move any data ("physical extents") from that PV to another PV
> - run vgreduce to remove that PV from the VG
> - run pvremove to remove that PV from LVM
>
> Just running pvremove will not work - or if does work, will leave you
> with an LVM mess.
>
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-17-2010, 02:51 AM
Luis Paulo
 
Default undo LVM

On Sun, May 16, 2010 at 11:06 PM, Michel Racic <michel.racic@gmail.com> wrote:
> Hi Tom
>
> Thanks for explaining the process of manual LVM setup.
> Just to repeat the facts, vgdisplay and pvdisplay show the partition
> but lvdisplay doesn't have any output.
> This seems to me that the installer did just the step with pvcreate
> (which wrote the LVM headers to my encrypted disc) and vgcreate which
> added the pv to a group but the last step with creating a logical
> volume hasn't been done by the installer because I aborted the
> installation as soon as I saw the mess I created.
>
> You suggest pvmove to move any data but I think that is meant if the
> pv actually was used in an LVM setup or did I get that wrong?
>
> I don't use the VG that this PV is in, so I don't care about the LVM
> stuff (in the meaning it is not a disc I want to take out of a
> productive LVM setup) but I need to get to the data on that disk and
> its a ext3 FS but encrypted with Luks.
>
> Just to get my situation from the Thread:
> The disc was in use as a Luks encrypted partition and I just
> accidentaly added it to a LVM group but if I open the device in
> hexedit I see that the Luks header should still be OK but I don't know
> how to recover the partition header that I can mount it again with
> cryptsetup.
>
> Regards Michel
>
> 2010/5/16 Tom H <tomh0665@gmail.com>:
>> On Sun, May 16, 2010 at 4:21 PM, Michel Racic <michel.racic@gmail.com> wrote:
>>>
>>> Someone on #LVM channel (freenode) meant that pvremove could help as
>>> it wipes the LVM headers for that disc if I used pcvreate for the
>>> creation.
>>>
>>> Does someone know what exactly the alternate installer does on the
>>> step in manual partition if you create a LVM group and ad a disk to
>>> it?
>>
>> I have not followed this thread from the beginning so I am only
>> commenting on the post above.
>>
>> If you want to run pvremove make sure that you precede it with a
>> pvmove and vgremove.
>>
>> If you are creating a VG manually (and I assume that the installer
>> does this in the background), you
>> - run pvcreate to turn a partition into an LVM physical volume
>> - run vgcreate to add the newly created PV to a VG (or vgextend if
>> adding a PV to an existing VG)
>> - run lvcreate to carve out a logical volume in that VG
>>
>> If you want to remove a partition from a VG, you
>> - run pvmove to move any data ("physical extents") from that PV to another PV
>> - run vgreduce to remove that PV from the VG
>> - run pvremove to remove that PV from LVM
>>
>> Just running pvremove will not work - or if does work, will leave you
>> with an LVM mess.
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users@lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>
>
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

Hi, Michel

So, I would try
$ sudo vgreduce data /dev/sdb1
My only concerns is that sdb1 is the only pv of the volume.

Will not run the pvmove, that may mess your data

Then I'll try to mount it and try to get access the data

If sucess, I'll do a backup. You will not be in this situation if you
had one. Maybe there's a reason for not to have one.

If it doesn't work or after the backup, I will run the pvremove

(From man pvremove)
"pvremove wipes the label on a device so that LVM will no longer
recognise it as a physical volume."

Hope Tom may give his opinion to this too.
Regards
Luis

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-17-2010, 06:21 AM
Michel Racic
 
Default undo LVM

Hi Luis


Yes I know how important backups are and I gave most of my urgent data backed up on various places but this 1TB disc is my main backup and My other disc crashed...


I'm too pussy to just try that out so I first have to get a new 1TB disc and dd (mirror) the disc so I can try this out on the mirror disc...


I don't think that vgreduce will work but i try as soon I have the mirror disc


Thx and regards

Michel




On May 17, 2010 4:52 AM, "Luis Paulo" <luis.barbas@gmail.com> wrote:


On Sun, May 16, 2010 at 11:06 PM, Michel Racic <michel.racic@gmail.com> wrote:

> Hi Tom
>
> Thanks f...
Hi, Michel



So, I would try


$ sudo vgreduce data /dev/sdb1
My only concerns is that sdb1 is the only pv of the volume.



Will not run the pvmove, that may mess your data



Then I'll try to mount it and try to get access the data



If sucess, I'll do a backup. You will not be in this situation if you

had one. Maybe there's a reason for not to have one.



If it doesn't work or after the backup, I will run the pvremove



(From man pvremove)

"pvremove wipes the label on a device so that LVM will no longer

recognise it as a physical volume."



Hope Tom may give his opinion to this too.

Regards

Luis



--


ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://l...



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-17-2010, 07:03 AM
Luis Paulo
 
Default undo LVM

On Mon, May 17, 2010 at 7:21 AM, Michel Racic <michel.racic@gmail.com> wrote:
> Hi Luis
>
> Yes I know how important backups are and I gave most of my urgent data
> backed up on various places but this 1TB disc is my main backup and My other
> disc crashed...
>
> I'm too pussy to just try that out so I first have to get a new 1TB disc and
> dd (mirror) the disc so I can try this out on the mirror disc...
>
> I don't think that vgreduce will work but i try as soon I have the mirror
> disc
>
> Thx and regards
> Michel
>
> On May 17, 2010 4:52 AM, "Luis Paulo" <luis.barbas@gmail.com> wrote:
>
> On Sun, May 16, 2010 at 11:06 PM, Michel Racic <michel.racic@gmail.com>
> wrote:
>> Hi Tom
>>
>> Thanks f...
>
> Hi, Michel
>
> So, I would try
>
> $ sudo vgreduce data /dev/sdb1
>
> My only concerns is that sdb1 is the only pv of the volume.
>
> Will not run the pvmove, that may mess your data
>
> Then I'll try to mount it and try to get access the data
>
> If sucess, I'll do a backup. You will not be in this situation if you
> had one. Maybe there's a reason for not to have one.
>
> If it doesn't work or after the backup, I will run the pvremove
>
> (From man pvremove)
> "pvremove wipes the label on a device so that LVM will no longer
> recognise it as a physical volume."
>
> Hope Tom may give his opinion to this too.
> Regards
> Luis

Good thinking

see you soon, hope with good news
Luis

PS: please post bottom, after the quote. If you please. Thanks.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 06:25 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org