Problem adding a new smaller partition in array

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

 



Hello,

First, sorry for my request sent to the list, instead of the robot. That's a 
long time I didn't make such mistake :o/

I have a problem with my raid config. Let me expose all the facts.

My system (debian etch) is totally (even the MBR) installed using 2 disks in 
raid 1 (4 partitions). Initially, the 2 disks where exaclty the same. Two 
months ago, I had a crash. Checking the log file, I found that it occured 
during the checkarray command (launched every first sunday of the month). I 
also saw some strange errors on hda device. Before changing something 
(could be the disk, the cable...), I waited to see more explicit errors. 
But no error occured during the next month. And last sunday, it crashed 
again during the checkarray command. Then, after relaunching the system, 
all freezed because there where too much errors on hda device (bad 
sectors...) during the synchronisation of the raid. So I decided to change 
the hda drive.

My spare drive is a little bit smaller (40GB, instead of 41.1GB) that the 
previous one (and so, the other one in the array). So, the last partition 
(hda4) is now smaller than hdb4, and the raid can't add it in the array 
("No space left on device").

I then shrinked the filesystem, using resize_reiserfs, reduced the partition 
on hdb4 to be smaller (it can't be equal) than hda4, and tried to re 
assemble the array. Then, I get:

  # mdadm --assemble /dev/md3
  mdadm: /dev/hdb4 has no superblock - assembly aborted

Why superblock has been removed? What have I done wrong?

If I try to re create the array:

  # mdadm --create --verbose /dev/md3 -l 1 -n 2 /dev/hda4 /dev/hdb4
  mdadm: /dev/hda4 appears to be part of a raid array:
      level=raid1 devices=2 ctime=Fri Nov  4 11:07:04 2005
  mdadm: /dev/hdb4 appears to contain a reiserfs file system
      size = 27040320K
  mdadm: size set to 29061504K
  Continue creating array? no
  mdadm: create aborted.

So, it seems that mdadm recognizes the filesystem. But does it destroy it if 
I proceed (using --force)?

The other strange thing, is that the superblock is ok on hda4, the drive I 
changed! Who created it? The --assemble command?

Before I lost my datas (well, they are backuped up, but I would like to be 
able to reconstruct my raid without the need to re install datas), what do 
you suggest?

Do I have to force the creation using only the hdb4 partition? Then, adding 
the hda4 device? Do I have to first zero the superblock on this device?

I also read something about event counters not matching, which could dive to 
loose datas (wrong sync way)...

Any advice welcome. And if I did something wrong, please let me know, to be 
able to do it right next time!

-- 
   Frédéric
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux