-1

I am renting a server from Hetzner, which had 2x 8TB disks. I believe they were listed as RAID 1 (though can't find anything to confirm that anymore), which I would have assumed would have given me 16 TB usable space as RAID 1. I then ran this script, which sets up RAID and logical volumes.

The end result, however, is a single (logical) disk of ~ 8TB. Could it be that RAID 1 mirroring is being done twice? If so, how would I confirm this hypothesis?

Here is lsblk:

lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
sda               8:0    0  7.3T  0 disk  
├─sda1            8:1    0    1M  0 part  
└─sda2            8:2    0  7.3T  0 part  
  └─md127         9:127  0  7.3T  0 raid1 
    └─vg0-root0 254:0    0  6.9T  0 lvm   /nix/store
                                          /
sdb               8:16   0  7.3T  0 disk  
├─sdb1            8:17   0    1M  0 part  
└─sdb2            8:18   0  7.3T  0 part  
  └─md127         9:127  0  7.3T  0 raid1 
    └─vg0-root0 254:0    0  6.9T  0 lvm   /nix/store
                                          /

fdisk -l:

fdisk -l
Disk /dev/sdb: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: HGST HUH721008AL
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 0D66DC9A-41E1-44B0-AF57-EDF422A7B4C4

Device     Start         End     Sectors  Size Type
/dev/sdb1   2048        4095        2048    1M BIOS boot
/dev/sdb2   4096 15628052479 15628048384  7.3T Linux filesystem


Disk /dev/sda: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: HGST HUH721008AL
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 1FE75135-DDF0-4DF7-B79D-4890D594D12A

Device     Start         End     Sectors  Size Type
/dev/sda1   2048        4095        2048    1M BIOS boot
/dev/sda2   4096 15628052479 15628048384  7.3T Linux filesystem


Disk /dev/md127: 7.28 TiB, 8001425506304 bytes, 15627784192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/vg0-root0: 6.91 TiB, 7601349722112 bytes, 14846386176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

df -h:

df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                  6.3G      4.0K      6.3G   0% /dev
tmpfs                    62.9G     16.0K     62.9G   0% /dev/shm
tmpfs                    31.4G      6.1M     31.4G   0% /run
tmpfs                    62.9G    456.0K     62.9G   0% /run/wrappers
/dev/disk/by-uuid/fa8731e9-00e6-44fa-aa0f-f86ce2a1ca03
                          6.9T      1.6T      5.0T  24% /
/dev/disk/by-uuid/fa8731e9-00e6-44fa-aa0f-f86ce2a1ca03
                          6.9T      1.6T      5.0T  24% /nix/store
tmpfs                    12.6G     12.0K     12.6G   0% /run/user/0
tmpfs                    12.6G         0     12.6G   0% /run/user/1005

And udevadm info --query=all --name=/dev/sda

user2141650
  • 101
  • 2
  • 1
    You made an incorrect assumption. Raid 1 is mirroring and two 8 TB disks mirrored will result in 8 TB of useable space, not 16 TB. (All data is duplicated and stored twice.) - To get 16TB of useable space out of two 8 TB disks you need raid level zero , striping – HBruijn Aug 03 '22 at 12:32

1 Answers1

2

Raid 1 = Mirror so 8TB usbale space with 2x 8TB Drives. What you want is Raid Level 0, which is striping, giving you the 16TB of both drives as one logical device.

Stefan D
  • 36
  • 4