Situation:
I have a 2 GB disc mounted as /var/lib/libvirt/images.
I have images of installation on it. In order to have higher redundancy in
case of HDD failure (had one recently on root but on root there is not so much
"unique").
So I took a second one, same size to set up a RAID1
Normally you would need three discs (set up the raid and then transfer from a
backup.
However I did this one in the past with success (only I forgot how and the
opensuse 15.2 killed all my maildata so I cannot find it in the archives (BTW
opensuse archives seem to be down too).
So I want to create a RAID called md/1 and use it as RAID setting it up with
one "missing". dev/sdd is the one with the data. /dev/sdf is the virgin new.
I began with:
dd if=/dev/sdd of=/dev/sdf count=1
fdisk /dev/sdf
Command (m for help): t
Partition number (1-3): 1
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)
so far so good. And it works up to here.
And I initialize the RAID:
mdadm -C /dev/md/1 -l 1 -n 2 missing /dev/sdf1
And so far so good, all is smooth.
Now I wish to give it a file system (in my case ext4) and there...the trouble
begin. I do not remember obviously how to do this right. I tried:
mkfs.ext4 /dev/md/1
Which he does but complains:
mke2fs 1.45.6 (20-Mar-2020)
/dev/md/1 alignment is offset by 3584 bytes.
this may result in very poor performance, (re)-partitioning suggested.
Filesystem UUID: 9d21cc50-7c0c-49a2-....etc
Superblock bacups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654200,
496000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000,
214990848
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
So what do I wrong when creating the ext4? I suppose the command is wrong and
needs some more parameter or I have to change the tool all along.
Any suggestion why I am up for this "alignment offset by 3584 bytes"?
Thanks in advance.
P.S.
Once created the files system, you unmount the old disk, mount the new raid in
a temp name as well as the data disc, copy from there to the Raid. Unmount
both and mount the Raid at the old location and restart the system. Once
restarted you can then manage the old data disc (after checking that the
transferred data is complete). All this I have done it before, but I really do
not recall how I did overcome the "alligment offset".