Author Topic: RAID device causes symlinks throughout first level directories  (Read 1703 times)

robwoodward75

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
I have a RAID devise, which is known as "Home-Drive", and Device 29 in LMCE's database.  The issue is, on reboot, it creates sym links within the directory structure to itself.

i.e.

/home/public/data/audio/Home-Drive [29]  -> /home/public/data/audio

This is causing mediatomb database to swell, and create multiple instances of the same songs, pictures, playlists etc. etc. etc.  Also, it seems to slow things right down if you're messing with the media settings, or sorting cover art, I assume this is down to the fact it is then effectively in a never ending spiral of going into the Home-Drive [29] repeatedly.

If I go in and manually remove them all (Which is painstaking!!)  it all works OK, until I reboot and they all re-appear!!

Any help would be greatly appreciated!!

I'm on Version: 2.0.0.44.09112522510

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2926
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: RAID device causes symlinks throughout first level directories
« Reply #1 on: May 03, 2011, 11:48:04 am »
The version you are reporting is probably the version see in web admin, isn't it? That's your original version that you have installed LinuxMCE with.

When was the last time you ran

apt-get update ; apt-get upgrade

robwoodward75

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: RAID device causes symlinks throughout first level directories
« Reply #2 on: May 03, 2011, 12:26:52 pm »
Hi posde,

I last ran them yesterday, and I do have another post regarding issues with failing repo's (topic: 11650)  Yes, it was the version number off the Web-Admin page, I'll have to look on my laptop when I get home as to which snapshot it was, but it was quite a recent one, I only built the server at the end of April, although I know things move at a pace!!

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2926
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: RAID device causes symlinks throughout first level directories
« Reply #3 on: May 03, 2011, 03:37:45 pm »
Your version indicates a very old snapshot (25th of November 2009).

robwoodward75

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: RAID device causes symlinks throughout first level directories
« Reply #4 on: May 03, 2011, 03:46:47 pm »
Strange, I downloaded it towards the end of April to build the server?!  Is there a safe upgrade path to the latest snapshot, or should the repositories do the rest?  I don't want to loose my RAID array, it took ages to set up!!  I will look at the image name of the DVD when I get home and post it.

robwoodward75

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: RAID device causes symlinks throughout first level directories
« Reply #5 on: May 04, 2011, 09:31:46 am »
Hi posde,

The snapshot iso I downloaded is named as follows:

LinuxMCE-8.10-23864-i386.iso

If this is as old as November, is there a safe update / upgrade path?

Thanks.

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2926
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: RAID device causes symlinks throughout first level directories
« Reply #6 on: May 04, 2011, 10:54:11 am »
Your version string indicates a much older snapshot. Strange. apt-get update ; apt-get upgrade is the easiest way to update the system. But it seems as if your sources list is screwed and from a time, where intrepid still was supported by Ubuntu. There is a sticky in the forum about what to change in your sources.list - try that, and see what happens with the apt-get update and upgrade after that.

robwoodward75

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: RAID device causes symlinks throughout first level directories
« Reply #7 on: May 04, 2011, 01:15:41 pm »
Hi posde,

That has indeed fixed the failing repo's, and I have now rebooted, following which, all the symbolic links have returned!!

I have run: find . -type l -print | grep Home-Drive

and get the following result:
./user_1/data/audio/Home-Drive [29]
./user_1/data/videos/Home-Drive [29]
./user_1/data/pictures/Home-Drive [29]
./user_1/data/pvr/Home-Drive [29]
./user_1/data/games/nes/Home-Drive [29]
./user_1/data/games/a7800p/Home-Drive [29]
./user_1/data/games/famicom/Home-Drive [29]
./user_1/data/games/a5200p/Home-Drive [29]
./user_1/data/games/coleco/Home-Drive [29]
./user_1/data/games/smspal/Home-Drive [29]
./user_1/data/games/sg1000/Home-Drive [29]
./user_1/data/games/a7800/Home-Drive [29]
./user_1/data/games/a5200/Home-Drive [29]
./user_1/data/games/a2600/Home-Drive [29]
./user_1/data/games/intv/Home-Drive [29]
./user_1/data/games/a2600p/Home-Drive [29]
./user_1/data/games/sms/Home-Drive [29]
./user_1/data/games/MAME/Home-Drive [29]
./user_1/data/documents/Home-Drive [29]
./public/data/audio/Home-Drive [29]
./public/data/videos/Home-Drive [29]
./public/data/pictures/Home-Drive [29]
./public/data/pvr/Home-Drive [29]
./public/data/games/nes/Home-Drive [29]
./public/data/games/a7800p/Home-Drive [29]
./public/data/games/famicom/Home-Drive [29]
./public/data/games/a5200p/Home-Drive [29]
./public/data/games/coleco/Home-Drive [29]
./public/data/games/smspal/Home-Drive [29]
./public/data/games/sg1000/Home-Drive [29]
./public/data/games/a7800/Home-Drive [29]
./public/data/games/a5200/Home-Drive [29]
./public/data/games/a2600/Home-Drive [29]
./public/data/games/intv/Home-Drive [29]
./public/data/games/a2600p/Home-Drive [29]
./public/data/games/sms/Home-Drive [29]
./public/data/games/MAME/Home-Drive [29]
./public/data/documents/Home-Drive [29]
./user_4/data/audio/Home-Drive [29]
./user_4/data/videos/Home-Drive [29]
./user_4/data/pictures/Home-Drive [29]
./user_4/data/pvr/Home-Drive [29]
./user_4/data/games/nes/Home-Drive [29]
./user_4/data/games/a7800p/Home-Drive [29]
./user_4/data/games/famicom/Home-Drive [29]
./user_4/data/games/a5200p/Home-Drive [29]
./user_4/data/games/coleco/Home-Drive [29]
./user_4/data/games/smspal/Home-Drive [29]
./user_4/data/games/sg1000/Home-Drive [29]
./user_4/data/games/a7800/Home-Drive [29]
./user_4/data/games/a5200/Home-Drive [29]
./user_4/data/games/a2600/Home-Drive [29]
./user_4/data/games/intv/Home-Drive [29]
./user_4/data/games/a2600p/Home-Drive [29]
./user_4/data/games/sms/Home-Drive [29]
./user_4/data/games/MAME/Home-Drive [29]
./user_4/data/documents/Home-Drive [29]
./user_5/data/audio/Home-Drive [29]
./user_5/data/videos/Home-Drive [29]
./user_5/data/pictures/Home-Drive [29]
./user_5/data/pvr/Home-Drive [29]
./user_5/data/games/nes/Home-Drive [29]
./user_5/data/games/a7800p/Home-Drive [29]
./user_5/data/games/famicom/Home-Drive [29]
./user_5/data/games/a5200p/Home-Drive [29]
./user_5/data/games/coleco/Home-Drive [29]
./user_5/data/games/smspal/Home-Drive [29]
./user_5/data/games/sg1000/Home-Drive [29]
./user_5/data/games/a7800/Home-Drive [29]
./user_5/data/games/a5200/Home-Drive [29]
./user_5/data/games/a2600/Home-Drive [29]
./user_5/data/games/intv/Home-Drive [29]
./user_5/data/games/a2600p/Home-Drive [29]
./user_5/data/games/sms/Home-Drive [29]
./user_5/data/games/MAME/Home-Drive [29]
./user_5/data/documents/Home-Drive [29]
./user_3/data/audio/Home-Drive [29]
./user_3/data/videos/Home-Drive [29]
./user_3/data/pictures/Home-Drive [29]
./user_3/data/pvr/Home-Drive [29]
./user_3/data/games/nes/Home-Drive [29]
./user_3/data/games/a7800p/Home-Drive [29]
./user_3/data/games/famicom/Home-Drive [29]
./user_3/data/games/a5200p/Home-Drive [29]
./user_3/data/games/coleco/Home-Drive [29]
./user_3/data/games/smspal/Home-Drive [29]
./user_3/data/games/sg1000/Home-Drive [29]
./user_3/data/games/a7800/Home-Drive [29]
./user_3/data/games/a5200/Home-Drive [29]
./user_3/data/games/a2600/Home-Drive [29]
./user_3/data/games/intv/Home-Drive [29]
./user_3/data/games/a2600p/Home-Drive [29]
./user_3/data/games/sms/Home-Drive [29]
./user_3/data/games/MAME/Home-Drive [29]
./user_3/data/documents/Home-Drive [29]


I had previously deleted them all before the reboot!!

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2926
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: RAID device causes symlinks throughout first level directories
« Reply #8 on: May 04, 2011, 04:16:59 pm »
Those symlinks look correct, IF you have a device 29 which is a disk drive. It will be mounted in /mnt/device/29, and those symlinks will be created under /home


robwoodward75

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: RAID device causes symlinks throughout first level directories
« Reply #9 on: May 04, 2011, 04:32:19 pm »
Yes, I have a RAID Array called Home-Drive, which is device number 29, and is mounted over /home.  But.......  It causes mediatomb to repeat entries, as the sym links point back to themselves!!  so, any song's / pictures / videos etc the media updater script finds, are listed several times over as it recursively searches into the directory that effectively points back to its parent.

i.e.

./user_1/data/audio/Home-Drive [29] -> ./user_1/data/audio/
in which there is a sym link Home-Drive [29] which points to.............  And so it goes on, my media database had 10's of thousands of entries in, mostly looking a little like:
./user_1/data/audio/Home-Drive [29]/Home-Drive [29]/Home-Drive [29]/Home-Drive [29]/Home-Drive [29]/Home-Drive [29] etc etc etc.

I was hoping to just be able to set the /home/public/data area as mediatomb's imported directory, but I'm beginning to wonder if I should just add each sub level individually, after the Home-Drive [29] entry, so as not to get this issue, but I assumed there would be a setting somewhere to hide this sym link, or, not to create it that I was missing.

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2926
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: RAID device causes symlinks throughout first level directories
« Reply #10 on: May 04, 2011, 04:54:32 pm »
please post your fstab and your mtab

robwoodward75

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: RAID device causes symlinks throughout first level directories
« Reply #11 on: May 04, 2011, 05:04:47 pm »
fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda1
UUID=bd38fcab-751b-455f-b4cd-6692eb9a740c /               ext2    relatime,errors=remount-ro,user_xattr 0       1     
# /dev/sdb1
#UUID=2e5899ab-d280-4356-84db-21fb3188885c /home           ext3    relatime,user_xattr 0       2     
# /dev/sda5
UUID=b21dd223-283f-4dcd-b90d-32fd1f5550ae none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
/dev/md1   /home   ext3   relatime,user_xattr 0       2

#NFS share
/home   /export/home   none   bind   0   0


mtab:

rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,mode=755 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
/dev/disk/by-uuid/bd38fcab-751b-455f-b4cd-6692eb9a740c / ext2 rw,relatime,errors=remount-ro,user_xattr 0 0
/dev/disk/by-uuid/bd38fcab-751b-455f-b4cd-6692eb9a740c /dev/.static/dev ext2 ro,errors=remount-ro,user_xattr 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=755 0 0
varrun /var/run tmpfs rw,nosuid,mode=755 0 0
varlock /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /lib/modules/2.6.27-17-generic/volatile tmpfs rw,mode=755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,gid=5,mode=620 0 0
/dev/md1 /home ext3 rw,relatime,errors=continue,user_xattr,data=ordered 0 0
/dev/md1 /export/home ext3 rw,relatime,errors=continue,user_xattr,data=ordered 0 0
securityfs /sys/kernel/security securityfs rw 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
automount(pid10703) /mnt/device autofs rw,fd=4,pgrp=10703,timeout=30,minproto=2,maxproto=4,indirect 0 0
djmount /mnt/upnp fuse.djmount ro,nosuid,nodev,user_id=0,group_id=0,default_permissions,allow_other 0 0

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5495
  • DOES work for LinuxMCE.
    • View Profile
Re: RAID device causes symlinks throughout first level directories
« Reply #12 on: May 11, 2011, 06:07:30 pm »
Did you add the md1 to your fstab manually? If so, that's a big no no.

-Thom

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2926
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: RAID device causes symlinks throughout first level directories
« Reply #13 on: May 11, 2011, 06:26:00 pm »
That's why I asked for those two files :)

robwoodward75

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: RAID device causes symlinks throughout first level directories
« Reply #14 on: May 11, 2011, 06:27:11 pm »
Hi tschak909, posde ,

In short, yep!!  And, I've kind of figured that now!!


basically I started with 1 x 40GB HDD for System and 4 X 2TB HDD for data and did the following:

  • Loaded MCE up using the system disk and 1 X 2TB as mounted on /home
  • Used the MCE web admin to stitch the 3 X 2TB drives into a RAID array.
  • Rebooted in single user mode, edited fstab to use md1
  • Copied the data lock stock and barrel from the single drive to the RAID array.
  • Hashed out the reference to the single drive.
  • Added a mdadm custom start routine to the init.
  • Rebooted and grew the array by the remaining single drive.



I guess from this, there are 2 questions remaining for me!

1.  How much does knowledge of other distro's (Despite that distro being Kubuntu which I've used for years!), and little knowledge of MCE cause!!!
2.  How badly have I f*cked up, and can I retrieve the situation without un-stitching the whole thing!!


Cheers,

Rob.