[CentOS] CentOS 4 Software Raid1 questions

Wed Apr 27 22:33:53 UTC 2005
Lee Parmeter <leejpar at yahoo.com>

--- Les Mikesell <lesmikesell at gmail.com> wrote:
> On Wed, 2005-04-27 at 10:44, Aleksandar Milivojevic
> wrote:
> 
> > You'd need to resize file systems after you import
> partitions into MD. 
> > An e2fsck/resize2fs would take care of that.  Do an
> "fsck -f /dev/md0" 
> > (for example).  It will complain that information in
> superblock is wrong 
> > (partition size fsck sees is smaller than what it found
> in superblock). 
> >   Just answer "no" to abort question.  After you did
> fsck, you need to 
> > do "resize2fs /dev/md0".  Repeat for all md devices you
> created.
> > 
> > For above, the file systems should be either unmounted,
> or mounted read 
> > only.  The best thing to do is to boot from CD into
> rescue mode, and do 
> > all job from it.
> > 
> > The reason is that MD uses couple of last blocks for
> metadata 
> > information, and that space is no longer usable for
> file system data. 
> > So your /dev/md* metadisks will be slightly smaller
> than partitions you 
> > created them on.
> 
> What happens if existing files are on these blocks before
> you
> convert?
> 
> > When you are creating mirrors, make sure you list
> devices in right 
> > order.  Data is always copied from first disk you
> specify to second 
> > disk.  If you get them the wrong way around, you loose
> data.
> 
> Another approach that might be safer is to create a
> 'broken' mirror
> first by specifying the 2nd device as 'missing'.  Then
> you can build
> a filesystem on the md device and mount it somewhere and
> copy the
> files over from the existing partition.  Then unmount the
> old partition,
> remount the raid device in its place (adjusting
> /etc/fstab to match)
> and use mdadm to add the old partition into the new raid,
> which will
> hot-sync it to match the new setup.

Good idea, I will give this a try this evening. Thanks for
your input concerning this issue.
 
> > There are some rather good HOWTOs on this question
> (with much longer, 
> > detailed and better descriptions of migration process).
>  Use the Google 
> > Luke.
> 
> I looked for this and found lots of info on building
> RAIDs but none
> about preserving an existing filesystem while converting
> to a mirror.
> Can you provide a link or a good search term to pick that
> up?  Also,
> I have noticed that after syncing the mirrored drives,
> you can split
> them and mount a single drive from it into another
> machine without
> making an md device first.  (For example, if one part is
> on a
> USB/firewire drive, you can plug it into a different
> machine and mount
> the /dev/sda? partition it becomes.) However, I don't
> know if this is
> harmful or not.  Does anyone know if, after running a
> while in this mode
> it will still work correctly if detected as an md? device
> (with or
> without resyncing to a partner)?
> 
> -- 
>   Les Mikesell
>    les at futuresource.com
> 
> 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 

--
Lee Parmeter Emperor, linXos - The Flying Penguin
http://www.linXos.com
Linux Registered User #337161 

'It's free. It works. Duh.'" - Eric Harrison

The United States is NOT a democracy, it was founded as a Republic!

God is not a republican or a democrat nor is His government a democracy! - Lee Parmeter

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com