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

Re: e2fsck /dev/md0 issues



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.

> 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.

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.
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss@iguanasuicide.net                     ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.net/                      \_/     

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: