* [gentoo-user] NFS mount not properly unmounting during shutdown/reboot
@ 2013-06-09 20:23 Tanstaafl
2013-06-10 10:34 ` Tanstaafl
0 siblings, 1 reply; 8+ messages in thread
From: Tanstaafl @ 2013-06-09 20:23 UTC (permalink / raw
To: gentoo-user
Hi all,
Ok, now would like to investigate this to see why this is causing my
shutdowns/reboots to hang with the last thing on the screen being
'unmounting /var...'
Anyone got any idea where to look? I sure don't...
I see a googling session in my near future, but any pointers that may
help expedite this would be appreciated...
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] NFS mount not properly unmounting during shutdown/reboot
2013-06-09 20:23 [gentoo-user] NFS mount not properly unmounting during shutdown/reboot Tanstaafl
@ 2013-06-10 10:34 ` Tanstaafl
2013-06-10 10:38 ` Alan McKinnon
0 siblings, 1 reply; 8+ messages in thread
From: Tanstaafl @ 2013-06-10 10:34 UTC (permalink / raw
To: gentoo-user
Sorry, that wasn't much of a problem description...
I have a system that I often manually mount and unmount some NFS mounts...
If I try to do a reboot or shutdown of the system while one of these NFS
mounts is mounted, it hangs with the last thing showing on the screen as
"Unmounting /var..."
I've let it sit there for at least half an hour, maybe more, so I don't
think it would ever continue...
If I remember to manually unmount the NFS mount before initiating the
reboot/shutdown, it doesn't hang.
I'm guessing that it hangs at /var because it is the last mountpoint
defined in my /etc/fstab?
So... any pointers on where to look for a resolution would be appreciated.
Resolution being, if I can manually unmount it fine, why can't the
system auto-unmount it?
Thanks,
Charles
On 2013-06-09 4:23 PM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
> Hi all,
>
> Ok, now would like to investigate this to see why this is causing my
> shutdowns/reboots to hang with the last thing on the screen being
> 'unmounting /var...'
>
> Anyone got any idea where to look? I sure don't...
>
> I see a googling session in my near future, but any pointers that may
> help expedite this would be appreciated...
>
> Thanks!
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] NFS mount not properly unmounting during shutdown/reboot
2013-06-10 10:34 ` Tanstaafl
@ 2013-06-10 10:38 ` Alan McKinnon
2013-06-10 14:36 ` Tanstaafl
0 siblings, 1 reply; 8+ messages in thread
From: Alan McKinnon @ 2013-06-10 10:38 UTC (permalink / raw
To: gentoo-user
On 10/06/2013 12:34, Tanstaafl wrote:
> Sorry, that wasn't much of a problem description...
>
> I have a system that I often manually mount and unmount some NFS mounts...
>
> If I try to do a reboot or shutdown of the system while one of these NFS
> mounts is mounted, it hangs with the last thing showing on the screen as
> "Unmounting /var..."
>
> I've let it sit there for at least half an hour, maybe more, so I don't
> think it would ever continue...
>
> If I remember to manually unmount the NFS mount before initiating the
> reboot/shutdown, it doesn't hang.
>
> I'm guessing that it hangs at /var because it is the last mountpoint
> defined in my /etc/fstab?
>
> So... any pointers on where to look for a resolution would be appreciated.
>
> Resolution being, if I can manually unmount it fine, why can't the
> system auto-unmount it?
Let's get some facts to work with
can you post your fstab, rc-update show, /etc/exports on the NFS server
and the mount options used for the NFS mounts?
>
> Thanks,
>
> Charles
>
> On 2013-06-09 4:23 PM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
>> Hi all,
>>
>> Ok, now would like to investigate this to see why this is causing my
>> shutdowns/reboots to hang with the last thing on the screen being
>> 'unmounting /var...'
>>
>> Anyone got any idea where to look? I sure don't...
>>
>> I see a googling session in my near future, but any pointers that may
>> help expedite this would be appreciated...
>>
>> Thanks!
>>
>
>
--
Alan McKinnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] NFS mount not properly unmounting during shutdown/reboot
2013-06-10 10:38 ` Alan McKinnon
@ 2013-06-10 14:36 ` Tanstaafl
2013-06-10 20:29 ` Alan McKinnon
0 siblings, 1 reply; 8+ messages in thread
From: Tanstaafl @ 2013-06-10 14:36 UTC (permalink / raw
To: gentoo-user
On 2013-06-10 6:38 AM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
> On 10/06/2013 12:34, Tanstaafl wrote:
>> If I remember to manually unmount the NFS mount before initiating the
>> reboot/shutdown, it doesn't hang.
>>
>> I'm guessing that it hangs at /var because it is the last mountpoint
>> defined in my /etc/fstab?
>>
>> So... any pointers on where to look for a resolution would be appreciated.
>>
>> Resolution being, if I can manually unmount it fine, why can't the
>> system auto-unmount it?
> Let's get some facts to work with
>
> can you post your fstab,
Fyi, I don't have either of these auto-mounting in fstab, but here it is:
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to
# opts.
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext3 noatime 0 1
/dev/sda4 /backups ext3 noatime 0 2
/dev/vg2/home /home reiserfs noatime 0 0
/dev/vg2/usr /usr reiserfs noatime 0 0
/dev/vg2/var /var reiserfs noatime 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
/dev/fd0 /mnt/floppy auto noauto 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
> rc-update show,
# rc-update show
apache2 | default
bootmisc | boot
consolefont | boot
devfs | sysinit
device-mapper | boot
dmesg | sysinit
dovecot | default
fsck | boot
hostname | boot
hwclock | boot
iptables | default
keymaps | boot
killprocs | shutdown
local | default nonetwork
localmount | boot
lvm | boot
mailman | default
modules | boot
mount-ro | shutdown
mtab | boot
mysql | default
net.eth0 | default
net.lo | boot
netmount | default
ntp-client | default
ntpd | default
postfix | default
procfs | boot
root | boot
rpcbind | default
savecache | shutdown
sshd | default
swap | boot
swapfiles | boot
sysctl | boot
sysfs | sysinit
syslog-ng | default
termencoding | boot
tmpfiles.setup | boot
udev | sysinit
udev-mount | sysinit
udev-postmount | default
urandom | boot
vixie-cron | default
xinetd | default
> /etc/exports on the NFS server
Well... there is no 'NFS Server', these are two QNAP boxes that I can
enable NFS on... I guess there may be a way to command-line into them to
check that, so if it critical to answering the question, I'll see what I
can do. All I know for sure is, if I manually unmount it with umount
/mnt/qnap-mountpoint, it unmounts immediately.
> and the mount options used for the NFS mounts?
The command I use to mount it is:
mount -t nfs -o mountproto=tcp qnap1:/backups /mnt/qnap1
Thanks Alan, hopefully something jumps out at you...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] NFS mount not properly unmounting during shutdown/reboot
2013-06-10 14:36 ` Tanstaafl
@ 2013-06-10 20:29 ` Alan McKinnon
2013-06-11 11:46 ` SOLVED - " Tanstaafl
2013-06-11 12:38 ` Thanasis
0 siblings, 2 replies; 8+ messages in thread
From: Alan McKinnon @ 2013-06-10 20:29 UTC (permalink / raw
To: gentoo-user
On 10/06/2013 16:36, Tanstaafl wrote:
> On 2013-06-10 6:38 AM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
>> On 10/06/2013 12:34, Tanstaafl wrote:
>>> If I remember to manually unmount the NFS mount before initiating the
>>> reboot/shutdown, it doesn't hang.
>>>
>>> I'm guessing that it hangs at /var because it is the last mountpoint
>>> defined in my /etc/fstab?
>>>
>>> So... any pointers on where to look for a resolution would be
>>> appreciated.
>>>
>>> Resolution being, if I can manually unmount it fine, why can't the
>>> system auto-unmount it?
>
>> Let's get some facts to work with
>>
>> can you post your fstab,
>
> Fyi, I don't have either of these auto-mounting in fstab, but here it is:
>
> # <fs> <mountpoint> <type> <opts> <dump/pass>
>
> # NOTE: If your BOOT partition is ReiserFS, add the notail option to
> # opts.
> /dev/sda1 /boot ext2 noauto,noatime 1 2
> /dev/sda2 none swap sw 0 0
> /dev/sda3 / ext3 noatime 0 1
> /dev/sda4 /backups ext3 noatime 0 2
> /dev/vg2/home /home reiserfs noatime 0 0
> /dev/vg2/usr /usr reiserfs noatime 0 0
> /dev/vg2/var /var reiserfs noatime 0 0
> /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
> /dev/fd0 /mnt/floppy auto noauto 0 0
>
> # NOTE: The next line is critical for boot!
> none /proc proc defaults 0 0
>
> # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
> # POSIX shared memory (shm_open, shm_unlink).
> # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
> # use almost no memory if not populated with files)
> shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
>
>> rc-update show,
>
> # rc-update show
> apache2 | default
> bootmisc | boot
> consolefont | boot
> devfs | sysinit
> device-mapper | boot
> dmesg | sysinit
> dovecot | default
> fsck | boot
> hostname | boot
> hwclock | boot
> iptables | default
> keymaps | boot
> killprocs | shutdown
> local | default nonetwork
> localmount | boot
> lvm | boot
> mailman | default
> modules | boot
> mount-ro | shutdown
> mtab | boot
> mysql | default
> net.eth0 | default
> net.lo | boot
> netmount | default
> ntp-client | default
> ntpd | default
> postfix | default
> procfs | boot
> root | boot
> rpcbind | default
> savecache | shutdown
> sshd | default
> swap | boot
> swapfiles | boot
> sysctl | boot
> sysfs | sysinit
> syslog-ng | default
> termencoding | boot
> tmpfiles.setup | boot
> udev | sysinit
> udev-mount | sysinit
> udev-postmount | default
> urandom | boot
> vixie-cron | default
> xinetd | default
>
>
>> /etc/exports on the NFS server
>
> Well... there is no 'NFS Server', these are two QNAP boxes that I can
> enable NFS on... I guess there may be a way to command-line into them to
> check that, so if it critical to answering the question, I'll see what I
> can do. All I know for sure is, if I manually unmount it with umount
> /mnt/qnap-mountpoint, it unmounts immediately.
>
>> and the mount options used for the NFS mounts?
>
> The command I use to mount it is:
>
> mount -t nfs -o mountproto=tcp qnap1:/backups /mnt/qnap1
>
> Thanks Alan, hopefully something jumps out at you...
>
I'm not familiar with QNAP but there's nothing for it in fstab, so I
presume running the relevant app on your end magically mounts the remote
share without consulting fstab?
It all looks very much like your init system is simply not umounting the
shares at all so when it tries to remount / ro near the end, this fails.
The simplest way around this is to add nfsmount to the default runlevel.
This will work today as it reads /etc/fstab at startup to mount stuff
and your fstab has no nfs shares in it.
It reads /etc/mtab at shutdown to umount stuff and your QNAP share will
be in that file.
I simulated it here and that's the result I got. But this is gentoo, and
everything might change tomorrow so YMMV :-)
You could also write a scriptlet to do the umount and put it in
/etc/conf.d/local - see /etc/init.d/local for details
--
Alan McKinnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* SOLVED - Re: [gentoo-user] NFS mount not properly unmounting during shutdown/reboot
2013-06-10 20:29 ` Alan McKinnon
@ 2013-06-11 11:46 ` Tanstaafl
2013-06-11 12:38 ` Thanasis
1 sibling, 0 replies; 8+ messages in thread
From: Tanstaafl @ 2013-06-11 11:46 UTC (permalink / raw
To: gentoo-user
On 2013-06-10 4:29 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
> The simplest way around this is to add nfsmount to the default runlevel.
> This will work today as it reads /etc/fstab at startup to mount stuff
> and your fstab has no nfs shares in it.
> It reads /etc/mtab at shutdown to umount stuff and your QNAP share will
> be in that file.
Cool, I'll do that. I'll still try to remember to umount it manually
because I don't like testing something that might cause my system to not
safely/fully shutdown, but this way hopefully if I ever do forget, it
will handle it for me.
> I simulated it here and that's the result I got. But this is gentoo, and
> everything might change tomorrow so YMMV :-)
Lol, yeah, there are never any guarantees...
> You could also write a scriptlet to do the umount and put it in
> /etc/conf.d/local - see /etc/init.d/local for details
I may look into that, but some reading tells me you are right and that
adding nfsmount to the default runlevel should work.
Thanks a lot for your time Alan.
Charles
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] NFS mount not properly unmounting during shutdown/reboot
2013-06-10 20:29 ` Alan McKinnon
2013-06-11 11:46 ` SOLVED - " Tanstaafl
@ 2013-06-11 12:38 ` Thanasis
2013-06-11 13:03 ` Alan McKinnon
1 sibling, 1 reply; 8+ messages in thread
From: Thanasis @ 2013-06-11 12:38 UTC (permalink / raw
To: gentoo-user
on 06/10/2013 11:29 PM Alan McKinnon wrote the following:
<snip>
>
> You could also write a scriptlet to do the umount and put it in
> /etc/conf.d/local - see /etc/init.d/local for details
>
Actually /etc/conf.d/local has been replaced by files you put in
directory /etc/local.d/
ie:
/etc/local.d/*.start
and
/etc/local.d/*.stop
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] NFS mount not properly unmounting during shutdown/reboot
2013-06-11 12:38 ` Thanasis
@ 2013-06-11 13:03 ` Alan McKinnon
0 siblings, 0 replies; 8+ messages in thread
From: Alan McKinnon @ 2013-06-11 13:03 UTC (permalink / raw
To: gentoo-user
On 11/06/2013 14:38, Thanasis wrote:
> on 06/10/2013 11:29 PM Alan McKinnon wrote the following:
> <snip>
>>
>> You could also write a scriptlet to do the umount and put it in
>> /etc/conf.d/local - see /etc/init.d/local for details
>>
>
> Actually /etc/conf.d/local has been replaced by files you put in
> directory /etc/local.d/
> ie:
> /etc/local.d/*.start
> and
> /etc/local.d/*.stop
>
Your right - I mistakenly copy-pasted the wrong path from /etc/init.d/local
my bad
--
Alan McKinnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-06-11 13:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-09 20:23 [gentoo-user] NFS mount not properly unmounting during shutdown/reboot Tanstaafl
2013-06-10 10:34 ` Tanstaafl
2013-06-10 10:38 ` Alan McKinnon
2013-06-10 14:36 ` Tanstaafl
2013-06-10 20:29 ` Alan McKinnon
2013-06-11 11:46 ` SOLVED - " Tanstaafl
2013-06-11 12:38 ` Thanasis
2013-06-11 13:03 ` Alan McKinnon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox