1

I created a RAID1 array of two disks, /dev/sda and /dev/sdb, using mdadm. After several booting problems related to the BIOS and SATA/RAID controller of the board, I accidently created some new partitions on /dev/sda, but didn't do any formating on those (mkfs.ext4 complained).

Now I've got my installation, which is totally working fine, on /dev/md127 with both partitions I created on the array, md127p1 and md127p2. But I still see the partitions I created on /dev/sda accidently:

Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 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/sda: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: dos
Disk identifier: 0x7e6506a6

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sda1           2048  41945087  41943040    20G 83 Linux
/dev/sda2       41945088 976773167 934828080 445.8G 83 Linux

Disk /dev/md127: 465.7 GiB, 499973619712 bytes, 976510976 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
Disklabel type: dos
Disk identifier: 0xd6cacd09

Device       Boot    Start       End   Sectors   Size Id Type
/dev/md127p1          2048  41945087  41943040    20G 83 Linux
/dev/md127p2      41945088 976510975 934565888 445.7G 83 Linux

This is probably because mdadm positions the superblock at 4K offset with the default metadata version 1.2, so the kernel still sees the MBR.

lsblk reports correctly, however:

NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda           8:0    0 465,8G  0 disk  
└─md127       9:127  0 465,7G  0 raid1 
├─md127p1 259:0    0    20G  0 md    /
└─md127p2 259:1    0 445,7G  0 md    /frzclient
sdb           8:16   0 465,8G  0 disk  
└─md127       9:127  0 465,7G  0 raid1 
├─md127p1 259:0    0    20G  0 md    /
└─md127p2 259:1    0 445,7G  0 md    /frzclient
sr0          11:0    1  1024M  0 rom

Is it safe to just wipe the MBR with the bootloader and the partition table with zeros on /dev/sda and re-install GRUB in the MBR?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.