Jump to content

Can't make a network drive to persist

Go to solution Solved by HeLiOn,

Ok the issue seems to have solved by itself.
I experimented with the last digit of the fstab line, and set it to 2, without having realised that the path was not the same.
Both qbittorrent and plex were reporting missing files. So I set the last digit back to 0 and restarted the server.
Then I realized the path changed, reconfigured both programs, and now, the drive seems to be properly initializing from the start, and the programs are getting access.

I don't exactly know triggered this, but the drive was not mounted in that folder before today.
All I know is that a few days ago, there was a system update, and then today, there was a power outtage in my area.
I'm not exactly sure how any of these events can lead to changes in the system files, but it is what it is.

If I find something else, I'll post, but for now at east, my problem is no more.

Hello.
I installed Linux Ubuntu on another PC so I can use it as a home server.
I attached an NTFS drive that I had with some movies and tv shows that I've been hoarding for while.

Spoiler

image.png.fa47b4638eeb4aca34a6e88de35a9b88.png

The drive is working just fine locally, but I wanted to share it over the network.
So I installed Samba, and made it available from my main PC by network mapping.

Spoiler

image.png.fc281b81426a8ccd1bb2f5c2f9a6d285.png

The problem is, if I restart the server, the network drive becomes inaccessible
I get the error you see below.

Spoiler

image.png.6cb220805c2317e234b1cd48dba10bc9.png

I'm guessing the drive doesn't initialize, or something like that, because once I connect through teamviwer and I open it locally, I'm able to map it and access its content again.
Is there any way I can get rid of this hassle and have it initialize as soon as Linux loads?

Link to comment
Share on other sites

Link to post
Share on other sites

Are samba and the drive mount set to start automatically?

 

I'd try adding a delay to samba, I've seen cases where file shares start before the drive is mounted and that can cause issues.

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Electronics Wizardy said:

Are samba and the drive mount set to start automatically?

 

I'd try adding a delay to samba, I've seen cases where file shares start before the drive is mounted and that can cause issues.

I have no idea.
I think samba starts automatically, because as I said, I only have to access the drive to make it be remappable.
no idea about the drive mount, though.

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, HeLiOn said:

I have no idea.
I think samba starts automatically, because as I said, I only have to access the drive to make it be remappable.
no idea about the drive mount, though.

How are you mounting the drive automatically? Did you add it to fstab?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Electronics Wizardy said:

How are you mounting the drive automatically? Did you add it to fstab?

Linux has native support for NTFS nowadays.
It's been around for a few months, maybe one year.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, HeLiOn said:

Linux has native support for NTFS nowadays.
It's been around for a few months, maybe one year.

Is the drive mounting automatically via fstab? 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Electronics Wizardy said:

Is the drive mounting automatically via fstab? 

It doesn't look like it, but yet again, I haven't played with the fstab file in a very long time.

image.thumb.png.4ee08e32b0f488c2a2cb19144c896833.png

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, HeLiOn said:

It doesn't look like it, but yet again, I haven't played with the fstab file in a very long time.

image.thumb.png.4ee08e32b0f488c2a2cb19144c896833.png

I'd try adding that drive to fstab. I'd guess the gui mounting is after the samba server starts.

Link to comment
Share on other sites

Link to post
Share on other sites

13 hours ago, Electronics Wizardy said:

I'd try adding that drive to fstab. I'd guess the gui mounting is after the samba server starts.

I tried adding it to fstab, but after a restart, the drive disappeared entirely. 
I probably did something wrong. I haven't done this in a few years, and the tutorials I found weren't really consistent.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

Sorry for bumping this, but some people said that I should add a delay to the samba service.
Does anyone know how to do that? It would make sure that both the network and the drive are properly initialized.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, HeLiOn said:

Sorry for bumping this, but some people said that I should add a delay to the samba service.
Does anyone know how to do that? It would make sure that both the network and the drive are properly initialized.

There should be a wait for network method can't remember clearly.

 

Maybe kernel options or such?

Or boot options.

And it's true it should in fstab then technically it should do automatically.

 

At least nfs did.

I'm jank tinkerer if it works then it works.

Regardless of compatibility 🐧🖖

Link to comment
Share on other sites

Link to post
Share on other sites

On 2/29/2024 at 10:11 AM, HeLiOn said:

I'm guessing the drive doesn't initialize, or something like that, because once I connect through teamviwer and I open it locally, I'm able to map it and access its content again.

Is there any way I can get rid of this hassle and have it initialize as soon as Linux loads?

Because it's user managed, it wont mount until you interact with it locally.
 

On 3/1/2024 at 3:40 AM, HeLiOn said:

I tried adding it to fstab, but after a restart, the drive disappeared entirely. 
I probably did something wrong. I haven't done this in a few years, and the tutorials I found weren't really consistent.

It should dissapear from your mount list since it's no longer user managed. It should be available at whatever path you specified in fstab.

The directory does need to exist before it can be mounted as well.
https://wiki.archlinux.org/title/samba#As_mount_entry

 

The "_netdev" option will tell it not to mount it until the network has started

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, Nayr438 said:

Because it's user managed, it wont mount until you interact with it locally.
 

It should dissapear from your mount list since it's no longer user managed. It should be available at whatever path you specified in fstab.

The directory does need to exist before it can be mounted as well.
https://wiki.archlinux.org/title/samba#As_mount_entry

 

The "_netdev" option will tell it not to mount it until the network has started

 

 

Cheers I'm fresh on arch and thanks to you I've learned something.

I'm jank tinkerer if it works then it works.

Regardless of compatibility 🐧🖖

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Nayr438 said:

It should dissapear from your mount list since it's no longer user managed. It should be available at whatever path you specified in fstab.

The directory does need to exist before it can be mounted as well.
https://wiki.archlinux.org/title/samba#As_mount_entry

 

The "_netdev" option will tell it not to mount it until the network has started

It wasn't available in the set folder either. The drive simply disappears.
Do you know a good up-to-date tutorial I can use to mount this drive properly?

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

I'm kinda stupid for not realizing this earlier, but I actually found the drive in fstab. It was added automatically by the system.
What exactly do I need to do to to make it wake up automatically?


image.png.0f92c069d96a05bb9d3d3bbba12a0e70.png

 

When the system is powered up, the drive is initialized, but it's in stand by mode.

image.png.3a81caee456508c6821c855091f5fc7c.png

 

This happens even if the Standby setting is set to Never.
image.png.da47e21ccf48e54e85fa16391cc5c46a.png

Link to comment
Share on other sites

Link to post
Share on other sites

Ok the issue seems to have solved by itself.
I experimented with the last digit of the fstab line, and set it to 2, without having realised that the path was not the same.
Both qbittorrent and plex were reporting missing files. So I set the last digit back to 0 and restarted the server.
Then I realized the path changed, reconfigured both programs, and now, the drive seems to be properly initializing from the start, and the programs are getting access.

I don't exactly know triggered this, but the drive was not mounted in that folder before today.
All I know is that a few days ago, there was a system update, and then today, there was a power outtage in my area.
I'm not exactly sure how any of these events can lead to changes in the system files, but it is what it is.

If I find something else, I'll post, but for now at east, my problem is no more.

Link to comment
Share on other sites

Link to post
Share on other sites

23 hours ago, HeLiOn said:

Ok the issue seems to have solved by itself.
I experimented with the last digit of the fstab line, and set it to 2, without having realised that the path was not the same.
Both qbittorrent and plex were reporting missing files. So I set the last digit back to 0 and restarted the server.
Then I realized the path changed, reconfigured both programs, and now, the drive seems to be properly initializing from the start, and the programs are getting access.

I don't exactly know triggered this, but the drive was not mounted in that folder before today.
All I know is that a few days ago, there was a system update, and then today, there was a power outtage in my area.
I'm not exactly sure how any of these events can lead to changes in the system files, but it is what it is.

If I find something else, I'll post, but for now at east, my problem is no more.

The 6th field in the fstab file is an instruction on order to check filesystems for data. by passing 0 you were instructing the system to treat it like a root filesystem which since it's ntfs probably caused an error and the system unmounted the drive to not cause any potential damage.

 

The system should ideally be / as 0

/boot as 1

everything else at least 2 and higher

 

this is described fairly well in the fstab manpage

man fstab

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×