linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hendrik Friedel <hendrik@friedels.name>
To: Chris Murphy <lists@colorremedies.com>
Cc: Martin Steigerwald <Martin@lichtvoll.de>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: btrfsck does not fix
Date: Sun, 09 Feb 2014 09:36:59 +0100	[thread overview]
Message-ID: <52F73E2B.9080103@friedels.name> (raw)
In-Reply-To: <A0A6914C-DDA5-4904-83FA-B59AA420C9C6@colorremedies.com>

Hi Chris,

thanks for your reply.

 >> ./btrfs filesystem show /dev/sdb1
>> Label: none  uuid: 989306aa-d291-4752-8477-0baf94f8c42f
>>         Total devices 2 FS bytes used 3.47TiB
>>         devid    1 size 2.73TiB used 1.74TiB path /dev/sdb1
>>         devid    2 size 2.73TiB used 1.74TiB path /dev/sdc1
>
> I don't understand the no spare part. You have 3.47T of data, and yet the single device size is 2.73T.
> There is no way to migrate 1.74T from sdc1 to sdb1 because there isn't enough space.

Fair point. I summed up manually (with du) and apparently missed some 
data. I can move the 0.8TiB out of the way. I just don't have 3.5TiB 
'spare'.



>> btrfs device delete /dev/sdc1 /mnt/BTRFS/rsnapshot/
>> btrfs device delete /dev/sdc1 /mnt/BTRFS/backups/
>> btrfs device delete /dev/sdc1 /mnt/BTRFS/Video/
>> btrfs filesystem balance start /mnt/BTRFS/Video/
>
> I don't understand this sequence because I don't know what you've mounted where,

I'm sorry. here you go:
/btrfs subvolume list /mnt/BTRFS/Video
ID 256 gen 226429 top level 5 path Video --> /mnt/BTRFS/Video/
ID 1495 gen 226141 top level 5 path rsnapshot  --> /mnt/BTRFS/rsnapshot
ID 4444 gen 226429 top level 256 path Snapshot --> not mounted
ID 5845 gen 226375 top level 5 path backups --> /mnt/BTRFS/backups


> but in any case maybe it's a bug that you're not getting errors for each
 > of these commands because  you can't delete sdc1 from a raid0 volume.
That makes sense. I read that procedure somewhere in the -totally 
unvalidated- Internet.
In case the missing Error-Message is a Bug: Is this place here 
sufficient to report it, or is there a Bug-Tracker?


 > You'd first have to convert the data, metadata, and system profiles to
 > single (metadata can be set to dup). And then you'd be able to delete
 > a device so long as there's room on remaining devices, which you 
don't have.

Yes, but I can create that space.
So, for me the next steps would be to:
-generate enough room on the filesystem
-btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/BTRFS/Video
-btrfs device delete /dev/sdc1 /mnt/BTRFS/Video

Right?

>> next, I'm doing the balance for the subvolume /mnt/BTRFS/backups
>
> You told us above  you deleted that subvolume. So how are you balancing it?

Yes, that was my understanding from my research:
You tell btrfs, that you want to remove one disc from the filesystem and 
then balance it to move the data on the remaining disc. I did find this 
logical. I was expecting that I possibly need a further command to tell 
btrfs that it's not a raid anymore, but I thought this could also be 
automagical.
I understand, that's not the way it is implemented, but it's not a crazy 
idea, is it?

> And also, balance applies to a mountpoint, and even if you mount a
 > subvolume to that mountpoint, the whole file system is balanced.
 > Not just the mounted subvolume.

That is confusing. (I mean: I understand what you are saying, but it's 
counterintuitive). Why is this the case?

>> In parallel, I try to delete /mnt/BTRFS/rsnapshot, but it fails:
>>   btrfs subvolume delete  /mnt/BTRFS/rsnapshot/
>>   Delete subvolume '/mnt/BTRFS/rsnapshot'
>>   ERROR: cannot delete '/mnt/BTRFS/rsnapshot' - Inappropriate ioctl
>>   for  device
>>
>> Why's that?
>> But even more: How do I free sdc1 now?!
>
>
> Well I'm pretty confused because again, I can't tell if your paths refer to
 > subvolumes or if they refer to mount points.

Now I am confused. These paths are the paths to which I mounted the 
subvolumes:
my (abbreviated) fstab:
UUID=xy      /mnt/BTRFS/Video btrfs subvol=Video
UUID=xy     /mnt/BTRFS/rsnapshot btrfs subvol=rsnapshot
UUID=xy     /mnt/BTRFS/backups btrfs subvol=backups


 > The balance and device delete commands all refer to a mount point, 
which is the path returned by the df command.
So this:
/dev/sdb1       5,5T    3,5T  2,0T   64% /mnt/BTRFS/Video
/dev/sdb1       5,5T    3,5T  2,0T   64% /mnt/BTRFS/backups
/dev/sdc1       5,5T    3,5T  2,0T   64% /mnt/BTRFS/rsnapshot

> The subvolume delete command needs a path to subvolume that starts with the mount point.
Sorry, this I do not understand, no matter how hard I think about it..
What would it be in my case?

Thanks for your help! I appreciate it.


Greetings,
Hendrik

  reply	other threads:[~2014-02-09  8:37 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-03 19:41 btrfsck does not fix Hendrik Friedel
2014-01-03 23:33 ` Chris Murphy
2014-01-04 21:21   ` Hendrik Friedel
2014-01-05 13:36     ` Hendrik Friedel
2014-01-05 16:55     ` Chris Murphy
2014-01-07 20:38       ` Hendrik Friedel
2014-01-10 23:53         ` Hendrik Friedel
2014-01-11  1:05           ` Chris Murphy
2014-01-12 22:31             ` Hendrik Friedel
2014-01-14  0:40               ` Chris Murphy
2014-01-14  6:03                 ` Duncan
2014-01-14  7:49                   ` Chris Murphy
2014-01-14  9:30                     ` Duncan
2014-01-14  9:38                       ` Hugo Mills
2014-01-14 17:17                       ` Chris Murphy
2014-01-18  7:20                         ` Chris Samuel
2014-01-14  8:16                 ` Hugo Mills
2014-01-19 19:37               ` Martin Steigerwald
2014-01-21 20:00                 ` Hendrik Friedel
2014-01-21 20:01                   ` Hendrik Friedel
2014-02-08 22:01                   ` Hendrik Friedel
2014-02-09  0:45                     ` Chris Murphy
2014-02-09  8:36                       ` Hendrik Friedel [this message]
2014-02-11  1:45                         ` Chris Murphy
2014-02-11  2:23                           ` Chris Murphy
2014-02-16 19:18                             ` Hendrik Friedel
2014-02-16 19:54                               ` Chris Murphy
2014-02-17  3:20                                 ` Duncan
2014-02-17  9:41                                   ` Goswin von Brederlow
2014-02-18 21:55                                   ` Hendrik Friedel
2014-02-18 22:12                                     ` Chris Murphy
2014-03-02 18:39                                       ` Hendrik Friedel
2014-03-03 22:35                                         ` Chris Murphy
2014-03-04  6:42                                           ` Hendrik Friedel
2014-03-04 17:02                                             ` Chris Murphy
2014-03-03  1:09                                 ` Russell Coker

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=52F73E2B.9080103@friedels.name \
    --to=hendrik@friedels.name \
    --cc=Martin@lichtvoll.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.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;
as well as URLs for NNTP newsgroup(s).