[Linux] Combining partitions

Steven Benmosh linux@flux.org
Mon, 18 Aug 2008 21:36:14 -0600


------=_Part_706_20454945.1219116974640
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Wouldn't it be simpler to mount /free under /photos? I have done it once
several years ago, when I added a second drive. I believe I mounted the new
drive as a file under /home/someuser, using the mount command.

Someone more knowledgeable than myself, please add specifics (mount --bind
/free /photos/free?)!

Z.



On Mon, Aug 18, 2008 at 2:19 PM, <kwan@digitalhermit.com> wrote:

> Quoting David Williams <dwilliams@dtw-consulting.com>:
>
>  I think what I am after is LVM, but now you've got me wondering.  So, with
>> this I can add other partitions to the logical partition to increase the
>> space on the logical partition ?
>>
>> Do I then need to always access this via the logical partition name ?
>>
>
> It sounds like LVM2 will do what you want, but there are some
> clarifications:
>
> You can't just "merge" the two partitions.. It is a copy/delete operation
> that you will do. That is, if you don't already have enough free space in
> the volume group or filesystem associated with the destination partition,
> then you will need to copy the source files elsewhere then copy them back.
> Say you have logical volumes lv_data1 and lv_data2 of 20G apiece, mounted
> as /data1 and /data2. You want to merge /data2 to be part of /data1. Both
> are in the volume group vg_data, but vg_data has only 1G space available to
> allocation. To "merge" the /data1 and /data2 partitions you'd first need to
> copy /data2 to other storage. Next you'd unmount /data2, delete the LV (thus
> freeing its LPs/PPs back to the volume group), then expand /data1 with the
> space you just reclaimed. Finally you can copy the original /data2 stuff to
> the resized /data1.
>
>
> _______________________________________________
> Linux mailing list
> Linux@flux.org
> http://www.flux.org/mailman/listinfo/linux
>



-- 
Check out my web site - www.words2u.net

------=_Part_706_20454945.1219116974640
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">Wouldn&#39;t it be simpler to mount /free under /photos? I have done it once several years ago, when I added a second drive. I believe I mounted the new drive as a file under /home/someuser, using the mount command. <br>
<br>Someone more knowledgeable than myself, please add specifics (mount --bind /free /photos/free?)!<br><br>Z.<br><br><br><br><div class="gmail_quote">On Mon, Aug 18, 2008 at 2:19 PM,  <span dir="ltr">&lt;<a href="mailto:kwan@digitalhermit.com">kwan@digitalhermit.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Quoting David Williams &lt;<a href="mailto:dwilliams@dtw-consulting.com" target="_blank">dwilliams@dtw-consulting.com</a>&gt;:<br>

<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think what I am after is LVM, but now you&#39;ve got me wondering. &nbsp;So, with<br>
this I can add other partitions to the logical partition to increase the<br>
space on the logical partition ?<br>
<br>
Do I then need to always access this via the logical partition name ?<br>
</blockquote>
<br></div>
It sounds like LVM2 will do what you want, but there are some clarifications:<br>
<br>
You can&#39;t just &quot;merge&quot; the two partitions.. It is a copy/delete operation that you will do. That is, if you don&#39;t already have enough free space in the volume group or filesystem associated with the destination partition, then you will need to copy the source files elsewhere then copy them back.<br>

Say you have logical volumes lv_data1 and lv_data2 of 20G apiece, mounted as /data1 and /data2. You want to merge /data2 to be part of /data1. Both are in the volume group vg_data, but vg_data has only 1G space available to allocation. To &quot;merge&quot; the /data1 and /data2 partitions you&#39;d first need to copy /data2 to other storage. Next you&#39;d unmount /data2, delete the LV (thus freeing its LPs/PPs back to the volume group), then expand /data1 with the space you just reclaimed. Finally you can copy the original /data2 stuff to the resized /data1.<div>
<div></div><div class="Wj3C7c"><br>
<br>
_______________________________________________<br>
Linux mailing list<br>
<a href="mailto:Linux@flux.org" target="_blank">Linux@flux.org</a><br>
<a href="http://www.flux.org/mailman/listinfo/linux" target="_blank">http://www.flux.org/mailman/listinfo/linux</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Check out my web site - <a href="http://www.words2u.net">www.words2u.net</a><br>
</div>

------=_Part_706_20454945.1219116974640--