what is the best way to acces the shares from Windows?

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

Re: what is the best way to acces the shares from Windows?

Postby gboudreau » Thu Aug 04, 2011 8:18 pm

I want to know this, because I uploaded some photos today. for some reason they were suddenly made into symlinks and therefor unreachable for my window machines.

I uploaded them in
\\hda\pictures\ (on Amahi in /var/hda/files/pictures)

but they were only symlinks in there and the got to /var/hda/files/gh/pictures???

how did the /gh/ get in there?
As bigfoot65 pointed out, this is how Greyhole works.
It moves the actual files into the storage pool directories (drives) that you selected in the Storage Pool configuration page, then it just leaves a symlink behind, pointing to one of the file copies.
This is true for all shares for which you enabled Greyhole, which I'm guessing would be all, or almost all, your shares.
this morning I started the systems and clients and the files were again changed into symlinks in the /var/hda/files/gh/pictures folder (not visible for the windows clients) and moved back to /var/hda/files/gh/pictures folder.
This happened because Greyhole includes a nightly job that will check all your Greyhole-enabled shares whenever the configuration changed in the previous 24h.
Thus, you manually copying real files into the shared folder got 'fixed' by Greyhole when it checked for inconsistencies.
those files seem to change overnight into symlinks. The next morning when I look at the shares...I do see the folders, but dont see the files anymore in there. they seem to have disappeared. when I then check on the amahi server through VNC I see the files have changed into symlinks and are linked to the /var/hda/files/gh/xxx folders...
Files being replaced by symlinks is normal, but not seeing those as regular files when accessing the shares remotely is not.
The only files that are causing me trouble are the the ones where I connected a USB drive FAT formatted to the amahi system and using the Amahi desktop (logged in via VNC) I copied the files from the USB device to the /var/hda/files/pictures folder.
Indeed, this is generally a bad idea(tm). First, because Greyhole will not see those files (right away). But the nightly job will see them, if it runs, and if worst comes to worst, the weekly check will see them, and handle them as if they were copied from a remote share.
The problem is permissions: when Greyhole work on files you have in your shared folders, it replicates the ownership and permissions of those files & folders for all copies it creates. So if you copy files into your shared folders, and leave them with innapropriate owners or permissions, when you'll try to access them remotely later, those permissions might not allow you to access those same files, because Samba will see symlinks pointing to files you don't have access to as broken, and won't present them on a remote share.
And that permission problem might still exist now, even after you removed the shared folder, and re-created it, because the permission problem might be at the root level of the storage pool directory (inside the gh folder). If you still have missing files after Greyhole is done working on your files, a simple chown/chmod of the gh folder should fix it.
I have added the last 100 lines of the current logfile of greyhole....maybe that helps?
Reading some of it, I see something that isn't that cool.
You seem to be using some sort of funky app to make the copy. That app first creates the files into a share/_SYNCAPP/temp/ folder, then renames that file into the proper folder with the proper filename.
This basically creates 2 tasks for Greyhole to work on: one write, and one rename. Plus, Greyhole, working on those files later, will need to understand that the original write task used a temporary path and filename, and that it should in fact work with the new filename instead. All this logic isn't that light, and so, Greyhole handling all the files you copied will be much slower than it would be if you copied the files 'normally' (using Windows Explorer or something that just writes the files directly).
Anyway, I'm just saying that Greyhole will take time to handle all your files. It should still work, just slower than normal.
can this thread be moved into the greyhole department?
Done.
- Guillaume Boudreau

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: what is the best way to acces the shares from Windows?

Postby kikkegek » Thu Aug 04, 2011 9:25 pm

okay, I guess I'll wait. overnight the que went from 51000 tasks to 38000 tasks, so I'll wait till it finishes and see how the share ends up...

thanks so far.

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: what is the best way to acces the shares from Windows?

Postby kikkegek » Fri Aug 05, 2011 12:14 pm

okay, Greyhole is sleeping, but I am missing a lot of files.

here is some output like you request in the troubleshooting guide:
[root@AMAHI jochen]# uname -r; rpm -q samba hda-greyhole
2.6.35.6-45.fc14.i686
samba-3.5.5-68.fc14.1.i686
hda-greyhole-0.9.2-1.i386
yum -y install fpaste; fpaste /etc/samba/smb.conf; fpaste /etc/greyhole.conf
http://fpaste.org/Z5RK/
http://fpaste.org/9etq/
[root@AMAHI jochen]# mount
/dev/mapper/vg_amahi-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_amahi-lv_home on /home type ext4 (rw)
/dev/sda3 on /var/hda/files type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
gvfs-fuse-daemon on /home/jochen/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=jochen)
[root@AMAHI jochen]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7f04484c

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 66562047 32768000 8e Linux LVM
/dev/sda3 66562048 1953523711 943480832 83 Linux

Disk /dev/dm-0: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders, total 4128768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 20.9 GB, 20904411136 bytes
255 heads, 63 sectors/track, 2541 cylinders, total 40828928 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-2: 10.5 GB, 10502537216 bytes
255 heads, 63 sectors/track, 1276 cylinders, total 20512768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2 doesn't contain a valid partition table
[root@AMAHI jochen]# dh -f
Command not found.
* Cancelling.. The search was cancelled as it was taking too long to complete.
You can increase the value of 'MaxSearchTime' in /etc/PackageKit/CommandNotFound.conf to change the timeout.
[root@AMAHI jochen]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_amahi-lv_root
20G 3.7G 15G 21% /
tmpfs 469M 336K 469M 1% /dev/shm
/dev/sda1 485M 29M 431M 7% /boot
/dev/mapper/vg_amahi-lv_home
9.7G 226M 9.0G 3% /home
/dev/sda3 886G 683G 159G 82% /var/hda/files
[root@AMAHI jochen]# greyhole --stats

Greyhole Statistics
===================

Storage Pool
Total - Used = Free + Attic = Possible
/var/hda/files/gh: 886G - 682G = 159G + 81G = 239G
==========================================
Total: 886G - 682G = 159G + 81G = 239G
[root@AMAHI jochen]# mysql -u root -phda -e "select * from disk_pool_partitions" hda_production
+----+----------------+--------------+---------------------+---------------------+
| id | path | minimum_free | created_at | updated_at |
+----+----------------+--------------+---------------------+---------------------+
| 1 | /var/hda/files | 10 | 2011-07-31 13:01:41 | 2011-07-31 13:01:41 |
+----+----------------+--------------+---------------------+---------------------+
5. A list of the directories on the root of the drives included in your storage pool, obtained with the following command (provide a paste URL):
http://fpaste.org/sz5e/
[root@AMAHI jochen]# greyhole --view-queue

Greyhole Work Queue Statistics
==============================

This table gives you the number of pending operations queued for the Greyhole daemon, per share.

Write Delete Rename
Docs 0 0 0
Downloads 0 0 0
Movies 0 0 0
Music 0 0 0
Pictures 0 0 0
Software 0 0 0
=========
Total 0 + 0 + 0 = 0

The following is the number of pending operations that the Greyhole daemon still needs to parse.
Until it does, the nature of those operations is unknown.
Spooled operations that have been parsed will be listed above and disappear from the count below.

Spooled 0
[root@AMAHI jochen]# tail /var/log/greyhole.log
Aug 05 21:05:56 7 sleep: Nothing to do... Sleeping.
Aug 05 21:06:06 7 sleep: Nothing to do... Sleeping.
Aug 05 21:06:16 7 sleep: Nothing to do... Sleeping.
Aug 05 21:06:26 7 sleep: Nothing to do... Sleeping.
Aug 05 21:06:36 7 sleep: Nothing to do... Sleeping.
Aug 05 21:06:46 7 sleep: Nothing to do... Sleeping.
Aug 05 21:06:56 7 sleep: Nothing to do... Sleeping.
Aug 05 21:07:06 7 sleep: Nothing to do... Sleeping.
Aug 05 21:07:16 7 sleep: Nothing to do... Sleeping.
Aug 05 21:07:26 7 sleep: Nothing to do... Sleeping.
one of the files that is now invisible on the windows clients, but is actually there as a symlink on the Amahi server is DSC02339.JPG
debug info
http://fpaste.org/KB5F/

another one is P1140314.JPG
debug info
http://fpaste.org/LEQS/

I really hope you can help me.

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: what is the best way to acces the shares from Windows?

Postby kikkegek » Fri Aug 05, 2011 12:28 pm

to add some more information. I saved a couple of files on the server.

ss1.jpg
ss2.jpg
..
...
....
ss6.jpg

and they instantly disappear on my windows client looking at the amahi server as soon as I save them.

the log looks like this
[root@AMAHI jochen]# tail /var/log/greyhole.log
Aug 05 21:22:38 7 write: Saving 1 tombstones for Pictures/_Suburban/sidesteps/ss6.jpg
Aug 05 21:22:38 7 write: Saving tombstones in /var/hda/files/gh/.gh_graveyard/Pictures/_Suburban/sidesteps/ss6.jpg
Aug 05 21:22:38 7 write: File copy at /var/hda/files/gh/Pictures/_Suburban/sidesteps/ss6.jpg is already up to date.
Aug 05 21:22:38 7 sleep: Nothing to do... Sleeping.
Aug 05 21:22:48 7 read_smb_spool: Processing Samba spool...
Aug 05 21:22:48 7 sleep: Nothing to do... Sleeping.
Aug 05 21:22:58 7 sleep: Nothing to do... Sleeping.
Aug 05 21:23:08 7 sleep: Nothing to do... Sleeping.
Aug 05 21:23:18 7 sleep: Nothing to do... Sleeping.
Aug 05 21:23:28 7 sleep: Nothing to do... Sleeping.
why am I not able to see my files?

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

Re: what is the best way to acces the shares from Windows?

Postby gboudreau » Fri Aug 05, 2011 2:47 pm

The very last line of the --debug output show that a user named 'brenda' owns the file copies, while all directories (inside the gh folder) are owned by jochen. What user are you using to connect to the shares, remotely ?

Try those commands, as root, on the HDA (either using SSH or VNC):

Code: Select all

chown -R jochen:users /var/hda/files/gh/Pictures find /var/hda/files/gh/Pictures -type d -exec chmod 775 "{}" \; find /var/hda/files/gh/Pictures -type f -exec chmod 664 "{}" \;
It that works (the files re-appear), repeat the same commands, but with /var/hda/files/gh/ instead of /var/hda/files/gh/Pictures, so that you also fix any other similar problem that might occur on other shares.
- Guillaume Boudreau

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: what is the best way to acces the shares from Windows?

Postby kikkegek » Fri Aug 05, 2011 11:55 pm

hi there,

YOU THE MAN!

I know I have been fiddeling with the file and folder persmissions, hoping to fix the problem myself.

your first three commands fixed the files and made them reappear...thanks man!

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: what is the best way to acces the shares from Windows?

Postby kikkegek » Wed Aug 10, 2011 10:55 pm

I am sorry to say that my problems are not solved.

one weekend has passed and I wanted to upload photos we took during a dance event and again I am not allowed to save files on the pictures share.

I can copy them to any other share, just not the pictures share.

what is happening?

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

Re: what is the best way to acces the shares from Windows?

Postby gboudreau » Thu Aug 11, 2011 3:22 am

[...] again I am not allowed [...]
You're previous problem (above) was with Greyhole not showing all your files, because of a permission problem in the gh folder. I don't remember you ever mentioning you had issues where you were not allowed to copy files somewhere..?
Plus, continuing a thread gives you new post almost no visibility. Support people look for new threads, not new post in which they were not involved in the past. I'm about the only person who noticed that new post.

Anyway, not being to copy files in a share is a general Shares problem, not a Greyhole problem.
I'm guessing the permissions of your /var/hda/files/Pictures folder are just wrong.

Compare the owners and permissions of another shared folder /var/hda/files/something_else (where you know you can copy files to) with those of the /var/hda/files/Pictures/bla/bla folder (where you're trying to copy new files, and it's not working).
You'll want to make them match, so that you're able to copy files into the Pictures share.

The commands to change the permissions would look pretty much like the ones I gave you to fix your Greyhole problem, but would need to be applied to the shared folder, not the gh folder. Example:

Code: Select all

chown -R jochen:users /var/hda/files/Pictures find /var/hda/files/Pictures -type d -exec chmod 775 "{}" \; find /var/hda/files/Pictures -type f -exec chmod 664 "{}" \;
- Guillaume Boudreau

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: what is the best way to acces the shares from Windows?

Postby kikkegek » Thu Aug 11, 2011 3:29 am

thanks Guillaume,

you are right, this seems to be a new problem. I just thought you guys dont like people opening new topics all the time, but at this time it would absolutely be very legit.

I just thought considering the history of my problem that it was wiser to continue this thread instead of opening a new one. especially because 3 days ago the share was just fine and now after the weekend things seem to have changed.

I'll check the ownership and file permissions of my MOVIES and PICTURES folder and post them here. I also think this must be a easy fix.

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: what is the best way to acces the shares from Windows?

Postby kikkegek » Thu Aug 11, 2011 11:43 am

ok, did some homework.

in pictures the file permissions were root-root

I used

Code: Select all

chown -R jochen:users /var/hda/files/Pictures
but that didnt help.

all other file and folder permissions are fine
file are
lrwxrwxrwx
and folder are
drwxrwxr-x

just to be sure I then executed the the last two command you offered

Code: Select all

find /var/hda/files/Pictures -type d -exec chmod 775 "{}" \; find /var/hda/files/Pictures -type f -exec chmod 664 "{}" \;
but no succes. I still can not copy folders nor files to the share.

I get this error in Vista, see attached file "untitled.jpg"

when I try to delete a folder on the share I get the error, see attached file "folder.jg"

what is going on?

I even tried adding the share, logging on with
user: workgroup\username
password: password

I checked the workgroup in the Amahi-setup-share-settings page and it matches my windows workgroup

but when I check the domain on my laptop I get this:

Code: Select all

C:\Users\jochen>echo %USERDOMAIN%\%USERNAME% ARGOS\jochen
while the workgroup is set to THUIZ, which is my workgroup on the Amahi server.


please help! I have no clue what is going on.
Attachments
folder.jpg
folder.jpg (24 KiB) Viewed 3503 times
Untitled.jpg
Untitled.jpg (17.83 KiB) Viewed 3503 times

Who is online

Users browsing this forum: No registered users and 10 guests