0

At the moment when I type lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT I get the following output:

NAME     SIZE FSTYPE            TYPE  MOUNTPOINT
sda      3.7T                   disk
├─sda1     1M                   part
├─sda2   512M swap              part  [SWAP]
├─sda3   3.6T linux_raid_member part
│ └─md2  3.6T ext4              raid1 /data
├─sda4  19.5G linux_raid_member part
│ └─md1 19.5G ext4              raid1 /
└─sda5   300M linux_raid_member part
  └─md0  299M ext4              raid1 /boot
sdb      3.7T                   disk
├─sdb1     1M                   part
├─sdb2   512M swap              part  [SWAP]
├─sdb3   3.6T linux_raid_member part
│ └─md2  3.6T ext4              raid1 /data
├─sdb4  19.5G linux_raid_member part
│ └─md1 19.5G ext4              raid1 /
└─sdb5   300M linux_raid_member part
  └─md0  299M ext4              raid1 /boot

When I type df -h I get

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs         16G     0   16G   0% /dev
tmpfs            16G     0   16G   0% /dev/shm
tmpfs            16G   65M   16G   1% /run
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/md1         20G  2.4G   16G  13% /
/dev/md0        282M  121M  143M  46% /boot
/dev/md2        3.6T  1.2G  3.4T   1% /data
tmpfs           3.2G     0  3.2G   0% /run/user/0
tmpfs           3.2G     0  3.2G   0% /run/user/48

I have only 1 volume with 3.4T and my goal is to have another volume /dev/md3 and to be mounted to /data2 and to be 3.4T as well, can you help me out to achieve it?

If additional information is required I can provide it.

15
  • Your question does not really follow. Are you aware MD* refer to RAID block devices, not disks? You either need more disk to create an md3 or you need to degrade an existing raid and misuse the freed up resource as another degraded array (not a good idea)
    – davidgo
    Jan 6, 2020 at 9:51
  • @davidgo Thank you for the answer. At the moment I have two disks on the server and instead of 8TB I see only 4TB in the file system, so I want to have two MD blocks - 4TB each and use all the space on the server. This is the first time I am facing this so, I am sorry if the question is incorrect. Jan 6, 2020 at 9:54
  • Your md3 is a RAID 1 of size 3.6TB consisting of two partitions (sda3 and sdb3), thus you don't have a spare 4TB disk left over.
    – wurtel
    Jan 6, 2020 at 10:25
  • Okay, so in other words I need to reinstall the server so I can make two block of 4TB each Jan 6, 2020 at 10:33
  • If its practical to reinstall, do so. It is possible to reconfigure without a reinstall, but doing so is fraught with risks and limitations that are probably not worthwhile at your skill level.
    – davidgo
    Jan 6, 2020 at 18:50

1 Answer 1

0

If I do understand your setup corrrect, you partitionend sda and sdb and created then the mdadm raids on top of these partitions.

The way to move off of this situation could be as follows:

  • remove sda3 from the raid using mdadm.
  • update the partition table type entry in sda3 to be a file system type (e.g. 83 for Linux)
  • format sda3 with your preferred file system.
  • mount sda3 to a new mount-point (e.g. /data2)
  • copy all data from /data/ to the new mount-point (e.g /data2)

  • stop the raid for md2 using mdadm.
  • update partition table type of sdb3.
  • format sdb3 with your preferred file system.
  • update mount point for sda2 to be /data
  • unmount /data2 and mount sda2 at /data
  • mount /dev/sdb3 to /data2

You must log in to answer this question.

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