All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Johnatan Hallman <johnatan-ftm@protonmail.com>,
	"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>
Subject: Re: FS (dm-0): device supports 4096 byte sectors (not 512)
Date: Thu, 23 Mar 2023 10:39:36 -0500	[thread overview]
Message-ID: <85a9bb82-864e-5532-9252-f8055baeb790@sandeen.net> (raw)
In-Reply-To: <EgkSUvPep_zPazvY0jpnimG82K4wOeYfiPz0Ly_34-TMN9DZKWNNQDxGFJPyq622ZaKee6RU3aFT34Yy-i00rjdT7hWFzS6HSGRe74z1F5o=@protonmail.com>

On 3/23/23 5:45 AM, Johnatan Hallman wrote:
> Hello List,
> 
> I get this error when I try to mount an XFS partition.
> Fortunately there is no critical data on it as it is just a backup but I would still like to mount it if it's possible.
> 
> I have tried with various Linux distros with kernels ranging from 5.6 to 6.1 it's the same result.
> 
> xfs_info /dev/mapper/test
> meta-data=/dev/mapper/test       isize=256    agcount=32, agsize=30523559 blks
>          =                       sectsz=512   attr=2, projid32bit=0
>          =                       crc=0        finobt=0, sparse=0, rmapbt=0
>          =                       reflink=0    bigtime=0 inobtcount=0 nrext64=0
> data     =                       bsize=4096   blocks=976753869, imaxpct=5
>          =                       sunit=0      swidth=0 blks
> naming   =version 2              bsize=4096   ascii-ci=0, ftype=0
> log      =internal log           bsize=4096   blocks=476930, version=2
>          =                       sectsz=512   sunit=0 blks, lazy-count=1
> realtime =none                   extsz=4096   blocks=0, rtextents=0
> 
> mount -t xfs -o ro /dev/mapper/test  /mnt/
> mount: /mnt: mount(2) system call failed: Function not implemented.
>        dmesg(1) may have more information after failed mount system call.

So I assume dmesg contained the error in $SUBJECT:

FS (dm-0): device supports 4096 byte sectors (not 512)

It seems that the filesystem was created with 512-byte sectors - at that time, the device
must have supported them. Perhaps something about the devicemapper target changed from
a 512 device to a 4k device? I'm not sure what might cause that to happen, but IMHO
it should never happen... did the dm device recently get reconfigured?

As a last resort, I think you could dd the filesystem (all 3T) to a file, and use a
loopback mount to access the files.

Alternatively, I wonder if we could relax the sector size check for a read-only
mount (that does not require log replay) - I'm not sure about that though.

-Eric

  reply	other threads:[~2023-03-23 15:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 10:45 FS (dm-0): device supports 4096 byte sectors (not 512) Johnatan Hallman
2023-03-23 15:39 ` Eric Sandeen [this message]
2023-03-23 19:00   ` Johnatan Hallman
2023-03-23 23:18 ` Dave Chinner
2023-03-24 16:06   ` Johnatan Hallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85a9bb82-864e-5532-9252-f8055baeb790@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=johnatan-ftm@protonmail.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.