Can't umount HDD on NextcloudPi


I am trying to configure a second harddrive as a backup drive. In order to do that I need to disconnect my data drive first. I don’t want to simply unplug it as it can be seen in various tutorials, so I tried umount /dev/sda1 via SSH with no luck: Error finding object for block device 0:41

Here is the output of lsblk:

pi@nextcloudpi:~ $ lsblk
sda           8:0    0  4.6T  0 disk 
`-sda1        8:1    0  4.6T  0 part /media/myCloudDrive
mmcblk0     179:0    0 59.5G  0 disk 
|-mmcblk0p1 179:1    0  256M  0 part /boot
`-mmcblk0p2 179:2    0 59.2G  0 part /

Did I do anything wrong regarding syntax? If I try umount /dev/sda I get the following message:
umount: /dev/sda: not mounted.
I guess umount only unmounts partitions and not drives, right?

NextCloudPi v1.43.5
NextCloud version

Might be wrong, but… do you have enough external power for multiple disks? Just making sure you have a powered USB hub or both disks have their own isolated power.

Power issues can be a problem if the power supply for the Pi is also being used for the disks. :+1:

1 Like

Thanks for taking it into account. Yes, I just got a powered USB hub which works fine. I remember having the same problem without the hub, anyway.

1 Like

If you want to unmount sda, don’t you need to unmount /media/myCloudDrive?

your lsblk tells me that /dev/sda1 is mounted to /media/myCloudDrive

1 Like

I tried that, but unfortunately get this error message:

Error finding object for block device 0:41

no worries…

Just put NCP in Maintenance mode and unplug… :grin: That way, you can be sure nothing is being written to it while you pull the plug.

1 Like

Thanks, that is so much easier! Very much appreciated.

You need to sudo umount /dev/sda1. If that doesn’t work you should power off the device, rather than unplugging even if you are on maintenance mode

1 Like

Thanks @nachoparker, I get the same error message when I try sda1: Error finding object for block device 0:41
Any idea why I am not able to unmount the drive? I did remove it in maintenance mode now anyway… Fingers crossed that it went without harm to any files. Next time I am going to shut down first.