2024-10-17, 08:49 AM
you probably get the "device busy" error messages, because the directories are mounted. You can't mount them again or delete them, when they're mounted.
to check if the local directory already is mounted:
If this returns nothing, then the directory is not mounted. But if this shows something like:
then it's already mounted. If you want to delete that directory, you first have to unmount it:
After that the rmdir should work.
Some more troubleshooting:
If this is your first line in fstab "<file system> <mount point> <type> <options> <dump> <pass>" then this will generate the error message "mount: /etc/fstab: parse error at line 1 -- ignored" you get. Delete this first line in fstab.
the commands to add to the LXC config have some errors:
{ echo 'mp0: /mnt/truenas/Movies/,mp=/mnt/Truenas' ; } | tee -a /etc/pve/lxc/104.conf
{ echo 'mp1: /mnt/truenas/Music/,mp=/mnt/truenas' ; } | tee -a /etc/pve/lxc/LXC_ID.conf
{ echo 'mp2: /mnt/truenas/Shows/,mp=/mnt/truenas' ; } | tee -a /etc/pve/lxc/LXC_ID.conf
you can't use the same mp= for all three mountpoints
first mp=/mnt/Truenas should be /mnt/truenas (lower case t in truenas)
2nd and third tee targets should be /etc/pve/lxc/104.conf and not /etc/pve/lxc/LXC_ID.conf
to check if the local directory already is mounted:
Code:
mount | grep /mnt/truenas/Shows
If this returns nothing, then the directory is not mounted. But if this shows something like:
Code:
//192.168.1.124/Shows/ on /mnt/truenas/Shows type cifs (rw,...........
then it's already mounted. If you want to delete that directory, you first have to unmount it:
Code:
umount /mnt/truenas/Shows
After that the rmdir should work.
Some more troubleshooting:
If this is your first line in fstab "<file system> <mount point> <type> <options> <dump> <pass>" then this will generate the error message "mount: /etc/fstab: parse error at line 1 -- ignored" you get. Delete this first line in fstab.
the commands to add to the LXC config have some errors:
{ echo 'mp0: /mnt/truenas/Movies/,mp=/mnt/Truenas' ; } | tee -a /etc/pve/lxc/104.conf
{ echo 'mp1: /mnt/truenas/Music/,mp=/mnt/truenas' ; } | tee -a /etc/pve/lxc/LXC_ID.conf
{ echo 'mp2: /mnt/truenas/Shows/,mp=/mnt/truenas' ; } | tee -a /etc/pve/lxc/LXC_ID.conf
you can't use the same mp= for all three mountpoints
first mp=/mnt/Truenas should be /mnt/truenas (lower case t in truenas)
2nd and third tee targets should be /etc/pve/lxc/104.conf and not /etc/pve/lxc/LXC_ID.conf