Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit filesystem access to files to help RAID spin down #5960

Closed
Rouzax opened this issue Jan 5, 2019 · 6 comments
Closed

Limit filesystem access to files to help RAID spin down #5960

Rouzax opened this issue Jan 5, 2019 · 6 comments

Comments

@Rouzax
Copy link
Contributor

Rouzax commented Jan 5, 2019

Not really a bug or feature request.
I'm trying to limit file system access to my downloaded and post processed episodes to allow spin down of my RAID array to save power.

One if the things I see happening is Medusa accessing ReadAttributes for episodes.

An attempt was made to access an object.

Subject:
	Security ID:		HOME\SA-Medusa
	Account Name:		SA-Medusa
	Account Domain:		HOME
	Logon ID:		0x9420A1

Object:
	Object Server:		Security
	Object Type:		File
	Object Name:		E:\Data\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv
	Handle ID:		0x29a8
	Resource Attributes:	S:AI

Process Information:
	Process ID:		0x4
	Process Name:		

Access Request Information:
	Accesses:		ReadAttributes
				
	Access Mask:		0x80

When I look in the debug log I see this happening:

2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Seeing if we need anything from Luther
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S01E01. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 01\Luther - S01E01 - Episode 1 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S01E02. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 01\Luther - S01E02 - Episode 2 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S01E03. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 01\Luther - S01E03 - Episode 3 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S01E04. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 01\Luther - S01E04 - Episode 4 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S01E05. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 01\Luther - S01E05 - Episode 5 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S01E06. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 01\Luther - S01E06 - Episode 6 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S02E01. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 02\Luther - S02E01 - Episode 1 (1080p.BluRay.iNGOT).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S02E02. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 02\Luther - S02E02 - Episode 2 (1080p.BluRay.iNGOT).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S02E03. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 02\Luther - S02E03 - Episode 3 (1080p.BluRay.iNGOT).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S02E04. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 02\Luther - S02E04 - Episode 4 (1080p.BluRay.iNGOT).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S03E01. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 03\Luther - S03E01 - Episode 1 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S03E02. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 03\Luther - S03E02 - Episode 2 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S03E03. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 03\Luther - S03E03 - Episode 3 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S03E04. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 03\Luther - S03E04 - Episode 4 (1080p.BluRay.ingot).mkv
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] Searching for Luther S04E02. Reason: Quality is not in Allowed|Preferred. Searching episode
2019-01-05 17:35:35 DEBUG    SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv

Medusa (please complete the following information):

Medusa Info: Branch: master Commit: 918cfe7 Version: v0.2.14 Database: 44.12
Python Version: 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
SSL Version: OpenSSL 1.0.2o 27 Mar 2018
OS: Windows-10-10.0.17763
Locale: nl_NL.cp1252

I'm wondering what is happening here in the backend and if it is really needed to read the file attributes of the downloaded episodes

@triage-new-issues triage-new-issues bot added the triage Untriaged issue label Jan 5, 2019
@triage-new-issues triage-new-issues bot removed the triage Untriaged issue label Jan 5, 2019
@medariox
Copy link
Contributor

medariox commented Jan 5, 2019

Great find! It will be fixed with: #5961

@medariox medariox added the Fixed label Jan 5, 2019
@Rouzax
Copy link
Contributor Author

Rouzax commented Jan 5, 2019

Happy to help. 😄
And as always, WOW you are fast!

@Rouzax
Copy link
Contributor Author

Rouzax commented Jan 6, 2019

@medariox
Another one I see happening is:

An attempt was made to access an object.

Subject:
	Security ID:		HOME\SA-Medusa
	Account Name:		SA-Medusa
	Account Domain:		HOME
	Logon ID:		0xF7E77C

Object:
	Object Server:		Security
	Object Type:		File
	Object Name:		E:\Data\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv
	Handle ID:		0x4f00
	Resource Attributes:	S:AI

Process Information:
	Process ID:		0x4
	Process Name:		

Access Request Information:
	Accesses:		ReadData (or ListDirectory)

	Access Mask:		0x1				

Medusa debug logs

