0

For extra safety, I recently decided to make a second backup of my Macbook's HD. Initially I did so with rsync, because I was already using Time Machine for my first backup. But then I realized Time Machine can handle backups to multiple disks and decided to use Time Machine for the second backup as well.

However, when I try to delete the rsync backup in Finder, I get the following error message:

The operation can't be completed because the item "fd" is in use.

A little investigation confirms that it is failing on the backup's /dev/fd folder. I understand that this folder contains file descriptors (although I'm hazy on what exactly that means). I think perhaps what may have happened is that the file descriptors in use at the time of the backup were copied over, and these are somehow marked as in use. In any case, I'm wondering if anyone knows how I can safely delete these items?

(FWIW, I tried closing all open applications before trying the delete, which made no difference.)

2 Answers 2

2

If this is an external drive, you can just clean it up from another host.

/dev/fd contains the file descriptors for the current running process, so they're kind of special - you may need to drop down to single-user mode (command-s at boot chime), or plug the device into another host to remove this.

You could also try mounting the volume 'nodev' (umount $BACKUP_VOLUME; mount -o nodev $BACKUP_VOLUME $BACKUP_MOUNTPOINT) and just cleaning it up that way.

4
  • Thanks for your help! I was unable to mount the disk in single-user mode. I can't get mount to work either---I'm not fully sure but if I understand correctly, $BACKUP_VOLUME should be something like /dev/disk6s2, and $BACKUP_MOUNTPOINT should be the point in the filesystem at which the disk should appear (like /Volumes/Foo)? I get the following errors trying that: GetMasterBlock: Error 13 opening /dev/rdisk6s2 mount_hfs: error on mount(): error = -1.
    – msailor
    Feb 7, 2021 at 11:57
  • I don't have another computer available so I can't plug it in to something else. I think the easiest solution may just be to reformat the disk but I am hoping to avoid that as there is other data on it as well.
    – msailor
    Feb 7, 2021 at 11:59
  • 1
    Make sure that you run the mount/umount commands as root (sudo umount ... sudo mount). You are correct about what I meant about BACKUP_VOLUME and BACKUP_MOUNTPOINT. You may also need to add "-t hfs" (or -t apfs if it's apfs) after mount and before -o nodev.
    – iapitus
    Feb 8, 2021 at 5:08
  • 1
    I ended up just going the simple brute force route sudo rm -rf before I saw this comment so I'm not sure whether it would have worked. Thanks anyway!
    – msailor
    Feb 8, 2021 at 12:36
1

In the end, I just ran sudo rm -rf. I suppose I should have tried that earlier but I am skittish about that command!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .