ayeyessuccessfully booted luks btrfs with boot on sda1 ext2 :)
reactormonkI've got some dead file links flying around - about 70 entries of -????????? ? ? ? ? ? krunnerrc
darklingLooks like some metadata corruption. Unmount the FS and run btrfs check --readonly on it to see what it makes of it.
reactormonkThe whole fs, or is the subvolume enough? That's my only partition on this machine
darklingThe whole FS.
darklingsubvolumes aren't really separate things in the filesystem -- they're more like directories with a couple of extra superpowers.
reactormonkAye, lemme find a USB stick
reactormonk_Mostly "no inode item, link count wrong"
reactormonk_Also a few with "dir isize wrong"
reactormonk_Rerun without the readonly flag?
reactormonk_Ah, readonly is default anyway.
vfrexSomewhat confused. Can you delete a fully dead drive from an online array or does it need to be mounted degraded before removing the drive from the array?
Zygoif the drive is fully dead you can delete it at the block device level, e.g. echo 1 > /sys/block/sda/device/delete to reduce the amount of kernel error logs
Zygothen 'btrfs dev del <devid> /fs'
Zygoif the device isn't fully dead, but is really slow, you might want to do the /sys/block/.../delete thing, as dev del doesn't assume the device is unreadable
Zygoif you have a replacement disk, you should use 'btrfs replace', which can be told not to read from the replaced device, and is generally much faster
Zygo'dev del' is a general-purpose tool and is not very well adapted for the specific case of replacing a disk
Zygofor raid56 arrays, though, it's currently the only option
vfrexI'm not that brave!
Zygowhew! Stay here, where it's safe! ;)
vfrexLearning through osmosis reaching its limits. So far simulating failures on a Raid1 for funsies.
forkhey guys, ive a question i've an early setup of a btrfs volume and realy didn
fork't use subvolumes
forkmy mount point looks like this: /dev/mapper/store /media/storage btrfs rw,noatime,space_cache,autodefrag,subvolid=5,subvol=/ 0 0
forkand a subvolume list looks like this: ID 4262 gen 122405 top level 5 path snap/root/storage
forkis it possible to use autosnap on that root volume? (https://btrfs.wiki.kernel.org/index.php/Autosnap)
multicore"Note: The autosnap functionality is currently not included in upstream version of btrfs"
forkugh overread sry :/
optyi'm not sure about top level subvolume snapshot...
Zygothat wiki page has not been updated since 2014
Zygowhich is why it seems to be clueless about how people use snapshots today
optymaybe it's just my imagination being limited :)
multicoreopty: sure you can do it but...
Zygotop level is a subvol and can be snapshotted. It's hard to rename a different snapshot to replace it though
multicorefork: just take a rw snapshot of your / and start using that
optyi prefer storing snapshots outside
forkmulticore: so you mean taking it and replacing the mount through a subvolume mount?
optythat's probably why i couldn't imagine top level subvolume snapshot although something telling me it should be possible
multicorefork: yes
forkmulticore: ok will do that!
multicorefork: when it's working delete the extra dirs/files...
optymy little filesystem: btrfs is magic!
multicorefork: https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes
darklingACTION hands opty a unicorn
multicorefork: in general you'll want to use the flat layout
forky looks good! as i set it up there was not such a documentation.... ;) and i used it because of the cow and sync possibilities
baudotACTION chases the cow around the field
optydarkling: does it moo?
baudotACTION licks opty
optygreat, i don't need to take a shower today :D
ayeyes@, @home and @snapshots works great y :)
ayeyesArch guide for Snapper > chmod 750 for /.snapshots
bdonnahuehey guys, im trying to figure out how to determine the link between snapshots. I took consecutive snapshots of a subvolume. How can I see the relation? If i "btrfs subvolume list -p -a -t -u -q mnt" I see uuid and parent_uuid
kahirubdonnahue: try btrfs sub show /path/to/original/subvolume
kahiruit should show you a list of all snapshots of that one
bdonnahuekahiru, but I cannot see the relationship
darklingYou can get the information from btrfs sub list. One sec.
darkling-q should do it.
bdonnahuedarkling, so if I look at the creation time for the snapshots I can determine the order that they occured?
darklingYou'd do much better, if you're automating this, to ensure that the snapshots get appropriate metadata set in them at creation time.
darklingEither with xattrs or with proper naming.
bdonnahuedarkling, i dont quite follow what you mean. i just did a normal snapshot create
bdonnahuecan you give me an example?
darklingbtrfs sub snap /path/to/source /snapshots/2018-02-04T21.08.15
darklingOr even btrfs sub snap /path/to/source /snapshots/source-name/2018-02-04T21.08.15
darklingAlternatively, setfattr --name user.created --value 2018-02-04T21:00:15 /path/to/source; btrfs sub snap -r /path/to/source /snapshots/source-name/1
bdonnahuedarkling, just googling the commands now.
bdonnahueso you're saying I use extended file attributes to store required information which I set manually/automatically
optyhm... i could use setfattr for a "worm" brtime/ctime
optydoes btrfs send support extended attributes? (gtg)
darklingI use them for storing timestamps in my homegrown send/receive solution.
guestHi, I've encountered a possibly corrupt file on a BTRFS RAID1 array following unexpected loss of power. The file has no permissions or owner and can't be deleted: https://pastebin.com/difnQScv
guestAny advice would be greatly appreciated. Scrubbing the array hasn't removed the file.
darklingUnmount the FS completely and run a btrfs check --readonly on it.
darklingThat should tell you what's wrong.
darklingIf that works without crashing, btrfs check --repair will probably deal with it.
guestThanks very much @darkling! The btrfs device stats command is listing zero errors across the array.
darklingdevice stats will tell you about underlying I/O errors in the hardware, not about broken parts of the filesystem metadata (which is what you've got here)
Knorrie[2522/36436] lalala removing subvolumes
KobazBTRFS error device sdb1 super_total_bytes mismatch
KobazBTRFS error (device sdb1): super_total_bytes 16003145125888 mismatch with fs_devices total_rw_bytes 1600314129472 BTRFS error (device sdb1): failed to read chunk tree: -22 BTRFS error (device sdb1):open_ctree failed
darklingI might be wrong, but there's a known problem with filesystems whose end isn't aligned.
darklingThere's a tool to fix it in latest progs.
kilobytethe error message could be improved, though
kilobytehas it been already?
darklingbtrfs rescue fix-device-size
Kobaztrying to build a static btr
Kobaz /usr/bin/ld.bfd.real: /usr/lib/gcc/x86_64-linux-gnu/4.9/crtbeginT.o: relocation R_X86_64_32 against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC