Skip to contentSkip to conversation

btrfs "stuck" on

DISCUSSION Mike Dilger 2 participants 2 messages Mar 27, 2013 – Mar 29, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

I have a remarkably similar problem as Ask Bjørn Hansen.

I have a 2TB btrfs filesystem on a SATA drive, on top of an msdos partition table, partition 1, without any form of RAID.

I have been using it to make backups using rsync like this:
1) snapshot the previous backup subvolume
2) rsync into the new snapshot
3) If we are overwriting a previous backup "level", drop that previous subvolume and rename this one into it's place.
I keep 8 levels in tower-of-hanoi strategy. It's the same backup script I've used for the last 5 years, except I removed the rsync --link-dest and added in the btrfs snapshotting, just because dropping a subvolume is so damn quick compared to deleting all the files.

After about 400 GB of backups taken all in the same day, but having already dropped probably 12 or 13 subvolumes after snapshotting, I get the behavior.

The behavior is:
*) After mounting, things are usually ok for 20 seconds or so, then it starts *) The disk activity lite burns constantly
*) btrfs-cleaner is fairly high up in 'top'
*) Read/writes to the device are painfully slow
*) I cannot unmount the device, nor cleanly shutdown.
*) Once the system froze hard, no mouse cursor movement, not even the reset button worked.

I'm running linux 3.8.3 pulled from git, so no distribution mods or patches.

Happy to run any tests.

-Mike
[not on this list, so need to be on the reply]

#1 lore raw
Quoted 8 lines · Mike Dilger

I have been using it to make backups using rsync like this:
1) snapshot the previous backup subvolume
2) rsync into the new snapshot
3) If we are overwriting a previous backup "level", drop that previous subvolume and rename this one into it's place. I keep 8 levels in tower-of-hanoi strategy. It's the same backup
script I've used for the last 5 years, except I removed the rsync
--link-dest and added in the btrfs snapshotting, just because dropping
a subvolume is so damn quick compared to deleting all the files.

It is very quick to mark the snapshot deleted (compare it to adding an item to todo vs actually doing it).

Quoted 3 lines

After about 400 GB of backups taken all in the same day, but having already dropped probably 12 or 13 subvolumes after snapshotting, I get the behavior.

This implies lots of data to process during the cleaning phase.

Quoted 2 lines

The behavior is:
*) After mounting, things are usually ok for 20 seconds or so, then it starts

Unless cleaner was active, it kicks at most after 30 seconds when the the regular transaction commit kicks in.

Quoted 3 lines

*) The disk activity lite burns constantly
*) btrfs-cleaner is fairly high up in 'top'
*) Read/writes to the device are painfully slow

Cleaner doing its work.

Quoted 1 line

*) I cannot unmount the device, nor cleanly shutdown.

Known problem, the umount should be a bit more responsive with
https://patchwork.kernel.org/patch/2256801/

Quoted 1 line

*) Once the system froze hard, no mouse cursor movement, not even the reset button worked.

It could be the BUG_ON in btrfs_clean_old_snapshots that could happen when there a transaction abort occurs and the filesystem turns RO -- also fixed by the patch above.

david