From: Russell Coker <russell@coker.com.au>
To: linux-btrfs@vger.kernel.org, Qu Wenruo <quwenruo.btrfs@gmx.com>
Subject: Re: btrfs-progs: btrfs dev usa as non-root is wrong and should just abort
Date: Thu, 11 Jul 2024 13:55:38 +1000 [thread overview]
Message-ID: <7956171.lvqk35OSZv@cupcakke> (raw)
In-Reply-To: <ad3498e5-d41a-40ce-be73-c5d9de4f85a1@gmx.com>
On Thursday, 11 July 2024 13:47:59 AEST Qu Wenruo wrote:
> > # btrfs dev usa -b /
> > /dev/mapper/root, ID: 1
> >
> > Device size: 511493395968
>
> The device size is 4K aligned.
>
> I guess it's some older fs? As newer mkfs would always round down to the
> sector size.
My recollection is that I had run mkfs on a system running Debian/Bookworm
which had different hardware and then used dd to copy it to this one.
> > Device slack: 1536
> > Data,single: 231936622592
> > Metadata,DUP: 6442450944
> > System,DUP: 67108864
> > Unallocated: 273047212032
> >
> > $ btrfs dev usa -b /
> > WARNING: cannot read detailed chunk info, per-device usage will not be
> > shown, run as root
> > /dev/mapper/root, ID: 1
> >
> > Device size: 999010539
> > Device slack: 18446743563215167723
> > Unallocated: 511493394432
> >>
> >> And what's the version of the btrfs-progs?
> >
> > The Debian package version is 6.6.3-1.2+b1.
>
> It may be easier to debug by trying a newer version of btrfs-progs.
>
> And since I'm not sure if it's the unalignment causing problems, you may
> want to resize the fs by:
>
> # btrfs device resize -1M <mnt>
>
> Then resize to max (which should always align the fs correctly):
>
> # btrfs device resize max <mnt>
root@cupcakke:/tmp# btrfs fi resize 1:-1M /
Resize device id 1 (/dev/mapper/root) from 476.37GiB to 476.36GiB
root@cupcakke:/tmp# btrfs fi resize 1:max /
Resize device id 1 (/dev/mapper/root) from 476.36GiB to max
etbe@cupcakke:/tmp$ btrfs dev usa -b /
WARNING: cannot read detailed chunk info, per-device usage will not be shown,
run as root
/dev/mapper/root, ID: 1
Device size: 999010539
Device slack: 18446743563215167723
Unallocated: 511493394432
etbe@cupcakke:/tmp$ btrfs dev usa /
WARNING: cannot read detailed chunk info, per-device usage will not be shown,
run as root
/dev/mapper/root, ID: 1
Device size: 952.73MiB
Device slack: 16.00EiB
Unallocated: 476.37GiB
That doesn't seem to have changed anything.
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
next prev parent reply other threads:[~2024-07-11 3:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-10 11:52 btrfs-progs: btrfs dev usa as non-root is wrong and should just abort Russell Coker
2024-07-10 16:29 ` Boris Burkov
2024-07-11 3:50 ` Russell Coker
2024-07-10 21:13 ` Qu Wenruo
2024-07-11 3:42 ` Russell Coker
2024-07-11 3:47 ` Qu Wenruo
2024-07-11 3:55 ` Russell Coker [this message]
2024-07-11 3:58 ` Qu Wenruo
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=7956171.lvqk35OSZv@cupcakke \
--to=russell@coker.com.au \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox