-4

I'm running ubuntu server 16.04.05 LTS My motherboard only has 6 SATA port.

Port 1 has a hard drive that contains the OS, SWAP, and home partition. Port 2, 3, 4 and 5 each have a WD red 2TB hard drive and port 6 has a WD red 4TB drive. All the red dives, ports 2-6 are in a single BTRFS RAID1 pool. The other day the server seemed to but ruining very slow. When I checked things out I was getting a lot of disk latency on /dev/sdf (port 6), in the 15, 16 second range. I was also getting a bunch of errors, "BTRFS error (device sdb): parent transid verify failed on .. . . . . . .

I took the system down and ran WD DOS disk diagnostics short test and every drive and sde (2TB drive on port 5) would only time out. error code 0134. WD is going to send a replacement drive. The system boots up with the BRTFS pool mounted and seems to be running fine with random transid verify failed errors popping up. When the new drive arrives I will need to replace the bad one.
Everything I've read states to use the "replace" command. But this seems to me that it expects the old drive to be there. I can't do this as I have no empty SATA ports.

Is there a way to physically remove the old drive and replace it and get my pool up again? For some reason, I don't think I'm fully understanding this command.

I have tried commenting out my BTRFS mount in fstab, physically removing the bad drive, and mounting the pool in degraded mode. At this point, I tried to run sudo btrfs device delete missing /mnt/btrfs but got back error removing the device 'missing' - Read-only file system

0

The first thing to do is get the system to mount as it normally would, not in degraded mode.

The next step is to use btrfs device delete to remove the disk in question. The command will move all chunks from the chosen disk to other disks in the pool according to your BTRFS profile ("RAID levels"). Before you can run the command to remove the device, your profiles, both data and metadata, need to be set such that when the device is removed your pool will still have the necessary disks to meet the profile requirements; changing the profiles temporarily if needed.

Once the disk has been removed from the pool, you can add the replacement with btrfs device add /dev/...

Finally, you can use btrfs balance to shuffle the data about using the new disk. You'll certainly need this command to change the profiles back in the event you needed to change them temporarily.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.