linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"
@ 2017-10-06 10:25 Nick Gilmour
  2017-10-07  0:08 ` Liu Bo
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Gilmour @ 2017-10-06 10:25 UTC (permalink / raw)
  To: linux-btrfs

Hi all,

I have converted .vdi disk (BTRFS) into a .img disk, resized it from
500GB to 150GB and then copied into a ZFS Volume. I've imported the VM
into VMM and it started normally but an upgrade failed. I've rebooted
and  got only a blue screen something like a BSOD on Windows. I've
changed into a terminal and now this error appears constantly:

 "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"

I can stop it shortly with Ctrl-C and enter a command. With startx I
can see my desktop in blue  color with some icons in it and nothing
more.


uname -a
Linux VM-Ubuntu 4.4.0-83-generic

btrfs --version
btrfs-progs v4.4

btrfs fi show
Label: none uuid: x
           Total devices 1 FS bytes used 473.68GiB
            devid 1 size 492.00 GiB used 492.00GiB path /dev/sda1

Label: 'extra' uuid: y
           Total devices 1 FS bytes used 112.00KiB
            devid 1 size 100.00 GiB used 2.02GiB path /dev/sdb1

btrfs fi df /home
Data, single: total=106.40GiB, used=96.42GiB
System, DUP: total=8.00MiB, used=48.00KiB
Metadata, DUP: total=14.88GiB, used=11.18GiB
GlobalReserve, single: total=512.00 MiB, used=0.00B

dmesg > dmesg.log
compiz: segfault at ... error 4 in libnux-graphics-4.0.so...


Any ideas?

Regards,
Nick

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"
  2017-10-06 10:25 "BTRFS error (device vda1): couldn't get super buffer head for bytenr x" Nick Gilmour
@ 2017-10-07  0:08 ` Liu Bo
  2017-10-08 15:39   ` Nick Gilmour
  0 siblings, 1 reply; 7+ messages in thread
From: Liu Bo @ 2017-10-07  0:08 UTC (permalink / raw)
  To: Nick Gilmour; +Cc: linux-btrfs

On Fri, Oct 06, 2017 at 12:25:17PM +0200, Nick Gilmour wrote:
> Hi all,
> 
> I have converted .vdi disk (BTRFS) into a .img disk, resized it from
> 500GB to 150GB and then copied into a ZFS Volume. I've imported the VM
> into VMM and it started normally but an upgrade failed. I've rebooted
> and  got only a blue screen something like a BSOD on Windows. I've
> changed into a terminal and now this error appears constantly:
> 
>  "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"

The error implies that it failed to read the sectors which contains
btrfs superblock, given you've shrinked the size, I guess btrfs
doesn't know that somehow and is trying to issue writes to a >150GB
position(could be 256G).

You can check that 'bytenr x'.

Which command did you use to resize it?

thanks,

-liubo

> 
> I can stop it shortly with Ctrl-C and enter a command. With startx I
> can see my desktop in blue  color with some icons in it and nothing
> more.
> 
> 
> uname -a
> Linux VM-Ubuntu 4.4.0-83-generic
> 
> btrfs --version
> btrfs-progs v4.4
> 
> btrfs fi show
> Label: none uuid: x
>            Total devices 1 FS bytes used 473.68GiB
>             devid 1 size 492.00 GiB used 492.00GiB path /dev/sda1
> 
> Label: 'extra' uuid: y
>            Total devices 1 FS bytes used 112.00KiB
>             devid 1 size 100.00 GiB used 2.02GiB path /dev/sdb1
> 
> btrfs fi df /home
> Data, single: total=106.40GiB, used=96.42GiB
> System, DUP: total=8.00MiB, used=48.00KiB
> Metadata, DUP: total=14.88GiB, used=11.18GiB
> GlobalReserve, single: total=512.00 MiB, used=0.00B
> 
> dmesg > dmesg.log
> compiz: segfault at ... error 4 in libnux-graphics-4.0.so...
> 
> 
> Any ideas?
> 
> Regards,
> Nick
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"
  2017-10-07  0:08 ` Liu Bo
@ 2017-10-08 15:39   ` Nick Gilmour
  2017-10-08 21:03     ` Chris Murphy
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Gilmour @ 2017-10-08 15:39 UTC (permalink / raw)
  To: bo.li.liu; +Cc: linux-btrfs

Thanks for the reply!

For conversion I used this command:
$ vboxmanage internalcommands converttoraw mydisk.vdi mydisk.img

and for resizing this one:
$ qemu-img resize mydisk.img 150G

Is there something I can do to fix this or another way to do the
resizing without getting an error?

Regards,
Nick


