More flexible Storage Pools and Volumes options
Posted: 17 Dec 2025, 07:34
In TOS 6.x we have 2 disks that need to be selected for the main system (core and swap) - those are using mandatory RAID1.
Usually we have identical disks in the NAS bays - to provide easy replacement in case of failure.
Let's take the simple case with 5 disks - the space will look like that:

In the above is visible that we have 10GB wasted space for every 3rd, 4th etc. disk.
The ldblk will show that clearly on the CLI:
We can manually provision that space, with RAID5 for example, like that:
It's not going to be so easy to keep that config permanent (to survive the reload) by two reasons:
1. The files /etc/mdadm/mdadm.conf and /etc/mdadm.conf are rewritten during the reload
2. The command "update-initramfs -u" is not available
For 5 disks the RAID5 will give us protected 20GB, for 8 disks that will be 50GB etc.
It will be great if the TOS 6.x (and later 7.x) is capable to provision those spaces natively, isn't it?
Usually we have identical disks in the NAS bays - to provide easy replacement in case of failure.
Let's take the simple case with 5 disks - the space will look like that:

In the above is visible that we have 10GB wasted space for every 3rd, 4th etc. disk.
The ldblk will show that clearly on the CLI:
Code: Select all
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 3.6T 0 disk
├─sda1 8:1 0 285M 0 part
├─sda2 8:2 0 7.6G 0 part
│ └─md9 9:9 0 7.6G 0 raid1 /
├─sda3 8:3 0 1.9G 0 part
│ └─md8 9:8 0 1.9G 0 raid1 [SWAP]
└─sda4 8:4 0 3.6T 0 part
└─md0 9:0 0 10.9T 0 raid6
├─vg0-lv0 252:0 0 9T 0 lvm /Volume1
│ /var/subvols/8vEbTxkKvwa
└─vg0-lv1 252:1 0 1.9T 0 lvm /Volume2
/var/subvols/8vEbTxkKvwb
sdb 8:16 0 3.6T 0 disk
├─sdb1 8:17 0 285M 0 part
├─sdb2 8:18 0 7.6G 0 part
│ └─md9 9:9 0 7.6G 0 raid1 /
├─sdb3 8:19 0 1.9G 0 part
│ └─md8 9:8 0 1.9G 0 raid1 [SWAP]
└─sdb4 8:20 0 3.6T 0 part
└─md0 9:0 0 10.9T 0 raid6
├─vg0-lv0 252:0 0 9T 0 lvm /Volume1
│ /var/subvols/8vEbTxkKvwa
└─vg0-lv1 252:1 0 1.9T 0 lvm /Volume2
/var/subvols/8vEbTxkKvwb
sdc 8:32 0 3.6T 0 disk
├─sdc1 8:33 0 285M 0 part <---------- waste
├─sdc2 8:34 0 7.6G 0 part <---------- waste
├─sdc3 8:35 0 1.9G 0 part <---------- waste
└─sdc4 8:36 0 3.6T 0 part
└─md0 9:0 0 10.9T 0 raid6
├─vg0-lv0 252:0 0 9T 0 lvm /Volume1
│ /var/subvols/8vEbTxkKvwa
└─vg0-lv1 252:1 0 1.9T 0 lvm /Volume2
/var/subvols/8vEbTxkKvwb
sdd 8:48 0 3.6T 0 disk
├─sdd1 8:49 0 285M 0 part <---------- waste
├─sdd2 8:50 0 7.6G 0 part <---------- waste
├─sdd3 8:51 0 1.9G 0 part <---------- waste
└─sdd4 8:52 0 3.6T 0 part
└─md0 9:0 0 10.9T 0 raid6
├─vg0-lv0 252:0 0 9T 0 lvm /Volume1
│ /var/subvols/8vEbTxkKvwa
└─vg0-lv1 252:1 0 1.9T 0 lvm /Volume2
/var/subvols/8vEbTxkKvwb
sde 8:64 0 3.6T 0 disk
├─sde1 8:65 0 285M 0 part <---------- waste
├─sde2 8:66 0 7.6G 0 part <---------- waste
├─sde3 8:67 0 1.9G 0 part <---------- waste
└─sde4 8:68 0 3.6T 0 part
└─md0 9:0 0 10.9T 0 raid6
├─vg0-lv0 252:0 0 9T 0 lvm /Volume1
│ /var/subvols/8vEbTxkKvwa
└─vg0-lv1 252:1 0 1.9T 0 lvm /Volume2
/var/subvols/8vEbTxkKvwb
Code: Select all
mdadm --create /dev/md10 --level=5 --raid-devices=3 /dev/sdc2 /dev/sdd2 /dev/sde2
mdadm --create /dev/md11 --level=5 --raid-devices=3 /dev/sdc3 /dev/sdd3 /dev/sde3
cat /proc/mdstat
mdadm -E /dev/sd[c-e][2-3]
mdadm --detail /dev/md10
mdadm --detail /dev/md11
pvcreate /dev/md10 /dev/md11
lvmdiskscan -l
vgcreate vg10 /dev/md10 /dev/md11
lvcreate -n lv10 -l 100%FREE vg10
lvdisplay
mkfs.btrfs /dev/vg10/lv10
mkdir /MyVolume
mount /dev/vg10/lv10 /MyVolume1. The files /etc/mdadm/mdadm.conf and /etc/mdadm.conf are rewritten during the reload
2. The command "update-initramfs -u" is not available
For 5 disks the RAID5 will give us protected 20GB, for 8 disks that will be 50GB etc.
It will be great if the TOS 6.x (and later 7.x) is capable to provision those spaces natively, isn't it?
