Score:0

network drives not getting mounted after reboot

ng flag

we have a ubuntu 22.04 server. we are mounting network drives from a windows server. The drives are mounted correctly but don't get mounted back when we reboot the Ubuntu server.

below are the contents of the /etc/fstab file

//192.168.88.110/g /mnt/nl-dev-g cifs username=user,password=password,rw 0 0
//192.168.88.110/v /mnt/nl-dev-v cifs username=user,password=password,rw 0 0

but when we reboot the Ubuntu server, the drives do not get mounted on startup.

any help on what could be going wrong here would be really helpful.

Raffa avatar
jp flag
That is most likely because those mounts are attempted early before network comes up ... Please see for example [how to setup ubuntu that fstab runs after network is connected?](https://askubuntu.com/q/1208568)
Score:1
it flag

Network mounted drives vanish when the Windows server goes down.

When the Windows server becomes visible on the network, no notification is sent to Ubuntu (Windows doesn't remember what network mounts it was serving last time, so doesn't know who to notify).

Ubuntu doesn't want to simply resume the mountedness, because the filesystem being mounted (or the rules governing sharing on Windows) may have changed.

You could, for each of the mountpoints (in the background), loop on using the mountpoint command to check the status of the mount, then loop on "is Windows up?" (I'd ping -c3 Windows and check $STATUS), then remount (mount -o remount ...) the network drive.

man mountpoint ping bash mount sleep

There are probably better answers out there.

opensource-developer avatar
ng flag
hi waltinator, sorry for the confusion, my issue happens where ubuntu server restarts and not the windows server
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.