On Sun, Jan 14, 2024 at 9:37 AM Andy Smith <a...@strugglers.net> wrote:
> Hi, > > I've got a disk image that sits on top of an LVM logical volume > that is on top of an mdadm RAID-1 that is on top of a pair of: > > Device Model: Samsung SSD 870 EVO 4TB > Sector Size: 512 bytes logical/physical > > so let';s say that is at /dev/foo/disk_image (where /dev/foo is the > name of the LVM VG and disk_image is the LV) > > So, > > # fdisk -ul /dev/foo/disk_image > Disk /dev/foo/disk_image: 400 GiB, 429496729600 bytes, 838860800 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: 0x14409245 > > Device Boot Start End Sectors Size Id > Type > /dev/foo_disk_image 2048 838858751 838856704 400G 83 > Linux > > So it's a 400G disk image with an MBR and a single partition, right? > > Now, I dd that disk image across the network to another machine > which has a similar setup, except here the "foo" volume group is on > a pair of > > Device Model: HGST HUS726T6TALN6L4 > Sector Size: 4096 bytes logical/physical > 4096 Bytes is 4K sector size. Now, after the disk_image has arrived, it looks very odd. fdisk > thinks it is 8 times bigger than it really is, and thinks it has 4K > sectors. I can't use "kpartx" to get at the partition inside it, and > fsck.ext4 doesn't like its first partition at all. > > Is there any way to make this work? > > If necessary and if there is a way, I *can* nuke off the target > machine's "foo" volume group and recreate the RAID array if I have > to make it 512e format. But obviously I'd like some way to move this > disk image and have it still work without having to meddle inside it > much — it is a VM disk. > > Thanks, > Andy > > -- > https://bitfolk.com/ -- No-nonsense VPS hosting > > -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/ ⠈⠳⣄⠀⠀