Greyhole and Symbolic Links

maylene
Posts: 2
Joined: Fri May 28, 2010 6:17 pm

Greyhole and Symbolic Links

Postby maylene » Fri May 28, 2010 6:50 pm

I setup my data to move to the storage pool according to the detailed walkthrough at the bottom of the Greyhole wiki. The last few steps were:
6. Monitor /var/log/greyhole.log to see what's the fsck operation is done.
Once fsck is done, your data has now been moved into the Greyhole storage pool (in the drives you selected in Shares > Storage Pool). All that should be left in the previous location of your data (/media/External Drive/Moviesfrom the previous example) should be symbolic links pointing to the new file copies.
7. Move all those symlinks from there into the correct folders in /var/hda/files/share_name
8. Back in the Amahi dashboard, edit the path of the shares once again, and put back /var/hda/files/share_name(i.e. the folders where you moved the symbolic links).
Step 6 mentions that symbolic links will be left in the old data location(s), but I haven't found any symlinks there yet. Do I need to wait until all of the data is moved out of the old locations before seeing those symlinks? It's been about a week since setup, but there is a lot of data to move (~600G), so perhaps I'm just being impatient. When they finally appear, what do they look like?

Thanks in advance and my apologies for such a newbie question.

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole and Symbolic Links

Postby gboudreau » Wed Jun 02, 2010 6:10 am

Step 6 mentions that symbolic links will be left in the old data location(s), but I haven't found any symlinks there yet. [...] When they finally appear, what do they look like?
Where / how did you look to see if they became symlinks?
You should either use the HDA desktop directly (or using VNC), or using SSH to connect to your HDA, then:

Code: Select all

ls -l /old_files_directory/somewhere/where/there/are/files
For example, here's what my Videos share looks like:

Code: Select all

[gb@hda ~]$ ls -l /mnt/hdd0/shares/Videos/ total 68 drwxrws--- 7 gb users 4096 2010-04-26 06:40 Home Movies drwxrws--- 6 gb users 20480 2010-05-19 10:39 Movies drwxrws--- 3 gb users 20480 2010-05-19 02:08 Movies Archive drwxrws--- 14 gb users 4096 2010-05-20 23:32 Sevan drwxrws--- 3 gb users 4096 2010-05-08 11:37 Soline drwxrws--- 38 gb users 4096 2010-05-31 19:31 TV Shows drwxrws--- 2 gb users 4096 2009-12-07 08:59 TV Shows Archive drwxrws--- 5 gb users 4096 2010-04-28 02:40 XBMC Backdrops 1080p JPEG drwxrws--- 6 gb users 4096 2010-04-08 18:54 XBMC Backdrops 720p BMP
Above, only directories are listed, so there are no visible symlinks.
I need to "ls -l" a directory that has some files in it:

Code: Select all

[gb@hda ~]$ ls -l "/mnt/hdd0/shares/Videos/Home Movies/" total 24 drwxrwsr-x 2 gb users 4096 2010-04-24 19:00 Amahi drwxrwsr-x 6 gb users 4096 2010-05-06 10:46 Famille Fortier lrwxrwxrwx 1 root users 43 2010-03-13 09:39 Mariage.aif -> /mnt/hdd2/gh/Videos/Home Movies/Mariage.aif lrwxrwxrwx 1 root users 43 2010-02-27 07:18 Mariage.iso -> /mnt/hdd0/gh/Videos/Home Movies/Mariage.iso lrwxrwxrwx 1 root users 43 2010-03-25 20:24 Mariage.m2v -> /mnt/hdd0/gh/Videos/Home Movies/Mariage.m2v drwxrws--- 2 gb users 4096 2010-04-27 10:30 Quatuor Renaissance - KatrinAid drwxrwsr-x 2 gb users 4096 2010-04-15 17:00 Sevan et le iPad drwxrwsr-x 2 gb users 4096 2010-04-26 10:25 Simfonia lrwxrwxrwx 1 gb users 62 2010-02-11 08:40 Voyage Liban 2006 - Videos.img -> /mnt/hdd0/gh/Videos/Home Movies/Voyage Liban 2006 - Videos.img
Above, the files listed with an arrow are symlinks.
Some of them are stored on my hdd0 hard drive, others on my hdd2, both of which are part of my storage pool.
Do I need to wait until all of the data is moved out of the old locations before seeing those symlinks? It's been about a week since setup, but there is a lot of data to move (~600G), so perhaps I'm just being impatient.
Symlinks will appear in the old location as soon as some files are moved. But you need to wait until they are all moved before you continue with step 7.
It shouldn't take more than a day at most to move everything. I'm guessing you should be done by now.

You can look in /var/log/greyhole.log for errors:

Code: Select all

tail -f /var/log/greyhole.log
Or look for the last fsck that ran:

Code: Select all

zgrep fsck /var/log/greyhole.log* | tail
You should see something like this:

Code: Select all

Jun 2 03:27:47 6 fsck: fsck for All shares completed.
Come to http://talk.amahi.org and ask for Mouton if you need further help.

Cheers.
- Guillaume Boudreau

maylene
Posts: 2
Joined: Fri May 28, 2010 6:17 pm

Re: Greyhole and Symbolic Links

Postby maylene » Fri Jun 04, 2010 7:08 pm

Thanks, gboudreau. I followed your advice, but when I looked in the old directory(ies), there are definitely no symlinks-- just blank. I'm speculating this is because the originals were on an attached drive (/media/drivename/). The fsck did claim all shares were completed but also returned some errors. Terminal hung when I tried "tail -f /var/log/greyhole.log".

I'll see if I can just create the symlinks myself since I know where the new file locations are. If all else fails (and I haven't given up in frustration), I'll certainly ask for more help at talk.amahi.org.

Thanks again!

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole and Symbolic Links

Postby gboudreau » Fri Jun 04, 2010 8:20 pm

[...] when I looked in the old directory(ies), there are definitely no symlinks-- just blank. I'm speculating this is because the originals were on an attached drive (/media/drivename/). The fsck did claim all shares were completed but also returned some errors.
I think I know why. Would the original drive be formatted in FAT or NTFS format by any chance (Windows formats for drives)?
If so, Linux can't create symlinks on such drives, thus why the data was moved to the Greyhole storage pool, but symlinks couldn't be created, so you're left with empty directories.

To resolve this, fsck needs to run while your shares are on an ext3/4 partition. So just continue with the tutorial as-is. i.e. for step 8, copy all the empty directories into /var/hda/files/* then do step 9. And either wait for fsck to run by itself at midnight, or run it manually:

Code: Select all

greyhole --fsck
Note that I modified the tutorial to explain the above situation, so what I said above should all be there too now.
Terminal hung when I tried "tail -f /var/log/greyhole.log".
That would indicate Greyhole isn't currently running. That command should show at least one line every 10 seconds.

Do the above command in a terminal, then open a new tab, and execute the following command, as root:

Code: Select all

service greyhole restart
One of the two terminal tabs should tell you why Greyhole can't run.
- Guillaume Boudreau

Who is online

Users browsing this forum: No registered users and 25 guests