Fw: [Evms-cluster] Expanding OCFS2 Partition after LUN has been increased in size
Steve Dobbelstein <steved <at> us.ibm.com>
2009-04-20 18:33:24 GMT
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 <at> osedge.com>
>
> cc
>
> evms-cluster <at> lists.sourceforge.net, evms-devel <at> lists.sourceforge.net
>
> Subject
>
> Re: [Evms-cluster] Expanding OCFS2 Partition after LUN has been
> increased in size
>
> "Jason Ngim" <jason_ngim <at> osedge.com> wrote on 04/13/2009 07:01:37 AM:
>
> > "Jason Ngim" <jason_ngim <at> osedge.com>
> > 04/13/2009 07:01 AM
> >
> > To
> >
> > <evms-cluster <at> 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.
------------------------------------------------------------------------------
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 <at> lists.sourceforge.net
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel