-2

I want to create a ext4 filesystem on sda, sdb, and sdc and mount them to use them but I don't know how to handle all the raid stuff.

lsblk output:

NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0 111.8G  0 disk
|-sda1    8:1    0     8G  0 part
| `-md0   9:0    0     8G  0 raid1 [SWAP]
|-sda2    8:2    0   512M  0 part
| `-md1   9:1    0 511.4M  0 raid1 /boot
`-sda3    8:3    0 103.3G  0 part
  `-md2   9:2    0 206.5G  0 raid5 /
sdb       8:16   0   2.7T  0 disk
|-sdb1    8:17   0     8G  0 part
| `-md0   9:0    0     8G  0 raid1 [SWAP]
|-sdb2    8:18   0   512M  0 part
| `-md1   9:1    0 511.4M  0 raid1 /boot
`-sdb3    8:19   0 103.3G  0 part
  `-md2   9:2    0 206.5G  0 raid5 /
sdc       8:32   0   2.7T  0 disk
|-sdc1    8:33   0     8G  0 part
| `-md0   9:0    0     8G  0 raid1 [SWAP]
|-sdc2    8:34   0   512M  0 part
| `-md1   9:1    0 511.4M  0 raid1 /boot
`-sdc3    8:35   0 103.3G  0 part
  `-md2   9:2    0 206.5G  0 raid5 /

fdisk -l /dev/sda output:

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x17dd98e6

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sda1           2048  16779264  16777217     8G fd Linux raid autodetect
/dev/sda2       16781312  17829888   1048577   512M fd Linux raid autodetect
/dev/sda3       17831936 234439600 216607665 103.3G fd Linux raid autodetect

fdisk -l /dev/sdb (sdc is nearly the same) output :

Disk /dev/sdb: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x788018fb

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sdb1           2048  16779264  16777217     8G fd Linux raid autodetect
/dev/sdb2       16781312  17829888   1048577   512M fd Linux raid autodetect
/dev/sdb3       17831936 234439600 216607665 103.3G fd Linux raid autodetect

So how do I create filesystems on sda, sdb, sdc and mount them?

foxneSs
  • 105
  • 1
  • 2
    You don't. You configure them for RAID, then create filesystems on the resultant md* devices. – Shadur Apr 16 '16 at 11:11
  • @Shadur is it even possible to use the all the available space of the two 3 TB drives in this situation? – foxneSs Apr 16 '16 at 11:37
  • 1
    If you build a RAID0 out of these two drives, yes. With a RAID1 you lose 50% with a 2 drive setup but you gain secuity for your data. – Izac Apr 16 '16 at 12:04

2 Answers2

1

After creating your RAID you just format them using the RAID Device like this:

mkfs.ext4 /dev/md0
chicks
  • 3,793
  • 10
  • 27
  • 36
0

After a bit of reading I realized that my question is incorrect. I wanted to know how to create partitions (not filesystems) on a disk with raid partitions. I used cfdisk to do that. But now I have another question: how come there is a 215 gb raid disk in a ~112 gb disk? Makes no sense to me.

foxneSs
  • 105
  • 1