Skip to main content
added 4755 characters in body
Source Link
Sachin H
  • 171
  • 1
  • 2
  • 8
Here is the output of the commands you asked for,

localhost:~ # lsblk -f | grep -v loop | sed -E 's/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/'
NAME    FSTYPE            FSVER            LABEL                           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1
├─sda2  linux_raid_member 1.0              any:0                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
├─sda3  linux_raid_member 1.0              any:1                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
├─sda4  linux_raid_member 1.0              any:2                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
│ └─md2 swap              1                                                XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX                [SWAP]
└─sda5  linux_raid_member 1.0              any:3                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
sdb
├─sdb1
├─sdb2  linux_raid_member 1.0              any:0                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
│ └─md0 vfat              FAT32                                            ADB7-4EE5                            1021.9M     0% /boot/efi
├─sdb3  linux_raid_member 1.0              any:1                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
│ └─md1 ext4              1.0                                              XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX  853.8M     7% /boot
├─sdb4  linux_raid_member 1.0              any:2                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
│ └─md2 swap              1                                                XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX                [SWAP]
└─sdb5  linux_raid_member 1.0              any:3                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  └─md3 ext4              1.0                                              XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX    4.4G    54% /
sr0     iso9660           Joliet Extension SLE-15-SP6-Full-x86_6493.51.001 2024-06-13-19-56-33-00
localhost:~ # fdisk -l
Disk /dev/sda: 15 GiB, 16106127360 bytes, 31457280 sectors
Disk model: VBOX HARDDISK
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: gpt
Disk identifier: 0E77630A-CBC9-4C1F-9321-D7886DAC09BC
 
Device       Start      End  Sectors Size Type
/dev/sda1     2048   104447   102400  50M BIOS boot
/dev/sda2   104448  2201599  2097152   1G Linux RAID
/dev/sda3  2201600  4298751  2097152   1G Linux RAID
/dev/sda4  4298752  8493055  4194304   2G Linux RAID
/dev/sda5  8493056 31457246 22964191  11G Linux RAID
 
 
Disk /dev/sdb: 15 GiB, 16106127360 bytes, 31457280 sectors
Disk model: VBOX HARDDISK
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: gpt
Disk identifier: 07F46E03-A25D-4305-BCFD-E79ADEA113C1
 
Device       Start      End  Sectors Size Type
/dev/sdb1     2048   104447   102400  50M BIOS boot
/dev/sdb2   104448  2201599  2097152   1G Linux RAID
/dev/sdb3  2201600  4298751  2097152   1G Linux RAID
/dev/sdb4  4298752  8493055  4194304   2G Linux RAID
/dev/sdb5  8493056 31457246 22964191  11G Linux RAID
 
 
Disk /dev/md1: 1023.94 MiB, 1073676288 bytes, 2097024 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
 
 
Disk /dev/md3: 10.95 GiB, 11757551616 bytes, 22963968 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
 
 
Disk /dev/md0: 1023.94 MiB, 1073676288 bytes, 2097024 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: 0x00000000
 
 
Disk /dev/md2: 2 GiB, 2147418112 bytes, 4194176 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

Respective Partitions:

/dev/sda1 --> BIOS BOOT Partition
/dev/sda2 --> BIOS BOOT Partition
/dev/md0 (sda2+sdb2) : /boot/efi
/dev/md1 (sda3+sdb3): /boot 
/dev/md2 (sda4+sdb4): /swap 
/dev/md3 (sda5+sdb5): / 
Here is the output of the commands you asked for,

localhost:~ # lsblk -f | grep -v loop | sed -E 's/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/'
NAME    FSTYPE            FSVER            LABEL                           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1
├─sda2  linux_raid_member 1.0              any:0                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
├─sda3  linux_raid_member 1.0              any:1                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
├─sda4  linux_raid_member 1.0              any:2                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
│ └─md2 swap              1                                                XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX                [SWAP]
└─sda5  linux_raid_member 1.0              any:3                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
sdb
├─sdb1
├─sdb2  linux_raid_member 1.0              any:0                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
│ └─md0 vfat              FAT32                                            ADB7-4EE5                            1021.9M     0% /boot/efi
├─sdb3  linux_raid_member 1.0              any:1                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
│ └─md1 ext4              1.0                                              XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX  853.8M     7% /boot
├─sdb4  linux_raid_member 1.0              any:2                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
│ └─md2 swap              1                                                XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX                [SWAP]
└─sdb5  linux_raid_member 1.0              any:3                           XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  └─md3 ext4              1.0                                              XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX    4.4G    54% /
sr0     iso9660           Joliet Extension SLE-15-SP6-Full-x86_6493.51.001 2024-06-13-19-56-33-00
localhost:~ # fdisk -l
Disk /dev/sda: 15 GiB, 16106127360 bytes, 31457280 sectors
Disk model: VBOX HARDDISK
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: gpt
Disk identifier: 0E77630A-CBC9-4C1F-9321-D7886DAC09BC
 
Device       Start      End  Sectors Size Type
/dev/sda1     2048   104447   102400  50M BIOS boot
/dev/sda2   104448  2201599  2097152   1G Linux RAID
/dev/sda3  2201600  4298751  2097152   1G Linux RAID
/dev/sda4  4298752  8493055  4194304   2G Linux RAID
/dev/sda5  8493056 31457246 22964191  11G Linux RAID
 
 
Disk /dev/sdb: 15 GiB, 16106127360 bytes, 31457280 sectors
Disk model: VBOX HARDDISK
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: gpt
Disk identifier: 07F46E03-A25D-4305-BCFD-E79ADEA113C1
 
Device       Start      End  Sectors Size Type
/dev/sdb1     2048   104447   102400  50M BIOS boot
/dev/sdb2   104448  2201599  2097152   1G Linux RAID
/dev/sdb3  2201600  4298751  2097152   1G Linux RAID
/dev/sdb4  4298752  8493055  4194304   2G Linux RAID
/dev/sdb5  8493056 31457246 22964191  11G Linux RAID
 
 
Disk /dev/md1: 1023.94 MiB, 1073676288 bytes, 2097024 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
 
 
Disk /dev/md3: 10.95 GiB, 11757551616 bytes, 22963968 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
 
 
Disk /dev/md0: 1023.94 MiB, 1073676288 bytes, 2097024 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: 0x00000000
 
 
Disk /dev/md2: 2 GiB, 2147418112 bytes, 4194176 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

Respective Partitions:

/dev/sda1 --> BIOS BOOT Partition
/dev/sda2 --> BIOS BOOT Partition
/dev/md0 (sda2+sdb2) : /boot/efi
/dev/md1 (sda3+sdb3): /boot 
/dev/md2 (sda4+sdb4): /swap 
/dev/md3 (sda5+sdb5): / 
edited tags
Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k
Source Link
Sachin H
  • 171
  • 1
  • 2
  • 8

How to make Grub boot from primary as well as secondary disk of RAID1 Array

I am currently installing SuSE Linux 15. I wish to secure this system against Disk failure hence opted to configure software RAID 1 on disk1 (sda) and disk2 (sdb). Basically during installation configured the disks partitions in RAID 1 and then created following partitions. /boot/efi md0 (sda2+sdb2) /boot md1 (sda3+sdb3) /swap md2 (sda4+sdb4) / md3 (sda5+sdb5)

I then tested this system, by removing sdb system, and the system could boot without problem. But when I removed the disk sda(primary) disk, the system could not go part Grub. After analysing, I have realised the Grub is configured in such a way that it points to software raid parition md1 but it must have both the disks present, ie working software raid, in order to be able to boot the system using that device md1. I am not okay with this if this is really true. The basic idea of having software raid for /boot device is that in case of hardware failure, the system should use the other working disk and boot. Isn't it the software raid 1 meant for? I am really confused now. If you require any more system details please ask. But how do i secure the system (boot) against hardware failure. The disks do eventually fail. So there must be some solution. It just that I do not know it yet.

Regards.