Re: 512e vs 4K sector confusion

2024-01-20 Thread Andy Smith
On Sun, Jan 14, 2024 at 08:01:52AM +, Andy Smith wrote: > 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

Re: 512e vs 4K sector confusion

2024-01-16 Thread Andy Smith
Hi Stefan, On Mon, Jan 15, 2024 at 05:31:37AM +, Andy Smith wrote: > On Sun, Jan 14, 2024 at 11:32:37PM -0500, Stefan Monnier wrote: > > What happens if you use diskimages that contain directly a filesystem > > without going through the trouble of using a partition table? > > Does `ext4` also

Re: 512e vs 4K sector confusion

2024-01-16 Thread Teemu Likonen
* 2024-01-15 15:20:51-0600, Nicholas Geovanis wrote: > In your dd commands that moved these filesystems, did you specify ibs= > and/or obs= > ? > If so, what values did you use? "dd" is not a special tool for accessing device files. It's a simple file copy tool: like "cat" or "cp" but with

Re: 512e vs 4K sector confusion

2024-01-15 Thread Andy Smith
Hello, On Mon, Jan 15, 2024 at 03:20:51PM -0600, Nicholas Geovanis wrote: > In your dd commands that moved these filesystems, did you specify ibs= > and/or obs= No. I don't see how that would make any difference. I could as well have used "cat|ssh" instead of "dd|ssh". Also note that the image

Re: 512e vs 4K sector confusion

2024-01-15 Thread Nicolas George
Nicholas Geovanis (12024-01-15): > In your dd commands that moved these filesystems, did you specify ibs= > and/or obs= > ? > If so, what values did you use? Why do you ask this information? How do you think it will be useful? -- Nicolas George signature.asc Description: PGP signature

Re: 512e vs 4K sector confusion

2024-01-15 Thread Nicholas Geovanis
On Mon, Jan 15, 2024, 4:58 AM Andy Smith wrote: > On Sun, Jan 14, 2024 at 11:32:37PM -0500, Stefan Monnier wrote: > > > What happens if you use diskimages that contain directly a filesystem > > without going through the trouble of using a partition table? > > Does `ext4` also get tripped by the

Re: 512e vs 4K sector confusion

2024-01-14 Thread Andy Smith
Hi Stefan, On Sun, Jan 14, 2024 at 11:32:37PM -0500, Stefan Monnier wrote: > Do you need a partition table? These are other people's virtual machines so to some extent I don't have a say on what they put inside them. It is always nice to understand what is going on though! > What happens if you

Re: 512e vs 4K sector confusion

2024-01-14 Thread Stefan Monnier
> 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. Thanks for this experiment. I was

Re: 512e vs 4K sector confusion

2024-01-14 Thread Timothy M Butterworth
On Sun, Jan 14, 2024 at 9:37 AM Andy Smith 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

Re: 512e vs 4K sector confusion

2024-01-14 Thread Thomas Schmitt
Hi, Andy Smith wrote: > what I meant was that fdisk showed a single partition of > 3.2TB size, while the entire disk being only the 400G Then it's what i would expect from fdisk. > I did try using fdisk on the destination to delete the partition and > recreate it with the correct numbers, but

Re: 512e vs 4K sector confusion

2024-01-14 Thread Andy Smith
Hi Thomas, On Sun, Jan 14, 2024 at 02:33:37PM +0100, Thomas Schmitt wrote: > I wonder, though, why fdisk would misrepresent the total disk size, > which i would expect to come from the storage device. > Maybe fdisk is more confused than i expect. > > Can you show the whole output of fdisk from

Re: 512e vs 4K sector confusion

2024-01-14 Thread Thomas Schmitt
Hi, Andy Smith wrote: > 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

Re: 512e vs 4K sector confusion

2024-01-14 Thread Arno Lehmann
Hi andy, Am 14.01.2024 um 09:15 schrieb Andy Smith: On Sun, Jan 14, 2024 at 08:01:52AM +, Andy Smith wrote: 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

Re: 512e vs 4K sector confusion

2024-01-14 Thread Alexander V. Makartsev
On 14.01.2024 13:15, Andy Smith wrote: On Sun, Jan 14, 2024 at 08:01:52AM +, Andy Smith wrote: 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

Re: 512e vs 4K sector confusion

2024-01-14 Thread Andy Smith
On Sun, Jan 14, 2024 at 08:01:52AM +, Andy Smith wrote: > 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