Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently had to do some troubleshooting with a RAID 5 on Ubuntu Server (a software raid).

I ended up removing everything and start from scratch with 2 new drives.

So I took out 2 out of 4 drives, replaced them with 2 new drives redid the raid, formatted the raid etc.

But I think I forgot something, cause when I do

sudo parted -l

I get this:

Model: ATA WDC WD20EFRX-68A (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
1      1049kB  2000GB  2000GB  primary  ext4         raid


Model: ATA WDC WD20EFRX-68A (scsi)
Disk /dev/sdc: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
1      1049kB  2000GB  2000GB  primary  ext4         raid


Model: ATA ST2000VN000-1H31 (scsi)
Disk /dev/sdd: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
1      1049kB  2000GB  2000GB  primary               raid


Model: ATA ST2000VN000-1H31 (scsi)
Disk /dev/sde: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
1      1049kB  2000GB  2000GB  primary               raid


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

Number  Start   End     Size    File system  Name  Flags
1      17.4kB  6001GB  6001GB  ext4

Two of the drives have filessytem ext4 and the other two have no filesystem. The raid is currently resyncing and I can't stop it.

How do I give the other two new drives a filesystem?

Because when I try to mount the raid it says that it's the wrong filesystem specfied or a bad superblock.

It's a clean slate so it I don't care about the data on the disks.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

If it's a RAID, using mdadm and 1.2 metadata (check /proc/mdstat), there should be no ext4 on the first two. If it's an older format (1.0 or 0.90), parted may misdetect one or two drives as being ext4, which you should ignore.

In any case, you have to format the RAID device itself (/dev/mdX), not the individual partitions. And instead of formatting directly as one big filesystem, you may opt to use LVM and then format the individual volumes you create on your RAID device.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.