SpaceinvaderOne/Unraid_ZFS_Auto_Dataset_Update

not working for folder containing a german umlaut (ä,ö,ü)

rj-d2 opened this issue · 5 comments

rj-d2 commented

Hi,

thx for all your videos!!
i tried the script, its working for most of my folders, but not on folders that have german umlauts in it (ä,ö,ü)
it renames the folder containing an umlaut to ..._temp but does not create a dataset.

is there a way to get this working??

Hi @rj-d2 Unfortunately its a limitation of ZFS for what can be in a dataset name. It is best to use ASCII characters only.
I just tried manually creating a dataset and it failed

root@BaseStar:~# zfs create sg1_storage/oneäöü
cannot create 'sg1_storage/oneäöü': invalid character '' in name

However I have pushed a change to the script and added a function that will transliterate the German umlauts before creating datasets, replacing German umlauts in the folder names with ASCII approximations. This would take a folder called oneäöü and make a dataset called oneaeoeue

Please try the new script and see if it helps your problem.

rj-d2 commented

thx for having a look at this,

the new script does not give any errors, but it seems there is still a problem somewhere, it does not list converted folders at the end
here is the log:

Processing folder /mnt/cache/office/Erlösermittlungen...
Folder size: 2.0M
Creating and populating new dataset cache/office/Erloesermittlungen...
Processing folder /mnt/cache/office/Gästehaus...
Folder size: 6.6G
Creating and populating new dataset cache/office/Gaestehaus...
Processing folder /mnt/cache/office/Pässe...
Folder size: 1.7M
Creating and populating new dataset cache/office/Paesse...
The following folders were successfully converted to datasets:


dataset or folder script:

**Datasets in cache/office are**
There are no datasets

**Folders in cache/office are**
Gästehaus
Erlösermittlungen
Pässe

in the unraid main tab under zfs master there are no folders/dataset shown under "office" which is the share im having trouble with.

should i just rename the folders to ASCII standard, if so do i need to rename all subfolders as well or would i be enough to just rename the root folders??

Thats strange. I made a test trying to duplicate your folders and it worked for me

Checking if anything needs converting
Folders found that need converting.....continuing
Processing folder /mnt/sg1_storage/appdata_script/Erlösermittlungen...
Folder size: 394K
Creating and populating new dataset sg1_storage/appdata_script/Erloesermittlungen...
Validating copy...
Validation successful, cleanup can proceed.
Processing folder /mnt/sg1_storage/appdata_script/Gästehaus...
Folder size: 10K
Creating and populating new dataset sg1_storage/appdata_script/Gaestehaus...
Validating copy...
Validation successful, cleanup can proceed.
Processing folder /mnt/sg1_storage/appdata_script/Pässe...
Folder size: 1.3M
Creating and populating new dataset sg1_storage/appdata_script/Paesse...
Validating copy...
Validation successful, cleanup can proceed.
Skipping dataset /mnt/sg1_storage/appdata_script/container1...
Processing folder /mnt/sg1_storage/appdata_script/random_test...
Folder size: 1.0K
Creating and populating new dataset sg1_storage/appdata_script/random_test...
Validating copy...
Validation successful, cleanup can proceed.
The following folders were successfully converted to datasets:
/mnt/sg1_storage/appdata_script/Erlösermittlungen
/mnt/sg1_storage/appdata_script/Gästehaus
/mnt/sg1_storage/appdata_script/Pässe
/mnt/sg1_storage/appdata_script/random_test
Script Finished Sep 10, 2023 11:07.33

Full logs for this script are available at /tmp/user.scripts/tmpScripts/testscript/log.txt

After checking with folder or dataset script I see

**Datasets in sg1_storage/appdata_script are**
Erloesermittlungen
Gaestehaus
Paesse
container1
random_test

**Folders in sg1_storage/appdata_script are**
There are no folders

Please make sure you dont have dryrun set to yes as this would cause what you are seeing

rj-d2 commented

oh shit im sorry, of course i had dry_run set to yes,
sir spaceinvader you are an absolute legend, please treat yourself to a nice cold beer (paypal incoming)

Thanks so much for the beer @rj-d2 its very much appreciated :)