Jump to content

Fixing/Deleting broken Symlinks?


Recommended Posts

I'm using UnRaid 4.5beta8, although this problem happened under beta7.

 

It would appear that I have a corrupted symlink to at least 1 folder.

 

I have a folder on disk1 called backup.  Inside that folder I have symlinks for various user shares (Photos, PC, Work etc.)

 

I can no longer access the symlinks in this backup folder.  I can see the backup folder if I ls -l /mnt/disk1, but if I cd /mnt/disk1/backup and try and list the contents I get nothing, the cursor isn't return to me, it's just stuck there.  This happens whether I telnet in or log directly in on the unraid box.  I also cannot list the contents from my Mac or PC.

 

I'd like to delete/remove the symlinks within backup, but need to be 100% sure I won't be deleting the files/folders they linked to.

 

Can any one tell me the appropriate syntax please?

 

Many thanks,

 

Mark.

Link to comment

Replying to my own topic I discovered that simply deleting the symlinks didn't touch the files stored under them.  I was able to remove them and re-create them, but the problem I'm having seems to re-occur.

 

The Symlinks become inaccessible via Telnet, or when browsing with Windows Explorer(XP) or Finder on my Mac(Snow Leopard).

 

All worked fine in 4.5beta1, but something's messing up for me now.

 

I'm creating the symlink using:-

 

ln -s /mnt/user/backup  /mnt/disk1/data

ln -s /mnt/user/cctv  /mnt/disk1/data

(I have a lot more symlinks, but you get the idea)

 

Previously this would create subfolders of 'cctv' & 'backup' etc under the 'data' folder.  I could then list the user share 'data' to see subfolders & contents in one place.

 

This has been working for me for years, have I been doing anything wrong?

 

I have run reiserfschk on all disks with no errors.

 

Thanks,

 

Mark.

Link to comment

Syminks like this are working for me.

Are you sure your user share is working?

 

root@Atlas /mnt/disk1/data/cdrom_images #cd /mnt/user/cdrom_images/
root@Atlas /mnt/user/cdrom_images #du -hs . 
34G

root@Atlas /mnt/user/cdrom_images #cd /mnt/disk1/data
root@Atlas /mnt/disk1/data #ls -l cdrom_images
lrwxrwxrwx 1 root root 22 Nov 13 19:54 cdrom_images -> /mnt/user/cdrom_images/
root@Atlas /mnt/disk1/data #rm cdrom_images
root@Atlas /mnt/disk1/data #ln -s /mnt/user/cdrom_images /mnt/disk1/data/cdrom_images 
root@Atlas /mnt/disk1/data #ls -l 
lrwxrwxrwx 1 root root 22 Nov 13 19:54 cdrom_images -> /mnt/user/cdrom_images/
root@Atlas /mnt/disk1/data #cd cdrom_images
root@Atlas /mnt/disk1/data/cdrom_images #du -hs .
34G     .

 

Link to comment

Syminks like this are working for me.

Are you sure your user share is working?

 

You are correct, my user shares aren't working correctly.

 

I have the same symptoms connecting to the user shares once this problem occurs.  I'm really not sure what's causing it.

 

I disabled user shares, restarted, re-enabled them, restarted again and re-did the user permissions for each share.  I re-created the symlinks, checking them with the du method in your example and all was fine for a while.  An hour later I tried to watch some backed up CCTV footage and my media player failed to connect to the data folder containing the symlinks.

 

I telnet back in to the server and I can't 'ls -l' the user shares or the folder containing the simlinks, let alone the symlinks themselves.  Note that my symlinks are all to folders, not individual files.

 

Seriously thinking of going back to 4.5beta1, the version I had all this working on, but I'm really trying to get NFS working.

 

Thanks,

 

Mark.

 

Edit: I put can instead of can't  :-[

 

Edit2: I have gone back to 4.5beta1 and the symlink/user share problems have gone.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...