From: Marian Csontos <mcsontos@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: fakhreddine HABIB <fakhreddine2006@gmail.com>
Subject: Re: [linux-lvm] create physical partition from logical partition
Date: Thu, 07 Feb 2013 14:02:13 +0100 [thread overview]
Message-ID: <5113A5D5.3070808@redhat.com> (raw)
In-Reply-To: <CAMugGiGoVAKVTXHrcTwLOkiGCOF_iK5BsGKPo-5bHhXiC-f4tg@mail.gmail.com>
On 02/06/2013 06:10 PM, fakhreddine HABIB wrote:
> Hi,
>
> I nead please your help to create a physical partition from a logical
> partition.
>
> I present my problem : I have the configuration (attached pic) of the
> partitions.
>
> I use the centos system. The problem that my group volume "vg_rega" use
> the whole of the physical disk. I want to install Ubuntu system with centos
> (dual boot), but i need a physical partition to do that. How can'i convert
> the " Unused Space " logical partition to physical partition to install
> Ubuntu.
1st: backup your data! Though operations should be safe, there is always
human factor and other risks.
Before creating a new partition you will need to resize (shrink) the PV:
pvresize --pvresize --setphysicalvolumesize DESIRED_PV_SIZE /dev/sda2
pvresize should be safe: it will only shrink PV when there is free space
at the end, but does not relocate LVs if the free space is in the
middle. In that case you will need to move the extents first:
pvmove --alloc anywhere /dev/sda2:OLDSTART-OLDEND /dev/sda2
This may not work correctly and allocate data in the region being moved
from (which needs to verify with latest version and report)
Then you should be able to shrink the sda2 partition, using parted or
fdisk. This may be the riskiest part.
However, Ubuntu is able to use Logical Volumes, so you should not need
to add more physical partitions: for me "dualboot" of 2 linux systems
with single /boot partition worked mostly fine - except when one is
using old grub (CentOS) and another grub2 (ubuntu), but even that is not
impossible...
-- Marian
>
> Thank you.
>
> F.H
>
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
prev parent reply other threads:[~2013-02-07 13:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 17:10 [linux-lvm] create physical partition from logical partition fakhreddine HABIB
2013-02-07 11:01 ` [linux-lvm] Re : " georges.giralt
2013-02-07 13:02 ` Marian Csontos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5113A5D5.3070808@redhat.com \
--to=mcsontos@redhat.com \
--cc=fakhreddine2006@gmail.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).