SOLVED: Folders are not deleted from Greyhole pools in Amahi 10
Posted: Sat Mar 17, 2018 8:31 am
Hi,
I just upgraded from Amahi 8 to Amahi 10 and have a problem with Greyhole. I made a complete Fedora/Amahi reinstall on a new disk and planned to rebuild the LZ and the GH Pools. I experienced a strange problem while carefully checking the setup. So I stepped back and used a new test user (testuser), temporary renamed the old pool directores on the two drives (gh -> gh1) and let Greyhole to create a new pool gh folder on each drives for testing. Thus now it is as if I would create a competely new Greyhole configuration. Still the problem is the same and is described below. On my Amahi 8 setup I did not have similar problem with Greyhole.
Hardware: HP Proliant MicroServer Gen8
System: Amahi10/Fedora25
User: testuser
Shared folder (LZ): /var/hda/files/testuser saved in 2 copies by Greyhole
Greyhole pools: /var/hda/files/drives/drive1 and /var/hda/files/drives/drive2
Additional version infos:
uname -a
Linux nas.home.hu 4.13.16-100.fc25.x86_64 #1 SMP Mon Nov 27 19:52:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/fedora-release
Fedora release 25 (Twenty Five)
rpm -q samba amahi-greyhole
samba-4.5.14-0.fc25.x86_64
amahi-greyhole-0.10.14-1.x86_64
Platform: 10.0.0-1 (as reported by Amahi Dashboard)
Core: 10.4.0-1 (as reported by Amahi Dashboard)
(UPDATE: more precise spool and log details can be found in my later posts)
Scenario 1:
Copy test1-folder with files test1a.txt and test1b.txt to Samba shared testuser directory via Windows 10 file Explorer. Copy is successful and also checked on the HDA terminal. In the landing zone it is absolutelly OK, in the drive pools an extra empty directory appears with a strange name.
Greyhole log:
Mar 17 15:04:08 INFO write: Now working on task ID 36: write testuser/test1-folder/test1a.txt
Mar 17 15:04:08 INFO write: File created: testuser/test1-folder/test1a.txt
Mar 17 15:04:08 INFO write: Now working on task ID 37: write testuser/test1-folder/test1b.txt
Mar 17 15:04:08 INFO write: File created: testuser/test1-folder/test1b.txt
In the pools (the two pools look identical):
[root@nas testuser]# pwd
/var/hda/files/drives/drive2/gh/testuser
[root@nas testuser]# ls -lRh
.:
total 8.0K
drwxrwxrwx 2 root root 4.0K Mar 17 15:04 ''$'\240\234\215''C(V'
drwxrwxr-x 2 testuser users 4.0K Mar 17 15:04 test1-folder
'./'$'\240\234\215''C(V':
./test1-folder:
total 8.0K
-rwxrw-r-- 1 testuser users 1.1K Mar 17 13:05 test1a.txt
-rwxrw-r-- 1 testuser users 1.1K Mar 17 13:05 test1b.txt
total 0
Scenario 2:
Delete the test1-folder with the two text files via Windows 10 file Explorer. The shared folder becomes empty and that is also reflected by checking in the terminal. However in the pools only the files are deleted and not the directory. Again the two pools look identical.
Greyhole log:
Mar 17 15:14:09 INFO unlink: Now working on task ID 38: unlink testuser/test1-folder/test1a.txt
Mar 17 15:14:09 INFO unlink: File deleted: /var/hda/files/testuser/test1-folder/test1a.txt
Mar 17 15:14:09 INFO unlink: Now working on task ID 39: unlink testuser/test1-folder/test1b.txt
Mar 17 15:14:09 INFO unlink: File deleted: /var/hda/files/testuser/test1-folder/test1b.txt
Mar 17 15:14:09 INFO rmdir: Now working on task ID 40: rmdir testuser/N�C(V
Mar 17 15:14:09 INFO rmdir: Directory deleted: /var/hda/files/testuser/N�C(V
In the pools (the two pools look identical):
[root@nas testuser]# ls -lRh
.:
total 8.0K
drwxrwxrwx 2 root root 4.0K Mar 17 15:04 ''$'\240\234\215''C(V'
drwxrwxr-x 2 testuser users 4.0K Mar 17 15:14 test1-folder
'./'$'\240\234\215''C(V':
total 0
./test1-folder:
total 0
total 0
During the tests I patiently waited for the automatic processes (every 10 minutes) and had not forced with FSCK. I later scheduled FSCK and when ran, it gave these log lines:
Mar 17 16:24:10 INFO fsck_file: Now working on task ID 52: fsck_file testuser/test2-folder/test2b.txt
Mar 17 16:24:10 WARN fsck_file: WARNING! No copies of this file are available in the Greyhole storage pool: "testuser/test2-folder/test2b.txt".
Mar 17 16:24:10 INFO fsck_file: Now working on task ID 53: fsck_file testuser/test2-folder/test2a.txt
Mar 17 16:24:10 WARN fsck_file: WARNING! No copies of this file are available in the Greyhole storage pool: "testuser/test2-folder/test2a.txt".
If I repeate the test with another folder name and folders, the result is the same. Another strangely named empty directory is created in the pools together with the correct directory with the files. After deleting only the files are deleted. The file's folder and the strange folder remains there. Thus more and more garbage directories remain in the LZ folders. They don't disappear after FSCK or trash deletion.
I made several tests. Disabled storage pools, recreated the user, the shared directory, restarted the HDA etc. All modification had been made via the Amahi Dashboard. The shared folder's name is identical of the user name and thus shadows the /home/<user> directory. However the situation is the same if I use a common share folder, i.e. with a directory name other than the user name.
What could be the problem?
Gabor
I just upgraded from Amahi 8 to Amahi 10 and have a problem with Greyhole. I made a complete Fedora/Amahi reinstall on a new disk and planned to rebuild the LZ and the GH Pools. I experienced a strange problem while carefully checking the setup. So I stepped back and used a new test user (testuser), temporary renamed the old pool directores on the two drives (gh -> gh1) and let Greyhole to create a new pool gh folder on each drives for testing. Thus now it is as if I would create a competely new Greyhole configuration. Still the problem is the same and is described below. On my Amahi 8 setup I did not have similar problem with Greyhole.
Hardware: HP Proliant MicroServer Gen8
System: Amahi10/Fedora25
User: testuser
Shared folder (LZ): /var/hda/files/testuser saved in 2 copies by Greyhole
Greyhole pools: /var/hda/files/drives/drive1 and /var/hda/files/drives/drive2
Additional version infos:
uname -a
Linux nas.home.hu 4.13.16-100.fc25.x86_64 #1 SMP Mon Nov 27 19:52:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/fedora-release
Fedora release 25 (Twenty Five)
rpm -q samba amahi-greyhole
samba-4.5.14-0.fc25.x86_64
amahi-greyhole-0.10.14-1.x86_64
Platform: 10.0.0-1 (as reported by Amahi Dashboard)
Core: 10.4.0-1 (as reported by Amahi Dashboard)
(UPDATE: more precise spool and log details can be found in my later posts)
Scenario 1:
Copy test1-folder with files test1a.txt and test1b.txt to Samba shared testuser directory via Windows 10 file Explorer. Copy is successful and also checked on the HDA terminal. In the landing zone it is absolutelly OK, in the drive pools an extra empty directory appears with a strange name.
Greyhole log:
Mar 17 15:04:08 INFO write: Now working on task ID 36: write testuser/test1-folder/test1a.txt
Mar 17 15:04:08 INFO write: File created: testuser/test1-folder/test1a.txt
Mar 17 15:04:08 INFO write: Now working on task ID 37: write testuser/test1-folder/test1b.txt
Mar 17 15:04:08 INFO write: File created: testuser/test1-folder/test1b.txt
In the pools (the two pools look identical):
[root@nas testuser]# pwd
/var/hda/files/drives/drive2/gh/testuser
[root@nas testuser]# ls -lRh
.:
total 8.0K
drwxrwxrwx 2 root root 4.0K Mar 17 15:04 ''$'\240\234\215''C(V'
drwxrwxr-x 2 testuser users 4.0K Mar 17 15:04 test1-folder
'./'$'\240\234\215''C(V':
./test1-folder:
total 8.0K
-rwxrw-r-- 1 testuser users 1.1K Mar 17 13:05 test1a.txt
-rwxrw-r-- 1 testuser users 1.1K Mar 17 13:05 test1b.txt
total 0
Scenario 2:
Delete the test1-folder with the two text files via Windows 10 file Explorer. The shared folder becomes empty and that is also reflected by checking in the terminal. However in the pools only the files are deleted and not the directory. Again the two pools look identical.
Greyhole log:
Mar 17 15:14:09 INFO unlink: Now working on task ID 38: unlink testuser/test1-folder/test1a.txt
Mar 17 15:14:09 INFO unlink: File deleted: /var/hda/files/testuser/test1-folder/test1a.txt
Mar 17 15:14:09 INFO unlink: Now working on task ID 39: unlink testuser/test1-folder/test1b.txt
Mar 17 15:14:09 INFO unlink: File deleted: /var/hda/files/testuser/test1-folder/test1b.txt
Mar 17 15:14:09 INFO rmdir: Now working on task ID 40: rmdir testuser/N�C(V
Mar 17 15:14:09 INFO rmdir: Directory deleted: /var/hda/files/testuser/N�C(V
In the pools (the two pools look identical):
[root@nas testuser]# ls -lRh
.:
total 8.0K
drwxrwxrwx 2 root root 4.0K Mar 17 15:04 ''$'\240\234\215''C(V'
drwxrwxr-x 2 testuser users 4.0K Mar 17 15:14 test1-folder
'./'$'\240\234\215''C(V':
total 0
./test1-folder:
total 0
total 0
During the tests I patiently waited for the automatic processes (every 10 minutes) and had not forced with FSCK. I later scheduled FSCK and when ran, it gave these log lines:
Mar 17 16:24:10 INFO fsck_file: Now working on task ID 52: fsck_file testuser/test2-folder/test2b.txt
Mar 17 16:24:10 WARN fsck_file: WARNING! No copies of this file are available in the Greyhole storage pool: "testuser/test2-folder/test2b.txt".
Mar 17 16:24:10 INFO fsck_file: Now working on task ID 53: fsck_file testuser/test2-folder/test2a.txt
Mar 17 16:24:10 WARN fsck_file: WARNING! No copies of this file are available in the Greyhole storage pool: "testuser/test2-folder/test2a.txt".
If I repeate the test with another folder name and folders, the result is the same. Another strangely named empty directory is created in the pools together with the correct directory with the files. After deleting only the files are deleted. The file's folder and the strange folder remains there. Thus more and more garbage directories remain in the LZ folders. They don't disappear after FSCK or trash deletion.
I made several tests. Disabled storage pools, recreated the user, the shared directory, restarted the HDA etc. All modification had been made via the Amahi Dashboard. The shared folder's name is identical of the user name and thus shadows the /home/<user> directory. However the situation is the same if I use a common share folder, i.e. with a directory name other than the user name.
What could be the problem?
Gabor