Why is AppleScript not ejecting my volume?
I had the same issue. The Finder command eject seems to be unable to eject volumes although according to what I found on the internet it worked in times from 10.4 to 10.6.

The following script works. I have saved is as an Application in the Script Editor and have added it as a start object. Works well in my case.

tell application "Finder"
    set d to disk "Photos"

    if (exists d) then
        say "Disk exists"
    else
        say "Disk does not exist"
    end if
    if (d is local volume) then
        say "Disk is a local volume"
    else
        say "Disk is not a local volume"
    end if

    if (d is ejectable) then
        say "Disk is ejectable"
    else
        say "Disk is not ejectable"
    end if

    -- This fails because the disk is not ejectable
    eject d
end tell

-- Solution: Use Disk Utility directly
tell application "Terminal"
    do shell script "d=\"/Volumes/Photos\"; if [ -d \"$d\" ]; then diskutil eject $d; fi"
end tell