On Sat, Oct 7, 2017 at 2:08 AM, Liu Bo <bo.li.liu@oracle.com> wrote:
> On Fri, Oct 06, 2017 at 12:25:17PM +0200, Nick Gilmour wrote:
>> Hi all,
>>
>> I have converted .vdi disk (BTRFS) into a .img disk, resized it from
>> 500GB to 150GB and then copied into a ZFS Volume. I've imported the VM
>> into VMM and it started normally but an upgrade failed. I've rebooted
>> and  got only a blue screen something like a BSOD on Windows. I've
>> changed into a terminal and now this error appears constantly:
>>
>>  "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"
>
> The error implies that it failed to read the sectors which contains
> btrfs superblock, given you've shrinked the size, I guess btrfs
> doesn't know that somehow and is trying to issue writes to a >150GB
> position(could be 256G).
>
> You can check that 'bytenr x'.
>
> Which command did you use to resize it?
>
> thanks,
>
> -liubo
>
>>
>> I can stop it shortly with Ctrl-C and enter a command. With startx I
>> can see my desktop in blue  color with some icons in it and nothing
>> more.
>>
>>
>> uname -a
>> Linux VM-Ubuntu 4.4.0-83-generic
>>
>> btrfs --version
>> btrfs-progs v4.4
>>
>> btrfs fi show
>> Label: none uuid: x
>>            Total devices 1 FS bytes used 473.68GiB
>>             devid 1 size 492.00 GiB used 492.00GiB path /dev/sda1
>>
>> Label: 'extra' uuid: y
>>            Total devices 1 FS bytes used 112.00KiB
>>             devid 1 size 100.00 GiB used 2.02GiB path /dev/sdb1
>>
>> btrfs fi df /home
>> Data, single: total=106.40GiB, used=96.42GiB
>> System, DUP: total=8.00MiB, used=48.00KiB
>> Metadata, DUP: total=14.88GiB, used=11.18GiB
>> GlobalReserve, single: total=512.00 MiB, used=0.00B
>>
>> dmesg > dmesg.log
>> compiz: segfault at ... error 4 in libnux-graphics-4.0.so...
>>
>>
>> Any ideas?
>>
>> Regards,
>> Nick
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"
  2017-10-08 15:39   ` Nick Gilmour
@ 2017-10-08 21:03     ` Chris Murphy
  2017-10-09  0:26       ` Nick Gilmour
       [not found]       ` <CAH-drozNA1N6xO2dAknLD-JQu75BAEi+GpiEibA-R-Zk1U7xmA@mail.gmail.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Chris Murphy @ 2017-10-08 21:03 UTC (permalink / raw)
  To: Nick Gilmour; +Cc: Liu Bo, Btrfs BTRFS

On Sun, Oct 8, 2017 at 4:39 PM, Nick Gilmour <nickeforos@gmail.com> wrote:
> Thanks for the reply!
>
> For conversion I used this command:
> $ vboxmanage internalcommands converttoraw mydisk.vdi mydisk.img
>
> and for resizing this one:
> $ qemu-img resize mydisk.img 150G
>
> Is there something I can do to fix this or another way to do the
> resizing without getting an error?

I don't see a 'btrfs filesystem resize' command in your sequence. Did
you actually resize the file system before you resized the underlying
(virtual) block device?



>>> btrfs fi show
>>> Label: none uuid: x
>>>            Total devices 1 FS bytes used 473.68GiB
>>>             devid 1 size 492.00 GiB used 492.00GiB path /dev/sda1

Is this before or after the resize?




-- 
Chris Murphy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"
  2017-10-08 21:03     ` Chris Murphy
@ 2017-10-09  0:26       ` Nick Gilmour
       [not found]       ` <CAH-drozNA1N6xO2dAknLD-JQu75BAEi+GpiEibA-R-Zk1U7xmA@mail.gmail.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Gilmour @ 2017-10-09  0:26 UTC (permalink / raw)
  To: Chris Murphy; +Cc: Liu Bo, Btrfs BTRFS

> I don't see a 'btrfs filesystem resize' command in your sequence. Did
> you actually resize the file system before you resized the underlying
> (virtual) block device?

OK. I guess, this is it. I didn't do any 'btrfs filesystem resize' .
The guides I was following didn't mention something like that. I was
assuming that if it works for other FS like this it should also work
for BTRFS. So I have to run this one:

# btrfs filesystem resize -350g /home ?

Should it be before or after I shrink the .img?

> Is this before or after the resize?

 It's after the supposed resize. I shoud have seen that BTRFS didn't
notice the change...

On Sun, Oct 8, 2017 at 11:03 PM, Chris Murphy <lists@colorremedies.com> wrote:
> On Sun, Oct 8, 2017 at 4:39 PM, Nick Gilmour <nickeforos@gmail.com> wrote:
>> Thanks for the reply!
>>
>> For conversion I used this command:
>> $ vboxmanage internalcommands converttoraw mydisk.vdi mydisk.img
>>
>> and for resizing this one:
>> $ qemu-img resize mydisk.img 150G
>>
>> Is there something I can do to fix this or another way to do the
>> resizing without getting an error?
>
> I don't see a 'btrfs filesystem resize' command in your sequence. Did
> you actually resize the file system before you resized the underlying
> (virtual) block device?
>
>
>
>>>> btrfs fi show
>>>> Label: none uuid: x
>>>>            Total devices 1 FS bytes used 473.68GiB
>>>>             devid 1 size 492.00 GiB used 492.00GiB path /dev/sda1
>
> Is this before or after the resize?
>
>
>
>
> --
> Chris Murphy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"
       [not found]       ` <CAH-drozNA1N6xO2dAknLD-JQu75BAEi+GpiEibA-R-Zk1U7xmA@mail.gmail.com>
@ 2017-10-09  9:28         ` Chris Murphy
       [not found]           ` <CAH-drozVaiXMoXqs8hiHvd5n8qDvbGLnp=1OPndsibhxjGkNxw@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Murphy @ 2017-10-09  9:28 UTC (permalink / raw)
  To: Nick Gilmour; +Cc: Chris Murphy, Liu Bo, Btrfs BTRFS

On Mon, Oct 9, 2017 at 1:22 AM, Nick Gilmour <nickeforos@gmail.com> wrote:
>> I don't see a 'btrfs filesystem resize' command in your sequence. Did
>> you actually resize the file system before you resized the underlying
>> (virtual) block device?
>
>
> OK. I guess, this is it. I didn't do any 'btrfs filesystem resize' . The
> guides I was following didn't mention something like that. I was assuming
> that if it works for other FS like this it should also work for BTRFS.

Literally all other file systems require the fs be resized first when
shrinking, before the underlying partition or virtual block device is
reduced. There is nothing unique about Btrfs in this respect.

Some tools will use fsadm in the sequence to make sure the file system
is properly resized. So the question is whether any of the resize
tools you did use, expect to use fsadm. And if they do or did, whether
and why there wasn't an error if fsadm doesn't support Btrfs before
the block device was resized anyway. I don't know offhand if Btrfs is
supported by fsadmn, the man page does not list it as one of the
supported file systems.



> # btrfs filesystem resize -350g /home ?
>
> Should it be before or after I shrink the .img?

When shrinking, the fs resize must happen first. Then the block device
can be reduced to match.

When growing, the block device is extended, then the fs is resized.




-- 
Chris Murphy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Delivery Status Notification (Failure)
       [not found]             ` <59df4db2.8508370a.40c79.2c64.GMRIR@mx.google.com>
@ 2017-10-12 11:12               ` Nick Gilmour
  0 siblings, 0 replies; 7+ messages in thread
From: Nick Gilmour @ 2017-10-12 11:12 UTC (permalink / raw)
  To: Chris Murphy; +Cc: Liu Bo, Btrfs BTRFS

Thanks for the detailed description!

It makes all sense. My question was rather stupid.

I shrunk the partition with gparted (I suppose it uses the btrfs
resize command) and then cloned the partition with clonezilla. I tried
to create a zvol of the same size but I got an error about the size (I
don't remember exactly), so I used qemu to expand the img. Then
imported the zvol into VMM and started the VM but I got again a blue
screen with the same error. After that I gave up and created a new VM.

Regards,
Nick

On Thu, Oct 12, 2017 at 1:10 PM, Mail Delivery Subsystem
<mailer-daemon@googlemail.com> wrote:
> Message may contain a virus
>
> Your message wasn't delivered to linux-btrfs@vger.kernel.org because it may
> contain a virus. Learn how to check for and prevent viruses.
> The response from the remote server was:
>
> 550 5.7.1 Content-Policy reject msg: The message contains HTML subpart,
> therefore we consider it SPAM or Outlook Virus. TEXT/PLAIN is accepted.!
> BF:<U 0.499737>; S1751350AbdJLLKl
>
>
> Final-Recipient: rfc822; linux-btrfs@vger.kernel.org
> Action: failed
> Status: 5.7.1
> Remote-MTA: dns; vger.kernel.org. (209.132.180.67, the server for the domain
> vger.kernel.org.)
> Diagnostic-Code: smtp; 550 5.7.1 Content-Policy reject msg: The message
> contains HTML subpart, therefore we consider it SPAM or Outlook Virus.
> TEXT/PLAIN is accepted.! BF:<U 0.499737>; S1751350AbdJLLKl
> Last-Attempt-Date: Thu, 12 Oct 2017 04:10:42 -0700 (PDT)
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-10-12 11:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06 10:25 "BTRFS error (device vda1): couldn't get super buffer head for bytenr x" Nick Gilmour
2017-10-07  0:08 ` Liu Bo
2017-10-08 15:39   ` Nick Gilmour
2017-10-08 21:03     ` Chris Murphy
2017-10-09  0:26       ` Nick Gilmour
     [not found]       ` <CAH-drozNA1N6xO2dAknLD-JQu75BAEi+GpiEibA-R-Zk1U7xmA@mail.gmail.com>
2017-10-09  9:28         ` Chris Murphy
     [not found]           ` <CAH-drozVaiXMoXqs8hiHvd5n8qDvbGLnp=1OPndsibhxjGkNxw@mail.gmail.com>
     [not found]             ` <59df4db2.8508370a.40c79.2c64.GMRIR@mx.google.com>
2017-10-12 11:12               ` Delivery Status Notification (Failure) Nick Gilmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).