3

if I run:

$ sudo umount /dev/sdb1 

it works just fine. If the label of the storage devide is red, I'm trying to bypass learning where it's mounted by (script called removedrive):

#!/bin/bash

storage=$(pydf | grep $1 | awk '{ print $1 }')
echo $storage
sudo umount "$storage"

Running:

$ removedrive red

Gives me:

/dev/sdb1
umount: /dev/sdb1: no se ha especificado punto de montaje.

I think it's translated as in the title of this question.

So, what I'm doing wrong?

References

  • What's the system's locale? echo $LANG - wiki.archlinux.org/index.php/locale. – slm Jul 6 '18 at 17:02
  • plz, share fstab and pydf results. – msp9011 Jul 6 '18 at 17:06
  • Is it possible you are trying to umount it more than one time? – Rui F Ribeiro Jul 6 '18 at 17:06
  • You do know you can unmount by mounted path too? For example umount /media/red – roaima Jul 6 '18 at 17:48
  • no, i didn't. that's just great! – kurokirasama Jul 6 '18 at 18:13
5

You want to unmount by label. Invoke umount directly instead of writing a script:

sudo umount /dev/disk/by-label/$label

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.