Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Fileserver-Unmount drive in use via Samba

    Hi all,

    I hope this fits in as a "Servers" topic.

    I have an external drive (in one of those Thermaltake SATA Docks) connected to a headless Samba file server. The files on the drive are a backup from the night before - a self-serve recovery option if someone does something stupid. I want to create a script that a non computer savvy person will be able to run, to un-mount the drive safely, so that they can replace it with another disk. Then in the middle of the night, if the device labeled "backup" is present, a cron job will mount the new drive and start a script that runs the backup, then will leave the drive mounted for the rest of the next day.

    When I have the shared volume in question mounted from another computer when I attempt to un-mount the external hard drive, I get an error message because it is in use by someone over Samba.

    Does anyone know how to go about un-mounting the drive safely without stopping Samba? I'm not worried about booting users off the "backup" volume, since the share is read only, but I don't want to boot them off the other Samba shares.

    # umount /mnt/backup
    umount: /mnt/backup: device is busy.
            (In some cases useful info about processes that use
             the device is found by lsof(8) or fuser(1))
    I'm open to criticism of my backup plan too. But I know it's a poor-man's solution, so go easy! I'm not going for an enterprise solution here, just an inexpensive way to improve our current situation - which is no backup. And it has to be EASY otherwise no one will do it! I'm backing up about 1.5TB of multimedia data for a Record Company that I work for.

    Thanks, much obliged!!

  2. #2
    Just Joined!
    Join Date
    Feb 2011

    this is quite easy...

    1) U have to use umount -l /mnt/backup
    2) U can write web-script(simple web site) and U can call there umount -l option with simple button/link

    Easiest can't be


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts