Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

21 May, 2024: Computers section is temporarily disabled for maintenance. It will take several days before it's back.


computers / comp.sys.raspberry-pi / Re: Accessing a file by Samba as it is being written to

SubjectAuthor
* Accessing a file by Samba as it is being written toNY
`- Re: Accessing a file by Samba as it is being written toNikolaj Lazic

1
Accessing a file by Samba as it is being written to

<sfm12c$ab8$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2717&group=comp.sys.raspberry-pi#2717

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: me@privacy.invalid (NY)
Newsgroups: comp.sys.raspberry-pi
Subject: Accessing a file by Samba as it is being written to
Date: Thu, 19 Aug 2021 17:32:10 +0100
Organization: A noiseless patient Spider
Lines: 1
Message-ID: <sfm12c$ab8$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain;
format=flowed;
charset="Windows-1252";
reply-type=original
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 19 Aug 2021 16:32:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d0adc351988d5919cb56bf7891fbdab8";
logging-data="10600"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//ygiiRAM5PyvwF2PJ+m5iG+lwmBTXRMU="
Cancel-Lock: sha1:RLLACUuui/emHUrDkJTtYmrXBTM=
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
X-Antivirus-Status: Clean
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
Importance: Normal
X-Antivirus: Avast (VPS 210819-2, 19/8/2021), Outbound message
X-Priority: 3
X-MSMail-Priority: Normal
 by: NY - Thu, 19 Aug 2021 16:32 UTC

I use my Pi as a PVR. I have use Samba (SMB) to share the drive to which the
recordings are being written. I've noticed that when Windows accesses this
shared drive while a recording is being made and the file is growing in
size, the file appears to grow in "chunks" - the size and the apparent
length (time) of the recording only changes every few minutes - sometimes an
update can be triggered by F5 (refresh Windows Explorer). It's not that the
PVR program is only updating a header infrequently, because VLC on the Pi,
accessing the file via the UNIX filesystem, can see beyond the point at
which VLC on Windows thonks the file ends. It looks as if it's a Samba
issue, as if Samba is buffering the contents. But it's not a restriction of
SMB as a whole, because if one Windows PC accesses a file using SMB that is
being written to on another Windows computer, the true up-to-the-minute size
and contents are available.

Is there a parameter in Samba on Linux which avoids this or shortens the
amount of lag? It's not the end of the world if there isn't a way. It just
means I need to wait until a recording has finished before I can rely on
being able to read the whole of the file.

Re: Accessing a file by Samba as it is being written to

<slrnsidb0e.hqr.nlazicBEZ_OVOGA@mudrac.ffzg.hr>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2738&group=comp.sys.raspberry-pi#2738

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!aioe.org!newsfeed.CARNet.hr!.POSTED.193.198.212.8!not-for-mail
From: nlazicBEZ_OVOGA@mudrac.ffzg.hr (Nikolaj Lazic)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Accessing a file by Samba as it is being written to
Date: Wed, 25 Aug 2021 20:46:06 -0000 (UTC)
Organization: CARNet, Croatia
Message-ID: <slrnsidb0e.hqr.nlazicBEZ_OVOGA@mudrac.ffzg.hr>
References: <sfm12c$ab8$1@dont-email.me>
Reply-To: nlazicBEZ_OVOGA@mudrac.ffzg.hr
Injection-Date: Wed, 25 Aug 2021 20:46:06 -0000 (UTC)
Injection-Info: news1.carnet.hr; posting-host="193.198.212.8";
logging-data="28555"; mail-complaints-to="abuse@CARNet.hr"
User-Agent: slrn/1.0.2 (Linux)
 by: Nikolaj Lazic - Wed, 25 Aug 2021 20:46 UTC

Dana Thu, 19 Aug 2021 17:32:10 +0100, NY <me@privacy.invalid> napis'o:
> I use my Pi as a PVR. I have use Samba (SMB) to share the drive to which the
> recordings are being written. I've noticed that when Windows accesses this
> shared drive while a recording is being made and the file is growing in
> size, the file appears to grow in "chunks" - the size and the apparent
> length (time) of the recording only changes every few minutes - sometimes an
> update can be triggered by F5 (refresh Windows Explorer). It's not that the
> PVR program is only updating a header infrequently, because VLC on the Pi,

It will not update header at all.
THe problem is that the "index" of the video is written at the end
of the file. If you don't have the end... you can only watch while
it is written.

> accessing the file via the UNIX filesystem, can see beyond the point at
> which VLC on Windows thonks the file ends. It looks as if it's a Samba
> issue, as if Samba is buffering the contents. But it's not a restriction of
> SMB as a whole, because if one Windows PC accesses a file using SMB that is
> being written to on another Windows computer, the true up-to-the-minute size
> and contents are available.
>
> Is there a parameter in Samba on Linux which avoids this or shortens the
> amount of lag? It's not the end of the world if there isn't a way. It just
> means I need to wait until a recording has finished before I can rely on
> being able to read the whole of the file.

As you can also copy the file when it is completely written and than
watch it on another machine and also jump through the file.
Usually you cannot jump through the file if it is not written
completely.

As you've written, pressinf F5 for refresh gets the latest size of the
file but you will not be able to skip through the file until recorder
finishes and puts the "index" at the end of the file.


computers / comp.sys.raspberry-pi / Re: Accessing a file by Samba as it is being written to

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor