LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] recover md superblock?

[ILUG] recover md superblock?

gregwm ilug at scalliondata.com
Thu Aug 5 19:49:51 IST 2010


i wanted another primary partition.  my (rhel5) VG has lots of free
space.  i want to remote-install rhel6b2 from harddisc, seems an rhel6
askmethod install gets stuck initialising the nics.

so i shrunk the big PV with pvresize, shrunk the underlying raid1 with
mdadm, so far so good, but presumably the next step went awry, i
removed and recreated the underlying partitions with parted in attempt
to shrink them.  to cut to the chase, now the system boots and the LV
filesystem's fine, but at the same time lvm doesn't seem to think it
has any VG, PV, or LV anymore.

so, what should i have done, what can i do now, and where ought i be
asking these questions?

in more detail, i did
   pvresize --setphysicalvolumesize 280G /dev/md1       #(over)shrink
(regrow later to actual smaller size)
   mdadm --grow /dev/md1 --size=292000000               #(over)shrink
raid(in Kibibytes)
   parted
      sel /dev/sdb
         rm 2
         mkpart primary ext2 107MB 309970MB
            which gave error, so i presumed it had done nothing, but
         mkpart primary 107MB 309970MB
            this made it clear the prior mkpart had recreated the
partition afterall
         set 2 raid on
      sel /dev/sda
         rm 2
         mkpart primary 107MB 309970MB
            no fstype, no error
         set 2 raid on
   mdadm --grow /dev/md1
      mdadm: no changes to --grow

thinking perhaps parted's changes weren't visible yet, i rebooted,
with no problem.  now:
   mdadm --query /dev/md1
      /dev/md1: is an md device which is not active
      /dev/md1: No md super block found, not an md component.
   mdadm --examine /dev/sda2
      mdadm: No md superblock detected on /dev/sda2.
   mdadm --examine /dev/sdb2
      mdadm: No md superblock detected on /dev/sdb2.
and vgs, pvs, and lvs all produce no output.

so, is there any way to recover or rebuild the md superblock?  is this
what i actually need to do?  i'd expect someone somewhere has been
here before, or at least knows better about this stuff than i do..

also, if mdadm doesn't think there's a raid anymore, still perhaps
some layer in the kernel knows better, or are current filesystem
changes only going to sda perhaps?  how might i probe this?  or
recover from it?  mounted filesystems do bear the proper LV device
names fwiw..


More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell