snkcldi am getting a segfault when i run "btrfs rescue zero-log"
snkcldmeh I'll just wipe the partiton
darklingzero-log rarely does anything useful these days.
darklingWhy do you think you need it?
darkling(Hint: If it's from some blog post on the internet, they're probably wrong)
snkclddarkling: heh...
snkcldwell,
snkcldhttps://www.irccloud.com/pastebin/SJe5zSyO/
snkclddarkling: ^
snkcldthe "parent transid verify failed" so the online answers seemed to indicate that i can use the zero-log command to remove the last transactions?
darklingNo, you can't.
darklingSee my comment about blog posts...
snkclddarkling: consider that comment seen
darklingThe only thing that might work is mounting with -o usebackuproot,ro
darklingIf that works, try without the ro
snkcldok let me try that
darklingIf it doesn't work, then you'll need to use btrfs restore to refresh your backups with anything important that was missing since the last backup, and recreate the FS.
snkclddarkling: yea that didnt work, got the same error messages. i dont have backups, this was just a toy VM so its no big deal
snkcldi accidentally mounted the root block device on my host while running my vm, kinda my bad i guess
darklingAh, yes, that would screw things up badly.
snkcld:)
darklingIn fact, I'm moderately surprised the errors weren't more obviously disastrous.
snkcldwell i didnt really do too much... i think i simply mounted... maybe touched a file? i dont recall touching anything tbh
snkcldthen shutdown my vm... then unmounted on the host? idr... was definitely my fault though
snkclddarkling: one semi-related question. accidentally mounting on host+guest aside.... if i have my root subvolume in, say, "/gentoo/", then over time i create backups at "/gentoo-a/", "gentoo-b", etc... but i never mount those (i only create them). is it possible to screw up those subvolumes, when only my /gentoo is mounted?
darklingWell, you can't delete the snapshots if you can't see them.
snkcldthat is to say, in a worst case scenario, where _only_ the subvolume /gentoo/ is mounted, is it possible to accidentally manipulate the filesystem in such a way that i can damage the subvols above
snkclddarkling: yea... that makes sense
snkclddarkling: i would imagine the only way to screw it up is if i touch the superblock right?
darklingHowever, you can still screw up the filesystem with out-of-band cock-ups, like you just did with this VM.
snkcldlike, i could completely hose my /gentoo install, but if i dont mess up the superblock then my other subvols can still be ok
snkclddarkling: yea yea, totally understand that
darklingOr with a kernel bug or storage stack error...
snkcldin a "normal" usage or whatever, where i just have my root fs in a subvol, how often is the superblock manipulated?
darklingBasically, there's no separation between the data structures of subvols -- so you break one (in the sense of FS corruption), and you break the whole FS.
snkcldohhhhhh
snkclddarkling: that is kinda my question
darklingThey're not like LVM subvols or partitions.
darklingThey're more like directories with a couple of extra superpowers.
snkclddarkling: uh huh
snkcldso its totally possible to have subvols "/a" and "/b", but ONLY ever mounting the disk with "subvol=a", and to _still_ have "/b" inaccessible? (out-of-band stuff aside)
snkcldout-of-band as in... messing up on the block layer outside btrfs
darklingYeah, that's what I mean by out-of-band.
darklingIn that example, if you've only mounted /a, you can't touch /b with normal FS operations, because nothing in b is visible to the system.
darklingBut if there's a bug, or a broken storage stack (disks failing to honour barriers, say), you can break the whole FS, which includes /b as well as /a
snkclddarkling: but i can feel confident that even if i hose /a (where ONLY subvol=/a is mounted, the block as a whole is _never_ mounted), that i can still access /b?
snkclddarkling: yea if theres a bug then i totally understand
darklingDepends on what you mean by "hose".
darklingrm -rf can't touch /b if it's not visible.
snkclddarkling: i dunno, i guess lets say i cut the power
darklingThe FS should be robust to that, but... bugs, bad hardware...
snkcldyea yea
darklingI mean, by design, it's robust to power loss, but the implementation may not manage it perfectly in all cases.
snkclddarkling: am i wrong in thinking that it sounds like btrfs backups should be on a different filesystem then?
darklingBackups aren't backups if they're on the same machine, and certainly not if they're on the same filesystem.
snkcldin fact, to be more direct... ive noticed that some guides recommend backing up "/a" into "/a/backups"
snkclddarkling: good point!
darklingSome would say they're not backups if they're in the same building. Or the same city. :)
snkclddarkling: heh
snkclddarkling: ive seen alot of guides that put the "backups" inside _the same volume_
snkcldwhich i find extremely strange
snkcldthe assumption must be that the backups exist only to backup the contents of files in the subvol?
snkcldas opposed to backing up due to the fs problems
darklinghttps://xkcd.com/386/
darklingThere's definitely a place for something like regular snapshots in the same FS to deal with accidental deletion, but it's not a backup.
snkcldyea
m4ti find it's super useful to rollback when i fudge something, like a source tree. i of course use btrbk to send it to a couple different remote filesystems as well.
lapsio_did anyone use btrfs for /tmp ?
lapsio_because I always used tmpfs so somehow I never noticed that before but using btrfs for /tmp paired with VMWare Workstaion kills host when guest VM generates high i/o
lapsio_basically when guest generates i/o above 600 MB/s host freaks out and everything freezez and apps start crashing with sigbus
lapsio_and soft CPU lockups are being generated
lapsio_i mean using full btrfs for /tmp
lapsio_full as in compression, snapshots all that stuff
lapsio_it's weird
lapsio_I'm not sure what VMWare does to generate such hardcore i/o to destabilize system so badly with btrfs but it's quite interesting
m4tlapsio_: is the vmware disk image located on a btrfs filesystem?
lapsio_no, vmware creates pagefile in /tmp
lapsio_i thing it's related to this
lapsio_think*
m4t /tmp on the guest or the host machine?
lapsio_host
m4tyeah. you might look into disabling CoW for the locations vmware is storing images/files.
m4ti don't have issues myself, using qemu/kvm, but i've read several places where it's recommended to do that.
m4te.g. https://unversioned.blogspot.com/2015/05/btrfs-disable-copy-on-write-cow.html
m4thttps://btrfs.wiki.kernel.org/index.php/UseCases#Can_we_create_virtual_block_device_in_BTRFS.3F
lapsio_I used VMWare Player before
lapsio_and it didn't have such issue
lapsio_but it also didn't allocate pagefile in /tmp
lapsio_I'm sure because I have 2gb ramdisk as /tmp
lapsio_and VMWare workstation was crying that it can't allocate 8gb pagefile
lapsio_Player never cried
m4tlol
m4tsame concept, i think.
m4te.g. large file with lots of random writes
RoyKdisabling CoW on btrfs would be like using ext4 :P
m4tyeah i guess. it's not filesystem wide.
hanshenrikto whoever maintains http://thread.gmane.org/gmane.comp.file-systems.btrfs , please read https://www.reddit.com/r/softwaregore/comments/6kt3lt/archivedat_nothing_found_bye/djokipu/
zdzichuyou should go to GMAME channel
hanshenrikwhere's that? #GMAME ?
hanshenriknot on freenode at least
zdzichuI have no idea, but not here
hanshenrikme either, but it wouldn't surprise me if he's among the crowd of #btrfs
hanshenrik(some btrfs devs have posted patches there in the past, according to the btrfs wiki )
darklingNo, gmane just subscribes to the mailing list and archives all the mails, so the patches sent to the mailing list end up there too.
darklingThere's several other sites that do much the same for a wide range of mailing lists.
hanshenrikkk
hanshenrikQ: Can I find out compression ratio of a file?
hanshenrik A: Currently no. There's a patchset http://thread.gmane.org/gmane.comp.file-systems.btrfs/37312 that extends the FIEMAP interface to return the physical length of an extent (ie. the compressed size).
hanshenrikanyone have a working link?
hanshenrik(that link doesn't work. can't technically say it returns 404, but it should'ev)
multicorehttps://btrfs.wiki.kernel.org/index.php/Btrfs_mailing_list
hanshenrikwell, i found this, but it's still just broken links https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg38226.html
darklingThis, maybe? https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg61263.html
darklingSimply searching for "compressed size patch FIEMAP"
hanshenrikdarkling, yeah, looks like that's it, thanks!
oshunluvrGetting a new error message this morning doing incremental backups. KDEneon, kernel 4.10.0-27, btrfs-tools 1:0.v4.9.1+git20170127+r3165-0~r7~crass~ubuntu16.04.1. Doing increnmatl send|receive operation first time resulted in ERROR: ~~~ failed: No such file or directory. Since the file was in the trash, I emptied the trash and re-ran s|r. This time error was ERROR rename
oshunluvrHere's the konsole if anyone wants a look. https://pastebin.com/KG227gs2
oshunluvrI tried a full balance after a scrub and got: ERROR: error during balancing '/': No such file or directory
dsqgd