[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: e2fsck /dev/md0 issues




Boyd Stephen Smith Jr. wrote:
On Sunday 2008 December 21 01:02:04 M.Lewis wrote:
Boyd Stephen Smith Jr. wrote:
On Saturday 2008 December 20 22:42:10 M.Lewis wrote:
The filesystem size (according to the superblock) is 244190000 blocks
                                                       ^^^^^^^^^

The physical size of the device is 244189984 blocks
                                     ^^^^^^^^^

244190000 > 244189984.  You need to resize your filesystem to actually
fit on /dev/md0.
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes

I'm confused. It's complaining about bad partition or superblock. You
said I need to resize my fs, but according to fdisk, they are the same.
Aren't they?

Your filesystem isn't on raw partitions. It is on the /dev/md0 device. That device is 244189984 blocks, as e2fsck told you. You could also use blockdev --getsize64 to get the size of the device in bytes.

The "bad partition" part of the message is a bit misleading, it means "bad block device" but was written with the assumption that the block device the filesystem is on is a partition and not something else. In your case it is a software RAID device. The "bad ... superblock" it is talking about is the ext2/3 superblock that contains the filesystem information.

The block device (/dev/md0) and the ext2/3 superblock (stored multiple times on /dev/md0) disagree on the size of the filesystem. The boot process (IIRC, mount in specific) correctly assumes that one of them must be wrong and thus "bad".

I assume that /dev/md0 knows it's size, so the filesystem superblock is bad and you should correct it by resizing the filesystem.

Is there a way to know for certain that /dev/md0 knows the correct size?

Maybe what I should do is break the array and start over? Making sure that e2fsck on both drives is good to go beforehand of course.

Maybe that is a more drastic action than is needed though.


Are you talking about LVM sizing?

I'm not sure what you mean by "LVM sizing". I am talking about the size of the device you've put the filesystem on, and it really doesn't matter if it's on a LV or not.

Well, part of my confusion is over my previous topic of reorgainizing LVM. Same machine, still working on it.

At the moment, the RAID1 array is not part of LVM.


BTW, in case you didn't know, modern software RAID uses some space on the component block devices to store a RAID superblock that contains the UUID of array, among other things, by default. This can be turned off, but it would require re-creating the array. This means that a RAID-1 over two devices will be slightly smaller than the smallest device and RAID-0 over two devices will be slightly smaller than twice the smallest device.

No, I wasn't aware of that. Thanks.

--

 IBM: Innovation By Management
  01:55:01 up 4 days,  1:32,  1 user,  load average: 0.04, 0.03, 0.01

 Linux Registered User #241685  http://counter.li.org


Reply to: