

Bare bones device mapper? From Documentation/admin-guide/device-mapper/linear.rst in the Linux source tree,simonbcn wrote:... Isn't there any method available to join both disks while preserving the content of at least one of them?
Code: Select all
#!/bin/sh
# Join 2 devices together
size1=`blockdev --getsz $1`
size2=`blockdev --getsz $2`
echo "0 $size1 linear $1 0
$size1 $size2 linear $2 0" | dmsetup create joinedBecause you're about to incinerate all the data on them ? You should backup before you try to glue them.simonbcn wrote:I don't need backup those files. I'm not currently doing it as individual discs, why would I do it if I put them together?


What LVM metadata ? The OP says he has two disk drives with XFS, no mention of LVM anywhere. And yes, the OP would have to carefully script the devmapper join at boot, in /etc/local.d for example. And delete the original entries from his /etc/fstab. And whatever else is necessary to avoid destruction.NeddySeagoon wrote:sublogic,
The LVM metadata will trample on one filesystem, unless the intent is to do the join at every startup.
Well, I assume that the /dev/dm-n looks like the first filesystem followed by the second, sacrificial, file system, and that the sacrificial filesystem counts as free space usable to expand the first (the OP was open to reformatting one of the drives). The OP should definitely practice with toy filesystems on loop devices before taking the dive.NeddySeagoon wrote:How do you then merge filesystems?
