2

I have created a raid 5 using mdadm on Debian. I used 2 new and 1 "old" disks. The old one had ext3 before. Using "parted -l" I noticed the raid has ext4 as filesystem but the old disk has ext3.

I used a guide one ubuntuusers to create the raid. Which means I executed:

sudo parted /dev/sde mklabel gpt 
sudo parted -a optimal -- /dev/sde mkpart primary 2048s -8192s  
sudo parted /dev/sde set 1 raid on 

for each disk and:

sudo mdadm --create /dev/md0 --auto md --level=5 --raid-devices=3 /dev/sdb1 /dev/sdd1 /dev/sde1

to create the raid. And

sudo mkfs.ext4 -b 4096 -E stride=128,stripe-width=384 /dev/md0 

to create the partition

now I noticed that parted -l shows ext4 for the raid but ext3 for the old disk (/dev/sde):

Model: ATA WDC WD30EFRX-68E (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags    
 1      1049kB  3001GB  3001GB               primary  raid

Model: ATA WDC WD30EFRX-68E (scsi)
Disk /dev/sdd: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  3001GB  3001GB               primary  raid


Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sde: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  3001GB  3001GB  ext3         primary  raid


Model: Linux Software RAID Array (md)
Disk /dev/md0: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  6001GB  6001GB  ext4

can this lead to any troubles concerning the raid? and would it be wise to recreate it with newly formatted disks?

cat /proc/mdstat output:

Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sde1[0] sdd1[3] sdb1[1]
      5860259840 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3]     [UUU]

unused devices: <none>
3
  • The filesystem on /dev/sde1 is irrelevant. The raid array will happily write over it
    – Outurnate
    Jun 20, 2015 at 15:45
  • You've replaced the disk devices in the mdadm --create command with elipsis but then enumerated them in the parted -l list. So: 1. Do they really match? 2. Your mdadm --create specified four RAID devices but you've only listed three. Full disclosure, please. 3. Output of cat /proc/mdstat please. Jun 20, 2015 at 17:51
  • sorry, raid consists of 3 devices, added cat /proc/mdstat output
    – Visions
    Jun 20, 2015 at 18:40

1 Answer 1

2

If you're using metadata 1.2 (4K from the start), maybe there's old filesystem metadata in those 4K that aren't used by mdadm. You could zero those:

dd bs=4k count=1 if=/dev/zero of=/dev/sde1

And see if that gets rid of the offending message.

In the future use wipefs on a partition before using that partition for anything else (mdadm, pvcreate, mkfs, parted, ...).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .