Hi,
I have an md RAID device for /, and another for /home. When LMCE starts, it puts a sym link to the / and /home devices into /home/public/data/others, then UpdateMedia goes into an endless loop going up and down the directory tree as it tries to scan for files. That is, you go down to /home/public/data/others/md4_SYMLINK which is a sym link back to the device that is mounted as /home, then you go down again to what is now
/home/public/data/others/md4_SYMLINK/public/data/others/md4_SYMLINK then does it again again
/home/public/data/others/md4_SYMLINK/public/data/others/md4_SYMLINK/public/data/others/md4_SYMLINK
I've changed the actual Symlink name to make this more readable.
I have looked at 3 places where this could be fixed:
1) StorageDevices_Symlinks.sh which takes all of the disk devices and creates the symlinks. What I'd do here is check before making a symlink that it does not point further towards / . In other words, if the link is being put in /home/public/data/others, then the link should not point to a disk/raid device that is also mounted at a higher point in the same path. That is, no link should point to devices that are mounted on /, /home, /home/public, /home/public/data, or /home/public/data/others or an infinite loop will result.
2) in checkforRaids.sh where the system checks for RAID storage, knock out any devices associated with a RAID device that is already mounted
3) Change UpdateMedia so that it recognises when it starts to recurse and jumps out. WOuld not have to be perfect, could keep last say 255 devices that it scanned in this scan, and check that a directory transition does not take us to a device where we've been before. If it is a new device just add it to the list.
Which should I do? I am leaning to #1, as it means RAID devices ares still discovered, but UpdateMedia can cope as it doesn't have to transit infinite loops. Is there any other use for the symlinks apart from UpdateMedia?
Cheers,
Indulis