Any symlinks at BTRFS file system dosen't link to their folders at NTFS file system

Any symlinks at hard-drive with BTRFS file system (linux) open their folders at NTFS file system (when double click), but doesn’t link to their folders when do right click->properties->point to.
image

Symlinks located and linking from BTRFS to BTRFS (inside Linux) run when do click->properties->point to

Your picture says that
The file or folder /home/.... does not exist.

which means that the link points to a location within your /home/$user directory
which is unlikely the point where you have mounted your ntfs drive to
which is why it doesn’t exist

Thanks, but the link points to a location within my /home/$user directory
is the point where I had mounted my ntfs drive to which is exist and opens with this link

If your symlink was pointing to a mountpoint in /run tree the symlink will be invalid after a reboot.

This is not caused by btrfs filesystem but is expected behavior.

To have consistent and valid symlinks across restarts don’t use volatile locations like /run.

Use a dedicated structure outside system folders - never use /mnt, /run or /home for such structure.

2 Likes

Any Linux mount any hard-disk to /run automatically. I didn’t. Where I should mount my hard-discs? Is that correctly to create directory /media/ or /discs/ right in root directory and mount my discs with NTFS fs there?

That is correct - and expected when you mount on the fly - no problem with that.

Correct again - you can control everytning in that manner - and there is nothing wrong with it.

As an experienced sysadmin I can tell - it is the recommended method.

2 Likes

Done! Doesn’t work.
Points to one directory - finds another

Line in fstab:
UUID=70F16E1582224975 /drives/320_tmp ntfs-3g defaults,uid=1000 0 0

But! If make this (right click on link and press “points to” button) not from Desktop but from link right in Dolphin (/home/vorobuszek/Desktop/) - It works, directs to original location.

This points to a problem with dolphin or perhaps to the fact you are using spaces in the names - you must quote the paths in such case

When making a symlink from one one place to another (using spaces in names)

ln -s "/drives/320_tmp/dit/dit dat" "/home/$USER/dit dat"

Check the man page for ln

man ln

No

And what about this?

But! If make this (right click on link and press “points to” button) not from Desktop but from link right in Dolphin (/home/vorobuszek/Desktop/) - It works, directs to original location.

Summary

8

please don’t use screenshots - use text

I cannot say what your issue is - I cannot replicate it.

Please create the symlink using the Konsole terminal emulator.

Open konsole in your home folder (press tab for autocomplete

ln -s /drives/320_tmp/ {TAB}

I have been meaning to test btrfs - so I replicated reinstalled my system with btrfs and my usual setup - and added in a USB formatted disk mounted in my usual structure

$ lsblk -o NAME,MOUNTPOINTS,FSTYPE
NAME        MOUNTPOINTS           FSTYPE
 ....
sdg                               
└─sdg1      /a/ntfs               ntfs
sr0                               
nvme0n1                           
├─nvme0n1p1 /boot/efi             vfat
├─nvme0n1p2 /var/log              btrfs
│           /var/cache            
│           /home                 
│           /                     
└─nvme0n1p3 [SWAP]                swap

I use symlinks as part of my data setup and I have no issues with them on btrfs.


The test symlilnks is not part of the workstation setup neither is the ntfs disk - this has been in an effort to replicate your issue

The first tsest symlink was made using Konsole

ln -s /a/ntfs/\[NOTECONS01\]\ Linux\ USB\ Crash\ Card\ Adapter/ ~/ntfs\ test\ disk

The second test using drag’n’drop with pcmanfm file manager - when asked - I chosed Create Symlink

The third test has been created using dolphin drag’n’drop - when asked - chosed Create Symlink

$ ls -lA
  ....
lrwxrwxrwx 1 fh fh    49 18 sep 08:42 '[NOTECONS01] Linux USB Crash Card Adapter' -> '/a/ntfs/[NOTECONS01] Linux USB Crash Card Adapter'
lrwxrwxrwx 1 fh fh    49 18 sep 08:46 '[NOTECONS01] Linux USB Crash Card Adapter (created using dolphin)' -> '/a/ntfs/[NOTECONS01] Linux USB Crash Card Adapter'
lrwxrwxrwx 1 fh fh    50 18 sep 08:22 'ntfs test disk' -> '/a/ntfs/[NOTECONS01] Linux USB Crash Card Adapter/'
 ....

Done!
The file or folder /home/vorobuszek/Desktop/drives/320_tmp/_BIN/Proko Figure drawing fundamentals does not exist.

I cant understad. Drive mounted to /drives/320_tmp/
Why link refers to /home/vorobuszek/Desktop/drives/320_tmp/ ?

I don’t know - remove it and recreate it - perhaps you have some filesystem maintenance due?

I don’t know - remove it and recreate it

doesn’t help

perhaps you have some filesystem maintenance due?

Don’t know how to do it yet, unfortunately

This reference has no underscores yet in a previous comment you are using underscores Proko_Figure_drawing_fundamentals

Spelling and casing is very important on a case sensitive system - the same goes for filenames with spaces - either escape the spaces like name\ with\ spaces or quote the name like “name with spaces”

btrfs requires regular maintenance - I’d recommend the package btrfs-assistant (custom AUR build)

doesn’t help anything you say. Even simple file named “1” causes the same problem. No problems if link locate to any file/directory from root btrfs drive

So how come I cannot replicate your situation?

The fact that the issue cannot be replicated, point back to your system and a local condition created by yourself.

The following is a simple test - where does it fail?

Create a folder named test in the root of your ntfs device.

mkdir /drives/320_tmp/test

Create a file

echo test > /drives/320_tmp/test/test.txt

Create a symlink in your home to the test folder

ln -s /drives/320_tmp/test /home/$USER/test

list the content of the symlinked test folder

$ ls /home/$USER/test
test.txt

list the content of the test file in the symlinked folder

$ cat /home/$USER/test/test.txt
test
    /drives/320_tmp  sudo ln -s /drives/320_tmp/test /home/vorobuszek/test                                                                          ✔ 
[sudo] password for vorobuszek: 
    /drives/320_tmp  sudo ls /home/vorobuszek/test                                                                                           ✔  4s  
test.txt
    /drives/320_tmp  cat /home/vorobuszek/test/test.txt                                                                                             ✔ 
 test

So how come I cannot replicate your situation?

If I knew I did’n post. Thank anyway. Yesterday I found out about right hard-drives mounting

Good to see - the test worked as expected

Why do you use sudo?

That is not needed for creating symlink in your home - or anything else in your home.

Indiscrimate use of sudo leads to weird errors - e.g. symlinks pointing to nonexisting folders.

    /drives/320_tmp  ln -s /drives/320_tmp/test /home/vorobuszek/test                                                                               ✔ 
    /drives/320_tmp  ls /home/vorobuszek/test                                                                                                       ✔ 
test.txt
    /drives/320_tmp  cat /home/vorobuszek/test/test.txt                                                                                             ✔ 
 test
    /drives/320_tmp 

I created my problematic desktop link by my mouse and context meny->make link - at the first time, before your tips