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

List:       evms-devel
Subject:    Re: [Evms-devel] Re: how to get rid of "bbr-plugin over raid0"
From:       Kevin Corry <kevcorry () us ! ibm ! com>
Date:       2005-01-10 20:00:34
Message-ID: 200501101400.34852.kevcorry () us ! ibm ! com
[Download RAW message or body]

Hi Martin,

On Monday 10 January 2005 12:52 pm, Martin wrote:
> Kevin Corry wrote:
> > You'll need to start by deactivating the BBR object. If you're using
> > EVMS-2.4.x or later, you can use evms[n|gui] to deactivate this object.
> > Remember, it's not just the top-level volume, it's the actual BBR
> > feature-object that the volume is built from that needs to be
> > deactivated. Go to the "Feature-Objects" panel in evms[n|gui] to find it.
> > After you do this, save-changes and exit evms[n|gui].
>
> i deactivated bbr_md0. evms will stay active, right?

It will only deactivate that object. All other objects and volumes will remain 
active.

> > Next, you need to get the size of the raid-0 region. If we assume your
> > raid-0 is called md0, then run:
> >
> > blockdev --getsize /dev/evms/.nodes/md/md0
>
> The size is 937971200
>
> > which will print the number of sectors in md0. For the sake of this
> > example, we'll assume you have 2048 sectors in md0. The last two sectors
> > of md0 hold the BBR feature-headers, so you just need to delete those two
> > sectors. Use this command:
> >
> > dd if=/dev/zero of=/dev/evms/.nodes/md/md0 seek=2046 bs=512 count=2
>
> i did dd if=/dev/zero of=/dev/evms/.nodes/md/md0 seek=937971198  bs=512
> count=2

Looks good.

> every thing worked fine until here.
>
> [OT: i have copied the last two sectors (dd if=/dev/evms/.nodes/md/md0
> of=/root/bbr_feture_header seek=937971198  bs=512 count=2) to a file as
> backup. dd said it copied 1024 byte but the file is 450MB big. Why is that]

You didn't actually copy the last two sectors. See the man-page for dd. The 
"seek" option only affects the output file. What you really wanted to do here 
was "skip=937971198". So you actually copied the first two sectors of md0, 
and wrote them to offset 937971198*512 bytes into /root/bbr_feature_header. 
That explains the large size for that file.

> > Obviously, adjust the 2046 number as appropriate for the actual size of
> > your raid-0 region.
>
> So my new size is 937971198 but i don't know how change the size of the
> raid-0 region.

Nothing about the RAID-0 region is going to change. It's size is still 
937971200 sectors.

> Google said something about mdadm but mdadm does not recognize my raid.
> io:~# mdadm -D /dev/evms/md/md0
> mdadm: /dev/evms/md/md0 does not appear to be an md device
> io:~# mdadm -D /dev/evms/.nodes/md/md0
> mdadm: /dev/evms/.nodes/md/md0 does not appear to be an md device

These errors are due to the fact that EVMS uses Device-Mapper instead of the 
MD driver to manage RAID-0. Since /dev/evms/.nodes/md/md0 doesn't have MD's 
major number, mdadm refuses to look at it.

> > Now you can start evms[n|gui] again, and your BBR volume should be gone
> > and you should see a /dev/evms/md/md0 volume. You can mount this volume
> > and see your filesystem just as before.
>
> i was curious and started evmsn without setting the new size above. The
> bbr_md0 is gone. Everything looks fine, but the correct size must be set
> before i can mount the volume?

Nothing else needs to be set. You can simply mount /dev/evms/md/md0 at the 
same mount-point where you used to mount the BBR volume.

Technically, there is a small bit of unused space at the end of md0 that the 
filesystem isn't using (where the BBR metadata used to be). It's probably an 
insignificant amount of space to worry about, but if you want you can use the 
filesystem tools to expand the filesystem into this extra space. The exact 
tool to use depends on what type of filesystem you're using. Let me know 
which fs you have on that volume, and I'll send you the command to use to 
resize it.

-- 
Kevin Corry
kevcorry@us.ibm.com
http://evms.sourceforge.net/


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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