How to delete leftover backup folder after urbackup server uninstallaton

Hi,

After uninstalling backup server from my OpenMediaVault, I am not able to remove my /media/BACKUP/urBackup folder. While deleting the files I am getting error ‘read-only file system’ error.

Here is the context of the problem.
I installed urBackup to my OpenMediaVault, which is running on Odroid-HC2 single board computer. After installing the urBackup and adding my client, I took 2-3 backup. After realizing that the backup is going to /media/BACKUP/urBackup folder. As my OpenMediaVault is running from Micro SD Card and I don’t want to full it with backup. I change the default backup location to my 1TB drive. Location changed successfully and I my backup was going to the new location.
Now I am trying to delete the old backups in /media/BACUP/urBackup. which I am not able to delete due to ‘Read-Only’ file system error. I uninstalled urBackup and restart the system multiple times.

Thanks

server still has file lock on folder, or manually change permissions for that (I’m assuming 'nix file system) folder and take ownership for full access

Thank for the reply.
I am using urbackup on OpenMediaVault installed on Odroid-H2 single board computer. OpenMediaVault is based on Debian 9. Whatever command I am using to change ownership or permission, I am getting only a error message ‘read-only file system’ from each file.
Let me know if you need any other information on this.

Standard linux…never used OMV so can’t give direct experience.

If in doubt with Linux get ssh login, and chown and chmod to get access.

Warning: This may be some function of OMV protecting certain items as well so you should followup with them.

I am using ssh login to run the chmod/chown command. I tried by restarting multiple time but not luck :frowning:

Can anybody help me on this?

Seeing it’s under /media is this a separate drive? If so, have you looked at the output of mount is it mounted read only? If it is you’ll have to mount it rw to do anything with the content.

below is the output of the mount command:

==========================================
root@odroidxu4:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=952824k,nr_inodes=187132,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=204488k,mode=755)
/dev/mmcblk1p2 on / type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=38,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/mmcblk1p1 on /boot type ext4 (rw,relatime,errors=remount-ro,commit=600,data=ordered)
/dev/mmcblk1p2 on /var/folder2ram/var/log type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/var/log)
folder2ram on /var/log type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk1p2 on /var/folder2ram/var/tmp type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/var/tmp)
folder2ram on /var/tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk1p2 on /var/folder2ram/var/lib/openmediavault/rrd type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/var/lib/openmediavault/rrd)
folder2ram on /var/lib/openmediavault/rrd type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk1p2 on /var/folder2ram/var/spool type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/var/spool)
folder2ram on /var/spool type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk1p2 on /var/folder2ram/var/lib/rrdcached type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/var/lib/rrdcached)
folder2ram on /var/lib/rrdcached type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk1p2 on /var/folder2ram/var/lib/monit type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/var/lib/monit)
folder2ram on /var/lib/monit type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk1p2 on /var/folder2ram/var/lib/php type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/var/lib/php)
folder2ram on /var/lib/php type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk1p2 on /var/folder2ram/var/lib/netatalk/CNID type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/var/lib/netatalk/CNID)
folder2ram on /var/lib/netatalk/CNID type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk1p2 on /var/folder2ram/var/cache/samba type btrfs (rw,noatime,nodiratime,compress=lzo,ssd,space_cache,commit=600,subvolid=5,subvol=/var/cache/samba)
folder2ram on /var/cache/samba type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/mapper/sda-crypt on /srv/dev-disk-by-label-NAS type ext4 (rw,relatime,data=ordered,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=204484k,mode=700)
=============================================

There is nothing related to /media.

I will add the context of the problem in my original post.

Regards
Ramesh Chandra

I’m having the same issue. I’ve installed urbackup in docker container on Synology NAS. I’ve tried everything from umount to see if it was mount with no success and even changed the permissions or at least I tried to and it still no go. I had found some where someone had created a nuke.sh, but even that didn’t work

#!/bin/sh
set -e

dir="$1"

if [ -z “$dir” ]; then
{
echo ‘This script is for destroying old /var/lib/docker directories more safely than’
echo ’ “rm -rf”, which can cause data loss or other serious issues.’
echo
echo “usage: $0 directory”
echo " ie: $0 /var/lib/docker"
} >&2
exit 1
fi

if [ “$(id -u)” != 0 ]; then
echo >&2 “error: $0 must be run as root”
exit 1
fi

if [ ! -d “$dir” ]; then
echo >&2 “error: $dir is not a directory”
exit 1
fi

dir="$(readlink -f “$dir”)"

echo
echo “Nuking $dir …”
echo ’ (if this is wrong, press Ctrl+C NOW!)’
echo

( set -x; sleep 10 )
echo

dir_in_dir() {
inner="$1"
outer="$2"
[ “${inner#$outer}” != “$inner” ]
}

let’s start by unmounting any submounts in $dir

(like -v /home:… for example - DON’T DELETE MY HOME DIRECTORY BRU!)

for mount in $(awk ‘{ print $5 }’ /proc/self/mountinfo); do
mount="$(readlink -f “$mount” || true)"
if dir_in_dir “$mount” “$dir”; then
( set -x; umount -f “$mount” )
fi
done

now, let’s go destroy individual btrfs subvolumes, if any exist

if command -v btrfs > /dev/null 2>&1; then
root="$(df “$dir” | awk ‘NR>1 { print $NF }’)"
root="${root#/}" # if root is “/”, we want it to become “”
for subvol in $(btrfs subvolume list -o “$root/” 2>/dev/null | awk -F’ path ’ ‘{ print $2 }’ | sort -r); do
subvolDir="$root/$subvol"
if dir_in_dir “$subvolDir” “$dir”; then
( set -x; btrfs subvolume delete “$subvolDir” )
fi
done
fi

finally, DESTROY ALL THINGS

( set -x; rm -rf “$dir” )