[prev in list] [next in list] [prev in thread] [next in thread] 

List:       evms-devel
Subject:    [Evms-devel] Fw: [Evms-cluster] Expanding OCFS2 Partition after LUN
From:       Steve Dobbelstein <steved () us ! ibm ! com>
Date:       2009-04-20 18:33:24
Message-ID: OF773FD6DC.47F8029B-ON8625759E.0065D68C-8625759E.0065EF8A () us ! ibm ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Sorry, Jason.  I didn't mean to call you Jim.  I don't know where that came
from.  My apologies.>

Steve D.

----- Forwarded by Steve Dobbelstein/Austin/IBM on 04/20/2009 01:32 PM
-----

Steve Dobbelstein/Austin/IBM wrote on 04/20/2009 12:50:12 PM:

> Steve Dobbelstein/Austin/IBM
> 04/20/2009 12:50 PM
>
> To
>
> "Jason Ngim" <jason_ngim@osedge.com>
>
> cc
>
> evms-cluster@lists.sourceforge.net, evms-devel@lists.sourceforge.net
>
> Subject
>
> Re: [Evms-cluster] Expanding OCFS2 Partition after LUN has been
> increased in size
>
> "Jason Ngim" <jason_ngim@osedge.com> wrote on 04/13/2009 07:01:37 AM:
>
> > "Jason Ngim" <jason_ngim@osedge.com>
> > 04/13/2009 07:01 AM
> >
> > To
> >
> > <evms-cluster@lists.sourceforge.net>
> >
> > cc
> >
> > Subject
> >
> > [Evms-cluster] Expanding OCFS2 Partition after LUN has been
> increased in size
> >
> > Dear Gurus
> >
> > I have a SAN storage connected to 2 servers using Fibre Optics.
> >
> > In it i have created 4 LUNs. for future expansions, the LUNS will be
> > resized to be bigger, and the OCFS2 partition will also be expanded.
> > Please tell me how i can achieve it using EVMS.
> >
> > example:
> >
> > before
> > /dev/sdb  50GB
> >    /dev/sdb1 50GB  (formated using OCFS2)
> >
> > after
> > /dev/sdb  100GB
> >   /dev/sdb1 100GB (size is also expanded not creating another
> > logical partition)
> >
> > i would like to know how i can configure so that the /dev/sdb1 can
> > be logically expanded to the new size.
> > Thank you very much!!
> >

> > Best Regards
> > Jason

> Hi, Jim.
>
> Sorry for the late reply.
>
> The normal way you would go about expanding a volume is to target/
> select the volume for expansion rather than the segment.  That is,
> one might initially think of expanding the segment, e.g., /dev/sdb1,
> first.  However, since EVMS coordinates the expansion of the segment
> with the expansion of the volume, it needs to know the volume that
> is being expanded.  After all, that is what you want in the end is a
> bigger volume.
>
> After that explanation, here is the bad news.  Looking at the source
> code for the OCFS2 plug-in for EVMS, I see that it does not support
> expanding or shrinking a volume.  :(  I assume that at the time the
> author wrote the plug-in that OCFS2 did not support changing the
> size of a volume.  Looking on the web I see that the tune.ocfs2
> utility is supposed to allow you to change the volume size, among
> other things.  For now, you will have to expand the volume by hand
> -- use fdisk to expand /dev/sdb1 and then use tune.ocfs2 to expand
> the OCFS2 volume.  You will have to do that outside of EVMS, i.e.,
> don't be running EVMS at the same time you do the expansion.  EVMS
> will not pick up the changes if you do.  EVMS should pick up the
> changes from your manual expansion the next time it is started.
> This will work if you did a mkfs of OCFS2 on the "compatibility
> volume" /dev/evms/sdb1.  That is, you did not make an "EVMS volume"
> from /dev/sdb1 and then put OCFS2 on the EVMS volume.
>
> If you made /dev/sdb1 into an EVMS volume then the procedure gets
> more complicated.  The metadata for the EVMS volume will need to be
> migrated for the new volume size.  (EVMS volume metadata appears at
> the end of the device.)  If you are OK with backing up and restoring
> your data, the simplest thing to do would be:
> 1. Backup the data.
> 2. Delete the OCFS2 volume.
> 3. Expand /dev/sdb1.
> 4. Recreate the EVMS volume from /dev sdb1.
> 5. Put OCFS2 on the volume.
> 6. Restore your data.
>
> If you need to leave your data intact, the following procedure
> should work (off the top of my head, no testing, no guarantees):
> 1. Backup the data, just in case.
> 2. With EVMS not running, use fdisk to expand /dev/sdb1.
> 3. Temporarily move /lib/evms/<evms-version>/ocfs2* out of the /lib/
> evms/<evms-version>/ directory so that EVMS will not load the plug-
> in adn therefore will not be able to recognize /dev/sdb1 as an OCFS2
volume.
> 4. Start EVMS.
> 5. Recreate the EVMS volume from /dev/sdb1.  This will put the EVMS
> volume metadata at the end of /dev/sdb1.
> 6. Save the changes.  You will now have a volume /dev/evms/<name>.
> 7. Run tune.ocfs2 on /dev/evms/<name> to set the new size.  Do not
> run tune.ocfs2 on /dev/sdb1 or it will most likely blow away the
> EVMS volume metadata at the end of /dev/sdb1.
> 8. Move the OCFS2 plug-in back into the /lib/evms/<evms-version>/
directory.
> 9. Now when you start EVMS again you should see the OCFS2 volume
> with the new size.
>
> Your other option is to write up a patch for the OCFS2 plug-in to
> give it the ability to resize OCFS2 volumes. :)
>
> Hope this helps.
>
> Steve D.
[Attachment #5 (text/html)]

<html><body>
<p>Sorry, Jason.  I didn't mean to call you Jim.  I don't know where that came from.  \
My apologies.<br> <br>
Steve D.<br>
<br>
<font size="2" color="#800080">----- Forwarded by Steve \
Dobbelstein/Austin/IBM</font><font size="2" color="#800080"> on 04/20/2009 01:32 \
PM</font><font size="2" color="#800080"> -----</font><br> <br>
<tt>Steve Dobbelstein/Austin/IBM wrote on 04/20/2009 12:50:12 PM:<br>
<br>
&gt; Steve Dobbelstein/Austin/IBM</tt><br>
<tt>&gt; 04/20/2009 12:50 PM</tt><br>
<tt>&gt; <br>
&gt; To</tt><br>
<tt>&gt; <br>
&gt; &quot;Jason Ngim&quot; &lt;jason_ngim@osedge.com&gt;</tt><br>
<tt>&gt; <br>
&gt; cc</tt><br>
<tt>&gt; <br>
&gt; evms-cluster@lists.sourceforge.net, evms-devel@lists.sourceforge.net</tt><br>
<tt>&gt; <br>
&gt; Subject</tt><br>
<tt>&gt; <br>
&gt; Re: [Evms-cluster] Expanding OCFS2 Partition after LUN has been <br>
&gt; increased in size</tt><br>
<tt>&gt; <br>
&gt; &quot;Jason Ngim&quot; &lt;jason_ngim@osedge.com&gt; wrote on 04/13/2009 \
07:01:37 AM:<br> &gt; <br>
&gt; &gt; &quot;Jason Ngim&quot; &lt;jason_ngim@osedge.com&gt; </tt><br>
<tt>&gt; &gt; 04/13/2009 07:01 AM</tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; To</tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; &lt;evms-cluster@lists.sourceforge.net&gt;</tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; cc</tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; Subject</tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; [Evms-cluster] Expanding OCFS2 Partition after LUN has been <br>
&gt; increased in size</tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; Dear Gurus </tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; I have a SAN storage connected to 2 servers using Fibre Optics. </tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; In it i have created 4 LUNs. for future expansions, the LUNS will be<br>
&gt; &gt; resized to be bigger, and the OCFS2 partition will also be expanded.<br>
&gt; &gt; Please tell me how i can achieve it using EVMS. </tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; example: </tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; before </tt><br>
<tt>&gt; &gt; /dev/sdb &nbsp;50GB </tt><br>
<tt>&gt; &gt; &nbsp; &nbsp;/dev/sdb1 50GB &nbsp;(formated using OCFS2) </tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; after </tt><br>
<tt>&gt; &gt; /dev/sdb &nbsp;100GB </tt><br>
<tt>&gt; &gt; &nbsp; /dev/sdb1 100GB (size is also expanded not creating another <br>
&gt; &gt; logical partition) </tt><br>
<tt>&gt; &gt; <br>
&gt; &gt; i would like to know how i can configure so that the /dev/sdb1 can <br>
&gt; &gt; be logically expanded to the new size. </tt><br>
<tt>&gt; &gt; Thank you very much!! </tt><br>
<tt>&gt; &gt; <br>
</tt><br>
<tt>&gt; &gt; Best Regards </tt><br>
<tt>&gt; &gt; Jason <br>
</tt><br>
<tt>&gt; Hi, Jim.</tt><br>
<tt>&gt; <br>
&gt; Sorry for the late reply.</tt><br>
<tt>&gt; <br>
&gt; The normal way you would go about expanding a volume is to target/<br>
&gt; select the volume for expansion rather than the segment. &nbsp;That is, <br>
&gt; one might initially think of expanding the segment, e.g., /dev/sdb1,<br>
&gt; first. &nbsp;However, since EVMS coordinates the expansion of the segment<br>
&gt; with the expansion of the volume, it needs to know the volume that <br>
&gt; is being expanded. &nbsp;After all, that is what you want in the end is a<br>
&gt; bigger volume.</tt><br>
<tt>&gt; <br>
&gt; After that explanation, here is the bad news. &nbsp;Looking at the source<br>
&gt; code for the OCFS2 plug-in for EVMS, I see that it does not support <br>
&gt; expanding or shrinking a volume. &nbsp;:( &nbsp;I assume that at the time the \
<br> &gt; author wrote the plug-in that OCFS2 did not support changing the <br>
&gt; size of a volume. &nbsp;Looking on the web I see that the tune.ocfs2 <br>
&gt; utility is supposed to allow you to change the volume size, among <br>
&gt; other things. &nbsp;For now, you will have to expand the volume by hand <br>
&gt; -- use fdisk to expand /dev/sdb1 and then use tune.ocfs2 to expand <br>
&gt; the OCFS2 volume. &nbsp;You will have to do that outside of EVMS, i.e., <br>
&gt; don't be running EVMS at the same time you do the expansion. &nbsp;EVMS <br>
&gt; will not pick up the changes if you do. &nbsp;EVMS should pick up the <br>
&gt; changes from your manual expansion the next time it is started. &nbsp;<br>
&gt; This will work if you did a mkfs of OCFS2 on the &quot;compatibility <br>
&gt; volume&quot; /dev/evms/sdb1. &nbsp;That is, you did not make an &quot;EVMS \
volume&quot; <br> &gt; from /dev/sdb1 and then put OCFS2 on the EVMS volume.</tt><br>
<tt>&gt; <br>
&gt; If you made /dev/sdb1 into an EVMS volume then the procedure gets <br>
&gt; more complicated. &nbsp;The metadata for the EVMS volume will need to be <br>
&gt; migrated for the new volume size. &nbsp;(EVMS volume metadata appears at <br>
&gt; the end of the device.) &nbsp;If you are OK with backing up and restoring<br>
&gt; your data, the simplest thing to do would be:</tt><br>
<tt>&gt; 1. Backup the data.</tt><br>
<tt>&gt; 2. Delete the OCFS2 volume.</tt><br>
<tt>&gt; 3. Expand /dev/sdb1.</tt><br>
<tt>&gt; 4. Recreate the EVMS volume from /dev sdb1.</tt><br>
<tt>&gt; 5. Put OCFS2 on the volume.</tt><br>
<tt>&gt; 6. Restore your data.</tt><br>
<tt>&gt; <br>
&gt; If you need to leave your data intact, the following procedure <br>
&gt; should work (off the top of my head, no testing, no guarantees):</tt><br>
<tt>&gt; 1. Backup the data, just in case.</tt><br>
<tt>&gt; 2. With EVMS not running, use fdisk to expand /dev/sdb1.</tt><br>
<tt>&gt; 3. Temporarily move /lib/evms/&lt;evms-version&gt;/ocfs2* out of the \
/lib/<br> &gt; evms/&lt;evms-version&gt;/ directory so that EVMS will not load the \
plug-<br> &gt; in adn therefore will not be able to recognize /dev/sdb1 as an OCFS2 \
volume.</tt><br> <tt>&gt; 4. Start EVMS.</tt><br>
<tt>&gt; 5. Recreate the EVMS volume from /dev/sdb1. &nbsp;This will put the EVMS \
<br> &gt; volume metadata at the end of /dev/sdb1.</tt><br>
<tt>&gt; 6. Save the changes. &nbsp;You will now have a volume \
/dev/evms/&lt;name&gt;.</tt><br> <tt>&gt; 7. Run tune.ocfs2 on /dev/evms/&lt;name&gt; \
to set the new size. &nbsp;Do not <br> &gt; run tune.ocfs2 on /dev/sdb1 or it will \
most likely blow away the <br> &gt; EVMS volume metadata at the end of \
/dev/sdb1.</tt><br> <tt>&gt; 8. Move the OCFS2 plug-in back into the \
/lib/evms/&lt;evms-version&gt;/ directory.</tt><br> <tt>&gt; 9. Now when you start \
EVMS again you should see the OCFS2 volume <br> &gt; with the new size.</tt><br>
<tt>&gt; <br>
&gt; Your other option is to write up a patch for the OCFS2 plug-in to <br>
&gt; give it the ability to resize OCFS2 volumes. :)</tt><br>
<tt>&gt; <br>
&gt; Hope this helps.</tt><br>
<tt>&gt; <br>
&gt; Steve D.</tt></body></html>



------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p

_______________________________________________
Evms-devel mailing list
Evms-devel@lists.sourceforge.net
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic