pragomercan I use a 2nd disc just for btrfs snapshots of my system-disc ?
kahiruas in "the disks will form one pool and one disk will be used for this and the other one will be used for that" or "they'll be separate filesystems, one will be live system and you'll store the snapshots on the other one"?
wictory[m]Hi! Today my laptop (with btrfs root) started hanging for many seconds
wictory[m] (> 10 s) periodically. I suspect the filesystem since the music which I stream from the network does not hang. Also the btrfs-cleaner process is running at 100%
wictory[m]I have rebooted the system multiple times.
kahirudid you remove some (a lot of) snapshots recently?
wictory[m]Hmm, now it's btrfs-transaction running at 100%
wictory[m]well I'm taking a snapshot every 15 minutes, and they get removed every now and then. However, this behaviour started today.
kahirumy guess would be some of the recently removed snapshots was big or there were many small ones, so btrfs is now is trying to clean up all the data which was held by the snapshot and is not needed anymore
wictory[m]I checked out buttersink today which does something with qgroups, I'm suspecting that this could have something to do with it
wictory[m]Ok, so if I wait out the cleaning the problem should resolve itself
wictory[m]Is there any way to list which operations are currently running inside the filesystem?
wictory[m]Can qgroups mess up things like this, even though I'm not using quotas?
Zygoqgroups can mess up a lot of things
ZygoI think qgroups are still in the "you should only use this feature if you intend to debug this feature" category
Zygoeven if you're not using them, their code occasionally ruins your day
Zygowictory[m]: you can also try the space_cache=v2 mount option (if you're not using it already) as space_cache v1 has some impressive update lags
Zygowictory[m]: another mount option that may help is 'ssd_spread,nossd' (both options, in that order) that work around an unfortunate allocation clustering issue
Zygothe second one is an awkward workaround for a number of deeper problems. The first one (space_cache=v2) should really be the default, but isn't yet.
kahiruZygo: still nossd even on ssds?
wictory[m]Zygo: I was surprised to find that when a subvolume is created, a qgroup is also created. Should it be like this?
Zygogrossly oversimplified: 'ssd' sets parameters A, B, and C to bad values. 'ssd_spread' sets parameter B to a good value. 'nossd' sets parameters A and C back to good values, but leaves B alone. The net effect is to set parameter B to a good value.
kahiruoh my
Zygoexcept in 4.14 (?) where the bug in 'nossd' was fixed and that combination of options now has no effect :-/
ZygoI'm pretty sure nobody knows how to tune the btrfs allocator, all current btrfs devs included ;)
Zygowictory[m]: I wouldn't know, I'm far too afraid to use qgroups
wictory[m]Zygo: yeah .. the solution was to disable quotas. I didn't realize that they were enabled .. or that there was a disable option. I should send a pull request for the README to buttersink.
yvihey when i want dmcrypt and multi-device btrfs i could do one dmcrypt per device but that kinda sucks no?
zdzichunative btrfs encryption patches went nowhere
yviwell you have do to encryption for each device...thats kind of wasteful
urmetyou want to encrypt only part of your data? :D
yviwith mdadm it would get encrypted only once because i would make a dmcrypt on the mdadm device
urmetone encryption setup per logical device, yes. with multiple devices you have multiple things to encrypt. seems kind of logical
yviyeah and makes btrfs raid more than useless for my case
yvigiven the huge number of weirdo block devices/dm stuff in the kernel it probably wouldn't be too hard to make some kind of mapper for this
yvisomething like a virtual disk
yviand add partitions to it
yvithen map the partitions to real disks
yvior something
yvibut this might be kinda stupid :) i'm not a programmer
meisterlukHi, I have a 2 identical disks. One is (almost) full of data (non-OS). The other is new and I just formatted it as btrfs. How can I make a simple RAID-1 such that disk failure does not make me lose data. Any tutorials? I'm new to btrfs.
urmetyvi: create a jbod md device, encrypt that and make disk-sized partitions on it? :D
yviwell here we go..some inspiration
yvii will look into this stuff
urmetI still don't understand why encrypting _sepatare_ devices separately is bad
yviwhy not
yviif i have 2 dmcrypt and raid1 btrfs for example wouldnt that make it so they get encrypted twice cpu usage
yviam i just stupid maybe
yvito be fair iam not very bright
optyyvi: you have to live with that until btrfs gets encryption
optyyvi: and you're right that it's not so effective now
opty(i'm running a btrfs raid1 on the top of two luks-ed ssds :))
meisterlukAnyone with tips for me? I don't know how to get started with 2 disks for RAID-1 and existing data.
optymeisterluk: backup and format
optymeisterluk: supposing first disk a non-btrfs
meisterlukopty: what do I need to setup? Do I have to have subvolumes on my disk with existing data? Both are btrfs.
yvipretty sure you just have to add the device and then you can do online conversion
optymeisterluk: then you should just add the second one to the existing filesystem and not make it a separate
optymeisterluk: consult the wiki for details
meisterlukok, is it a problem that I have two mount points "/" and "/home" on my existing btrfs?
optymeisterluk: no problem if both are just subvolumes
optymeisterluk: try btrfs subvolume list /
optymeisterluk: it should list /home too
meisterluknope, just "ID 257 gen 23307 top level 5 path @"
meisterluk(xubuntu, btw)
optymaybe just a different layout than i'm expecting :)
meisterluk... and that's why I could not proceed by reading online guides :-P
optyanother way is for example lsblk
meisterlukCan I transform the existing mount points into btrfs subvolumes?
meisterlukah, wait. I am confusing something myself... I have two disks. None of them contain the operating system.
meisterlukSo I just have one disk with existing data on btrfs. And one is freshly formatted as btrfs (same size). Now I want to use them for RAID-1. What do I have to start with?
meisterluk(the OS is btrfs as well, but I don't care about it now)
meisterlukah, somehow "btrfs filesystem show /media/motsu" returns "ERROR: not a valid btrfs filesystem: /media/motsu". But xubuntu claims so. That's why my approaches do not work.
meisterlukWhat is "btrfs device add" supposed to do? I mean "adding a device to a filesystem" happens by udev, not by btrfs... ?!
Knorriemeisterluk: what do you mean by "freshly formatted"?
Knorriewhich command? /usr/bin/format --fresh or something else
meisterlukformatted with gparted as "btrfs"
meisterlukSo I guess with "parted"...
darklingYou need to remove the FS from the empty one (wipefs will do this, for example).
Knorrieok, that sounds like it made a new separate btrfs filesystem on it
Knorrieso you have 2 now
darklingThen btrfs dev add /dev/<empty-device> /mountpoint
darklingWhere /mountpoint is (one of) the place(s) that the full filesystem is mounted at.
Knorriewhen using gparted to define the size of the partition, just leave it as "unused" afterwards
darklingThen convert the whole thing to RAID-1 with balance (see "man btrfs-balance", under "FILTERS", "convert=")
darklingbtrfs balance start -dconvert=raid1,soft -mconvert=raid1,soft /mountpoint
meisterluksounds great, I will start with wipefs now...
Knorriedouble check the disk you do it on :D
meisterlukI think I will make a backup of my existing data beforehand anyways ^^
Knorriethat's always a good idea
Kobazvaddr 190081662976 length 2147483648 used_pct 2 free space fragments 5647 score 3522
Kobazi had another box without nossd
Knorriea 2G chunk
Knorrieand the 190081662976 ?
Kobazi'm defragging already
Kobazmaybe the dump stuff
Kobazit didn't get to it yet
KobazError: No block group at vaddr 190081662976!
Kobazhmm, that block group isn't listed as having been processed by magic defrag
Kobazsorrys.. izza gone
Kobazi had like about 50 groups > 1500
Kobaznow i only have: vaddr 200819081216 length 2147483648 used_pct 19 free space fragments 9 score 2
Kobazmaybe on the show_free_space_fragmentation script i can dump heatmaps for each group
Knorriedid you remove the code that does that just before feeding one to balance?
Kobazthat block group wasn't processed by magic
Kobazthat was after some defragging
Kobazthis was the second pass
Kobazbut that 190081662976 is in the list
Kobazand then it's not in the output from magic
Kobazso why would that block group be gone?
Knorriestill not seeing it?
Kobazdefrag supposidly didn't touch it
Knorrieit's there, in the list
Kobazand heatmap says no block group
Kobazit's in the freespace frag list
Kobaznot in the magic defrag list
Knorrieyes it is
Kobazi had a ! at the end of the num in firefox search
Kobazthat's awful
KnorrieI'd call it "the sandstorm"
Kobazthe wonders of running with =ssd for too long
KnorrieKobaz: did you see this one already?
Knorriethat's how it happens
kaulianHI, all
kauliani'm back with my bad block and my partition in RO
kaulianI try a check with the last progs release
kauliansame error
kaulianand my partition stay in readonly
kaulianAnyone to an advice, to know how to deal with that ?
Waxheadkaulian: what is your problem? Raid1 with only two devices?
kaulianA simple disk no RAID
kaulianI can mount the disk
KnorrieWaxhead: the problem is that some hardware component messed up data which ended up on a disk
kaulianread data
WaxheadAh ok , got it.
kaulianOK Knorrie , but do you think there is solution to repair the filesystem ?
Knorriekaulian: if a human cuts himself, it heals automatically. with a computer, that's not the case.
kaulianKnorrie: Yes I understand
kaulianSo my drive is KO for you ?
kauliannot the FS
Knorriedeja vu... we've had the same conversation a few times in the last few days
Knorrie14:11 < multicore> kaulian_: computer A corrupts data before it's written to hdd
Zygokaulian: get another disk, copy data off your first disk, then reformat the first disk and copy data back (or just use the new disk)
Knorrieso, blow a hole in something... then take a picture of it... show someone the picture and ask.. "please tell me what was there before it got shot"
kaulianOK Knorrie sorry
kaulianI don't understand ..
kaulianthe multicore message ..
Waxheadkaulian: I think what Knorrie is trying to get across is. If you have good data in your head and you write that down on paper with a bad pen - it does not matter how good the paper is. The data is bad because the hardware that wrote it to the excellent paper is not working as it should. Hence if someone is about to read the data from the paper they will get wrong data even if there is a gazillion copies made of that paper.
Waxheadkaulian: if you fix your pen, your data will be good :)
Knorrienot the old data
darklingNo, i fyou fix your pen, *new* data will be good.
darklingThe old data will still be broken.
Waxheadof course it will. You need to write your data with a good pen towards new paper :)
Waxheadand your old data is lost forever of course
kaulianOK, I thought that btrfschk could erase this bad data to make the other data good
Waxheadwhat if you try to fix bad data with a bad pen ? .... fix your pen first.
kaulianOK, now I understand... Thanks all
kaulianI will go tomorrow buy a new pen
Waxheadgood luck
kaulianAnd stop harassing youAnd stop harassing you
kaulianbad copy/paste
NoNetI'm trying remove devices from an array. I'm getting an "error removing device '/dev/sdk': Input/output error == paste: <== details
NoNetusage listing:
NoNetSome assistance/advice would be appreciated.
Knorrieanything interesting in dmesg?
Knorrieinteresting sized filesystem by the way
NoNetI have messages in dmesh - putting a paste together now.
NoNetI have a series of these for /dev/sdag.
NoNetI'm trying to break down my large single array into a series of smaller arrays.
NoNetsdag is actually sdaa
multicoreNoNet: kernel version?
Knorrieit's in the paste
NoNetkernel 4.13.8
Knorrieso sdaa is dying
NoNetI'm also trying to get away from raid1 - want to switch to raid1 with nightly par.
Knorriefrom what to what
NoNetMeant from raid5 to raid1
NoNetMy files are all static. So grouping the disks as 5 disks with a standalone 6th disk as weekly par.
Knorriewhat's 'par.'
NoNetIt's a separate parity disk.
NoNetIt's standalone. Allows recovery of any single element in a set.
multicoresnapraid? or what?
darklingNot after you've continued using the FS.
Knorrieyou have a disk to store par files, like when downloading from newsgroups?
NoNetThat's correct - assumes no changes.
darklingAnd if you're using btrfs RAID-1, you've already got the capability to recover a mising device.
NoNetYes - just like newsgoups. You need to rerun the par if any element in the set changes.
KnorrieACTION has no experience with big btrfs raid5, but I guess you're in for a rollercoaster ride that can take quite some time
Knorriebetter grab a new box with new disks and just mkfs and copy the files
Knorriewell, anything that can still be rescued
NoNetI haven't lost any data ... yet.
darkling... but some of it may have rolled under the sofa when you weren't looking.
KnorrieACTION feels like a complete n00b again... messing around with some simple C and trying to get it compiled
Knorriefirst idea of "ha, lol, this should be doable" has already changed in "ok, let's try just 1 simple thing out of the 20 I need"
NoNetI've all ready copied 19TB to two smaller raid1 sets. Deleted the copied data from this set and wanted to free up 3 drives to start making another set.
Knorrieif the raid5 data is striped over all disks, removing 1 disk means you're rewriting *ALL* your data, on *ALL* disks again
Knorrieand that 3 times
NoNetI guess I continue saving my pennies for some more drives. - That one of the reasons I wanted to get away from raid5. Too had on the disks.
gehidoreraid5 is terrifying to me
gehidoreraid6 sure...
NoNetSo I shouldn't do anything further with the large array until after I finish copying the data?
gehidoreprobably the best since you don't sound like you have backups
NoNetNone of this is business related or time critical.
NoNetPersonal hobby.
Knorriecan you still read all data? because I see csum errors
Knorriethe read IO errors can be fixed hopefully by btrfs on the fly
Knorrieusing the parity
NoNetI just finish copying off 16TB this AM. Still mounted R/W. So I'm assuming I can still read everything. I have 8 disks 6TB disks I can use to copy more.
NoNetI didn't run into a problem until I tried to remove a device.
meisterlukOut of curiosity, how do you make these nice access heatmap animations?
meisterlukKnorrie: cool, thx!
Knorrieit's just where data is stored, it doesn't show acvitity
Knorriemight even be in your os package manager
meisterlukxubuntu? cannot find it in the repo....
meisterlukjop, activity would be too crazy, I guess...
Knorrieit's quite recent, so only in the newest, like current debian testing, latest ubuntu etc
Knorriebut you can also just clone the git
Knorrieyeah, I want to do that also, using kernel tracepoints... creating a norton disk utilities view with ncurses or so... but currently first diving into another wild idea
darklingYou want to be careful with those.
Knorrieso wild was not the wrong word to use
KnorrieACTION is waiting for darkling to elaborate
darklingWild ideas. Dangerous buggers.
Knorriemeisterluk: got some nice pics already?
meisterlukKnorrie: nope, caught up in the "Hilbert's curve" video :-D
Knorriehaha nice
meisterlukDoing math and CS. So this video is great! :-D
linuxkeitaroHello, I'm having the btrfs issue I described here:
linuxkeitarowhat would my next step be?
Waxheadlinuxkeitaro: and what part of ERROR: error removing devid 0: unable to go below two devices on raid1 do you not understand?
Knorrie"the issue" .. I see a whole page with issues... which issue?
linuxkeitaroWaxhead: what I don't understand is that when I do btrfs fi show - devids 1 and 2 are there
linuxkeitaroso 0 should be a third, not a second, right?
Knorrieinstead of asking what the next step is, can you explain what your previous steps were?
Knorrieor are you the person posting that on reddit
linuxkeitaroKnorrie - I am
Waxheadlinuxkeitaro: I am not following. You have 2x disks in your filesystem. You want to remove one correct?
linuxkeitaroKnorrie: sorry for not making that clear
Knorrieoh ok, many info missing, such confusing
WaxheadLet's start over.
linuxkeitarosorry and thanks
linuxkeitaroI will start
linuxkeitaroso I had 2 disks in RAID1 - 3TB and 4TB
Waxheadso far so good...
linuxkeitaroI used an external enclosure to attach a 6TB drive to the system
Waxheadok so that's three disks then....
linuxkeitaroat the time it was /dev/sdl
linuxkeitaroI ran
linuxkeitarobtrfs replace start -f 1 /dev/sdl /media/Photos/
linuxkeitarobut it errored out:
linuxkeitaroStarted on 29.Nov 21:32:46, canceled on 29.Nov 21:52:31 at 0.0%, 236415 write errs, 0 uncorr. read errs
Knorriedon't do that
linuxkeitaroKnorrie - now I know :)
Waxheadagree with Knorrie
linuxkeitaroSo, OK
linuxkeitaroit's canceled
linuxkeitaroI shut off the computer and disconnect my bluray drive
Knorriecrappy usb hardeware eats all teh data
linuxkeitaroto use those sata cables to connect the 6TB drive
linuxkeitarothe drive is now /dev/sda
linuxkeitarohowever, when I try the command again (replacing sdl for sda)
linuxkeitaroit tells me
linuxkeitaroERROR: /dev/sda is mounted
linuxkeitaroAnd when I do a dmesg | grep sda
linuxkeitaro[ 3.920449] BTRFS: device label Photos devid 0 transid 158105 /dev/sda
linuxkeitaroso I try
linuxkeitarobtrfs device delete 0 /media/Photos/
linuxkeitaroERROR: error removing devid 0: unable to go below two devices on raid1
linuxkeitarowhich doesn't make sense to me
Waxheadwell you have not added your third device yet do you ?
Waxheadyou need to add your third disk to the filesystem first. Then remove the old disk.
linuxkeitaroas part of the replace command?
Knorrieno wait wiat
Knorriedo you have backups?
WaxheadACTION waits for someone to say READ ONLY
linuxkeitaroKnorrie - it's backed up to the cloud, but I'd rather not have to recover 3TB of backup
Knorriewhy does it say /dev/sda is mounted
linuxkeitarothat's a great question
Knorriethink before you do anything else now
Knorriedevid 1 size 5.46TiB used 2.02GiB path /dev/sda1
multicoreno, no just try some random things with --force option
linuxkeitaroKnorrie - as I was trying to work through the problem last night
linuxkeitaroI deleted the partition on /dev/sda and it still wanted to be part of the other raid (but not really)
linuxkeitaroso the system has it on its own as you pasted
linuxkeitarobut also somehow still part of the replace?
linuxkeitarothat's where I'm confused
linuxkeitaroWaxhead that's what I was working from yesterday
Knorriethe disk you are replacing to
Knorriewhat did it contain before?
linuxkeitarobrand new disk
Knorrieno, it has a btrfs filesystem with uuid 659edd01-d563-4e7e-b8a7-5b192b814381
Knorriein a partition
linuxkeitaroyeah, NOW it does
linuxkeitaroafter things went pear-shaped from the usb enclosure
Knorriea filesystem unrelated to the one you were doing replacing etc
linuxkeitaroKnorrie - anything on there can be blown away as long as I don't lose the data on the drives in the Photos RAID1
multicoreKnorrie: he probably mkfs'ed it
linuxkeitaromulticore - yeah
multicoreKnorrie: also note the force on the replace
linuxkeitarovia KDE partition manager
Waxheadeither that or the disk is a refurbushed one that someone did use a btrfs filesystem on
Knorrielinuxkeitaro: then DONT SAY nothing brand new disk
linuxkeitaroKnorrie - sorry. It was brand new but I used KDE partition manager on it
Knorrietell us
Knorrieok so it has a btrfs filesystem, you put it in the computer, pc computer starts and something automounts is?
Knorrieor is there some line in your fstab that tries to explicitely mount something on sda?
Knorrieor a gui environment that tries to mount every disk it sees
linuxkeitaroSo when I FIRST put it in computer - no FS
linuxkeitaroever since the replace command - it wants to be mounted if /media/photos is mounted
Knorrieor since the kde partition manager
linuxkeitarothe btrfs filesystem came from me trying to clear that
linuxkeitarowhen I first put it in, I created a partition
linuxkeitaroand after I did that, I had to use -f to get the replace to go
Knorriea failed replace should not end up with a disk that thinks it's already part of that filesystem (if it does, it's a really dangerous bug that needs to be fixed asap)
Knorrieyeah, probably -f because there was a new unrelated btrfs on it now
linuxkeitarothat's why I posted to the mailing list today about that
linuxkeitarobut I've gone past having a good forensic situation there
Knorrieand then it says.. nope, is mounted
linuxkeitarowith what I was doing to try and get it working
Knorrieok, what's the output of cat /proc/mounts
Knorrieor only the sda line
Knorriewhere is it mounted and why
linuxkeitarodo I need to be root?
linuxkeitarocat /proc/mounts | grep sda
linuxkeitaroyeilds nothing
Knorriealso, if you do 'btrfs device remove /dev/null /media/Photos/'
Knorriedoes it also give that error?
linuxkeitarolet me see
linuxkeitaroERROR: not a block device: /dev/null
Knorrieif so, it probably checks minimal number of devices before looking at whatever you tell it as device to remove
Knorrieand /dev/sdc1 ?
linuxkeitaro /dev/sdc1 /home btrfs rw,seclabel,relatime,space_cache,autodefrag,subvolid=275,subvol=/home 0 0
Knorriein the remove command
linuxkeitaroI think what we want in my current config is sde or sdb
linuxkeitaro /dev/sde1 /media/Photos btrfs rw,seclabel,relatime,space_cache,autodefrag,subvolid=257,subvol=/photos 0 0
linuxkeitarocat /proc/mounts | grep sdb1 yields nothing
Knorrieit won't let you anyway, but the interesting thing is to see if 'unable to go below two devices on raid1' is done before actually looking if the device path provided is part of the target fs at all
linuxkeitaroalthough it shows as devid 2 in PHotos
Knorrieyes, because mount will only know about 1 device, it's more limited than btrfs
linuxkeitarowhat else do you need me to type to figure out where we go from here? :)
linuxkeitaro(sorry if that came off rude....)
Knorriebut since btrfs fi show does list the device as belonging to a whole different filesystem, I don't think you're in big trouble
linuxkeitaroKnorrie - great
Knorriebut why is it 'mounted'
Knorrieand where
linuxkeitaroI don't know
linuxkeitaroshould I try the replace command again? Is there somewhere you'd get good info from - dmesg or something?
Knorrieif you are sure sure sure about the current sda being that disk, just overwrite the beginning with a bunch of zeroes
Knorriethen reboot
Knorriethen it will be a really nothing brand new disk again
linuxkeitaroso it's the only 6TB device on my computer
linuxkeitaroso from that I'm set
multicorewipefs -a will do
Knorriethe whole partition table etc needs to go
Knorriebecause apparently something thinks there's an sda1 also
linuxkeitaro# wipefs -a /dev/sda
linuxkeitaro/dev/sda: 8 bytes were erased at offset 0x00010040 (btrfs): 5f 42 48 52 66 53 5f 4d
linuxkeitaro/dev/sda: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
linuxkeitaro/dev/sda: 8 bytes were erased at offset 0x57541e95e00 (gpt): 45 46 49 20 50 41 52 54
linuxkeitaro/dev/sda: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
linuxkeitaro/dev/sda: calling ioctl to re-read partition table: Success
linuxkeitaroSo now reboot?
linuxkeitaroit's no longer on btrfs fi show
linuxkeitaroOK, thanks for your help so far Knorrie and multicore - I will reboot and see where we stand after that
Knorriekdave: -$ make btrfs-show-super -> btrfs-show-super.c:21:37: fatal error: cmds-inspect-dump-super.h: No such file or directory
Knorriekdave: want patches to remove dead crap?
Knorriekdave: or build everything in the makefile before release and fix it?
linuxkeitaroOK, I'm back. I belive the new drive is once again sda
linuxkeitaroit's not showing on btrfs fi show - which is good
Knorriekdave: ah ok has been fixed in devel already
KnorrieACTION puts the chainsaw away
Knorrienow retry the replace
linuxkeitaroI'm planning on running btrfs replace start 1 /dev/sda /media/Photos/
linuxkeitarowith devid 1 on /media/Photos being the one I want replaced
darklingKnorrie: You don't _usually_ have to threaten kdave with a chainsaw to get him to do things, you know...
Knorriethe chainsaw was for the code
darklingYeah, yeah...
Knorrielinuxkeitaro: yes
linuxkeitaroKnorrie - thanks
Knorriemaybe I should just work on top of devel branch instead of master
Knorriefor the latest bugs & fixes
linuxkeitarook, it's running. Thanks for your help today, Knorrie
Knorrieso the big blocking thing was that there was a new extra btrfs filesystem created on the new disk
linuxkeitaroyes, I will say that independent of my tomfoolery in kde partition manager, there was a btrfs filesystem when the btrfs replace failed
linuxkeitaroso now I know wipefs is needed if I come across that bug again
darklingKnorrie: It's usual to work against a tag, rather than random HEADs.
Knorrieif there was... please try to reproduce it with the crappy usb
darkling(Or at least, to submit patches relative to the most recent tag)
linuxkeitaroalthough if I come across it again and it's not critical, I'll try and preserve it for a good bugzilla
Knorrieif aborted replace results in a disk with fsid of the target fs, it's a really critical bug I think
linuxkeitaroyeah - I wonder if I can replicate it in a VM
linuxkeitarowell, I have to go help w/ feeding and putting the little ones to bed. Thanks again for all your help Knorrie.
Knorrieor maybe less critical because it gets a new devid
Knorrieok, what is my problem here?
KnorrieI don't understand any of this shit yet, it's good I'm finally learning it
darklingYou probably want to tell gcc to link with the object file that contains cmd_inspect_dump_super (whatever that is)
Knorrieand how does it know that for the other file
Knorrieif I edit btrfs-show-super.c and remove lines, will that one still work
darklingIf you run make with V=1, you should get the full command-line for the gcc printed.
Knorriewhen it's identical
Knorrieok so for the compile work it reads the .h, and then in the next step it needs it again, but then differently, makes sense
darklingNot really.
Knorrie-$ cp baby1.c btrfs-show-super.c
Knorrie-$ make btrfs-show-super
Knorrieso there's meta info somewhere
darklingYes, it's in the makefile.
darklingRun V=1 make btrfs-show-super
darklingYou'll see what the actual command it's using is.
Knorriemake: 'btrfs-show-super' is up to date.
darklingOK, so delete the target and try again.
darklingBasically, you build a .c file to .o
Knorriegcc: error: cmds-inspect-dump-super.o: No such file or directory
KnorrieMakefile:389: recipe for target 'btrfs-show-super' failed
darklingThe .c file may include a .h, which is just the stubs of functions which are actually defined elsewhere.
Knorrieok, so this zombie program is still not working correctly
Knorrieeven after someone tried fixing it
darklingThe next step is linking, which takes a bunch of .o files and joins them together, resolving the stub function definitions.
darklingWhat you're seeing is the result of trying to link a .o file which refers to a function somewhere else,
darklingbut the function definition is in another .o file that wasn't supplied to the linker.