swestrup: (Default)
[personal profile] swestrup
Now, it may just be that I have no idea of what commands to issue to correct these problems that I've been correcting by rebooting my Linux box, but I haven't had much success trying to google for other solutions, so any information folks might have would help.

1) I have a 1TB disk with an XFS filesystem that, until recently, had a 500GB file on it. I deleted the file to make room for more stuff, and started copying onto the drive, only to be told it was full. A quick check got me very confused as df claimed the drive was full, while du over the drive said it was half-full. I couldn't unmount the drive because it said it was 'busy'. I couldn't figure out what process (if any) was holding the drive open. Certainy none that I could figure out. I'm guessing that something had a handle on the now-missing 500GB file and it wasn't really gone until that handle was released, but I could find no way to sort that out short of rebooting.

2) I've been doing a LOT of data transfers between separate drives lately. As such it really matters to me if that transfer happens at 1.2MB/s or 35MB/s.  For some reason, the exact same setup with the exact same commands will sometimes give me one, sometimes the other. Again, I usually solve this by rebooting.  (... although I'm beginning to wonder if its because on the second try I usually mount manually, where on the first I just click on the mount icon. I wonder if the mount parameters are different enough to cause the problem...)

Date: 2009-01-27 10:11 pm (UTC)
From: [identity profile] sps.livejournal.com
But df and du aren't supposed to give the 'same' result. Df tells you how much free space is in the volume; du tells you how much used space is accessible from some namespace. I don't think xfs has a queue for deletions, but it would be perfectly legit if it did; filesystems that reorganise layout are quite likely to. And as you say, things aren't supposed to be deleted while they are still open.

Under Linux, you can generally find out who is accessing what by taking a peek in /proc. It has virtual softlinks to each process' open files.

One thing that's worth trying short of rebooting is logging out and logging back in. Lately most of the misbehaving processes with the kinds of behaviours you describe seem to be the glitzy UI things that are trying to look like a Mac (or maybe a Windows) and fighting an ABI that was designed—well, differently (though DFSs can also do a lot of stuff behind your back).

Date: 2009-01-27 10:11 pm (UTC)
From: [identity profile] joenotcharles.livejournal.com
1. lsof /path/to/drive should give you the list of all open files on that drive and the processes that have handles to them. I believe if you still remember the name of the deleted file you could give that to lsof too.

2. dunno

January 2017

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 7th, 2026 12:52 am
Powered by Dreamwidth Studios