Re: btrfs device delete problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alfredo Esteban posted on Sun, 06 Oct 2013 13:10:49 +0200 as excerpted:

> I'm getting an error when trying to delete a device from a raid1 (data
> and metadata mirrored).
> 
>> btrfs filesystem show
> failed to read /dev/sr0
> Label: none  uuid: 78b5162b-489e-4de1-a989-a47b91adef50
>     Total devices 2 FS bytes used 107.64GB
>     devid    2 size 149.05GB used 109.01GB path /dev/sdh1
>     devid    1 size 156.81GB used 109.03GB path /dev/sdb6
> 
> Btrfs v0.20-rc1
> 
>> btrfs device delete /dev/sdh1 /mnt/raid-data/
> ERROR: error removing the device '/dev/sdh1' - Inappropriate ioctl for
> device
> 
> Raid has been working fine for a long time. Both devices are present but
> /dev/sdh1 is a new empty btrfs partition at the moment.
> 
> I should like to know whether this is an error or "btrfs device delete"
> command is not the appropriate one. I just want to know how to delete
> sdh1 from raid, add a new partition and balance.
> 
> My kernel version is: 3.8.0-31

Two points in addition to what Chris Murphy said...

1)  Btrfs still has the experimental label and is still under heavy 
development.  Those choosing to run it are volunteering to test it as 
such.  As an experimental filesystem under heavy development, each new 
kernel brings fixes as well as new features, and running a current kernel 
is *STRONGLY* recommended, both because it'll have more bugs fixed, AND 
because if/when there IS a problem, the output and logs generated are 
going to be far more valuable if the kernel is current than if it's 
several kernels behind.

And several kernels behind is EXACTLY what 3.8 is.  The current stable 
kernel is 3.11.4, with 3.12-rc3 just out as well.  Why are you still back 
on 3.8?  Do you WANT trouble from already fixed bugs, and output that's 
not as valuable to the devs as that of a current kernel?  As a btrfs 
tester you should be no farther back then second stable series AT THE 
OLDEST (so 3.10 series, presently), and even that is old and of limited 
value.  Preferred is the latest stable series (3.11 at this point) or the 
development kernel (3.12-rc*).

Note that there are reasons people might be a bit conservative and want 
to run old kernels, but those reasons don't fit very well with being a 
tester of an experimental status filesystem such as btrfs.  If you have 
reason to be conservative and run and old kernel, and you might, you 
really should reconsider whether testing btrfs is appropriate for you or 
not, since running an experimental status filesystem is anything BUT 
conservative.

2) Btrfs raid modes won't allow you to reduce the number of devices below 
the minimum number necessary for undegraded use of that raid mode.  So 
raid1 and raid0 modes require two devices minimum, raid10 and the new 
raid6 modes require four devices minimum, and raid5 requires three 
minimum.  (Note that raid5/6 aren't considered ready for ordinary use 
yet.)

Since your btrfs in raid1 mode has two devices currently, you won't be 
able to delete one of them as-is.  You will need to ADD a device first 
(bringing the total to three devices), optionally do a balance, and THEN 
delete the failed/missing/to-be-removed device (bringing the total back 
to two, which you never go below that way).

This, among other things, is covered on the btrfs wiki.  If you've not 
read it recently, you're probably missing other useful hints and 
information that it covers too, and I'd recommend spending some time 
reading it.

https://btrfs.wiki.kernel.org

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux