[Bug 569900] Re: partman sometimes creates partitions such that there is ambiguity between whether the superblock is on the disk device or the partition device

astrostl 569900 at bugs.launchpad.net
Sat Dec 15 03:07:36 UTC 2012


I think I ran into this.  Have an 11.04 system, set up ways unknown.
sdc1 and sdd1 were mirrored via mdadm, and sdd failed.  I replaced it
with an identical drive, fdisked it, and was told that it was too small
when I tried to add it back into the array.

fdisk -l /dev/sdc output:

Disk /dev/sdc: 300.1 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008dc33

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       36482   293035008   fd  Linux raid autodetect

36481 cylinder disk, with a partition ending on non-existent cylinder
36482.

I could get it to start rebuilding by adding the entire /dev/sdd device
rather than a partition, but it felt weird pairing a partition with a
device.  I dug around a bit on Google, and ended up here.

My "solution": sfdisk -d /dev/sdc|sfdisk --force /dev/sdd (using --force
because sfdisk doesn't like the way sdc1 looks either).

That got me a clone of sdc's partition layout.  It doesn't explain how
it got there to start, though, or if I'm skating on thin ice overall.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/569900

Title:
  partman sometimes creates partitions such that there is ambiguity
  between whether the superblock is on the disk device or the partition
  device

Status in “grub2” package in Ubuntu:
  Invalid
Status in “partman-base” package in Ubuntu:
  Fix Released
Status in “grub2” source package in Lucid:
  Invalid
Status in “partman-base” source package in Lucid:
  Fix Released
Status in “grub2” source package in Maverick:
  Invalid
Status in “partman-base” source package in Maverick:
  Fix Released

Bug description:
  Binary package hint: mdadm

  In a KVM, I can do this just fine:

   * Using 2 virtual disk images
   * Install Lucid Server amd64
   * Both disks partitioned to just one large Linux raid partition
   * RAID1 these two together, /dev/md0
   * Put / on an ext4 filesystem on /dev/md0
   * Install

  The above works.

  However, I have spent my entire weekend trying to get 10.04 on a RAID1
  of two 500GB SATA disks, without success.

  I partitioned them the same as above.  And conducted the install.

  When I boot into the new system, I get dropped to an initramfs shell.

  I can see that /dev/md0 exists, and is in the process of resyncing.

  I try to "mount /dev/md0 /root" and I get:
  mount: mounting /dev/md0 on /root/ failed: Invalid argument

  Also, see something else that's odd...  My /dev/md0 looks "correct",
  in that it's composed of /dev/sda1 and /dev/sdb1.  However, I also see
  a /dev/md0p1, which is composed of /dev/sda and /dev/sdb (the whole
  disks?).  Furthermore, if I go into /dev/disk/by-uuid, there is only
  one symlink there, pointing to /dev/md0p1.  And this UUID is what is
  in fact in grub as the root device.  That looks quite wrong.

  This looks pretty release-critical, to me, as it's affecting RAID
  installs of the server.

  TEST CASE: The above problem should arise when attempting a RAID
  install on any disk whose size is between 1048576*n+512 and
  1048576*n+65535 bytes, for integer values of n.  In order to reproduce
  this, the root filesystem should be created on a RAID array whose
  member devices extend all the way to the end of the disk (i.e. accept
  the default size for the partition in the installer).

  To validate this from -proposed (once available), please note that you
  will need to use a netboot installation image and boot with apt-
  setup/proposed=true on the kernel command line.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/569900/+subscriptions




More information about the foundations-bugs mailing list