2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Starting release refiner [extension=release, release_name=None, release_file=None]
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] No release name for 'C:\\DATA\\TVSeries\\Luther\\Season 03\\Luther - S03E04 - Episode 4 (1080p.BluRay.ingot).mkv'
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Refining using Series information.
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Attribute series_tvdb_id changed from None to 159591
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Attribute series_imdb_id changed from None to u'tt1474684'
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Attribute year changed from None to 2010
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Refining using Episode information.
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Attribute tvdb_id changed from None to 4430315
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Video information cached under key medusa.subtitles:video|C:\DATA\TVSeries\Luther\Season 03\Luther - S03E04 - Episode 4 (1080p.BluRay.ingot).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: No changed subtitles for Luther S03E04. Current subtitles: [u'eng']
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: Creating episode from: C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: Creating episode object from C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Matched release C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv to a series in your database: Luther
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Parsed C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv into title: Luther, season: 4, episode: [1], episode_title: Episode 1, screen_size: 1080p, source: Web, release_group: BORDERLiNE, container: mkv, mimetype: video/x-matroska, type: episode, parsing_time: 0.125, total_time: 0.125, absolute_episode: [], quality: 1080p WEB-DL
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv parsed to Luther S04E01
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Luther: Not changing current status 'Downloaded' or quality '1080p WEB-DL' based on file: C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Transaction with 1 queries executed
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Matched release Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE) to a series in your database: Luther
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Parsed Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE) into title: Luther, season: 4, episode: [1], episode_title: Episode 1, screen_size: 1080p, source: Web, release_group: BORDERLiNE, type: episode, parsing_time: 0.0309998989105, total_time: 0.0309998989105, absolute_episode: [], quality: 1080p WEB-DL
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Cached video information under key medusa.subtitles:video|C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv was invalidated
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Scanning video C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv...
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Starting release refiner [extension=release, release_name=None, release_file=None]
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] No release name for 'C:\\DATA\\TVSeries\\Luther\\Season 04\\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv'
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Refining using Series information.
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Attribute series_tvdb_id changed from None to 159591
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Attribute series_imdb_id changed from None to u'tt1474684'
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Attribute year changed from None to 2010
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Refining using Episode information.
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Attribute tvdb_id changed from None to 5420732
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Video information cached under key medusa.subtitles:video|C:\DATA\TVSeries\Luther\Season 04\Luther - S04E01 - Episode 1 (1080p.WEB-DL.BORDERLiNE).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: No changed subtitles for Luther S04E01. Current subtitles: [u'eng', u'und']
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: Creating episode from: C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: Creating episode object from C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Matched release C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv to a series in your database: Luther
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Parsed C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv into title: Luther, season: 4, episode: [2], episode_title: Episode 2, screen_size: 1080p, source: Blu-ray, release_group: NTb, container: mkv, mimetype: video/x-matroska, type: episode, parsing_time: 0.0780000686646, total_time: 0.0780000686646, absolute_episode: [], quality: 1080p BluRay
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv parsed to Luther S04E02
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] 159591: Setter sets location to C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Luther: Not changing current status 'Downloaded' or quality '1080p BluRay' based on file: C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Transaction with 1 queries executed
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Matched release Luther - S04E02 - Episode 2 (1080p.BluRay.NTb) to a series in your database: Luther
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Parsed Luther - S04E02 - Episode 2 (1080p.BluRay.NTb) into title: Luther, season: 4, episode: [2], episode_title: Episode 2, screen_size: 1080p, source: Blu-ray, release_group: NTb, type: episode, parsing_time: 0.047000169754, total_time: 0.047000169754, absolute_episode: [], quality: 1080p BluRay
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Cached video information under key medusa.subtitles:video|C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv was invalidated
2019-01-06 03:00:40 DEBUG    SHOWQUEUE-REFRESH :: [918cfe7] Scanning video C:\DATA\TVSeries\Luther\Season 04\Luther - S04E02 - Episode 2 (1080p.BluRay.NTb).mkv...

@Rouzax
Copy link
Contributor Author

Rouzax commented Jul 21, 2019

@medariox I know it will be done when its done 😄 but I'm gonna ask anyhow.
Any ETA on this merge?
Each time Medusa does this my server spins up 12 x 3.5" HDD's and as a result it uses an additional 100 Watt.

@medariox
Copy link
Contributor

@Rouzax
Sorry for the long wait. It will be fixed with #7102 and available with the next release.

@Rouzax
Copy link
Contributor Author

Rouzax commented Aug 31, 2019

@medariox, No problem.
Just happy that it will be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants