All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Forced umount
@ 2002-10-18 18:41 Carl-Daniel Hailfinger
  2002-10-18 19:20 ` Richard B. Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: Carl-Daniel Hailfinger @ 2002-10-18 18:41 UTC (permalink / raw)
  To: Alexander Viro, Tigran Aivazian; +Cc: linux-kernel

On Mon, 17 Sep 2001, Alexander Viro wrote:
 > > > On Sun, Sep 16, 2001, Alex Stewart wrote:
 > > > > Basically, I want a 'kill -KILL' for filesystems.
 >
 > Look at it that way: we have two actions that need to be done upon umount.
 >         1) detach it from the mountpoint(s)
 >         2) shut it down
 >
 > For the latter we need to have no active IO on that fs _and_ nothing
 > that could initiate such IO. We can separate #1 and #2, letting fs
 > shutdown happen when it's no longer busy. That's what MNT_DETACH
 > does.
 >
 > What you are asking for is different - you want fs-wide revoke().
 > That's all nice and dandy, but it's an independent problem and it
 > will take a _lot_ of work. Including work in fs drivers. It _is_
 > worth doing, but it's 2.5 stuff (along with normal revoke(2)).

Has this been done during 2.5 development or is the patch mentioned below
still the only option? And if it is the only option, what prevents it from
being included in 2.5? (I couldn't find anything about it in the archives.)
http://marc.theaimsgroup.com/?l=linux-kernel&m=103443466225915&w=4

To put it another way: Is there any chance to umount / cleanly if / is local
and /smbserver is a mounted remote SMB filesystem where the network link to
the SMB server just went down? (Without waiting half an hour for a timeout.)

Thanks for your answer

Carl-Daniel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Forced umount
  2002-10-18 18:41 Forced umount Carl-Daniel Hailfinger
@ 2002-10-18 19:20 ` Richard B. Johnson
  2002-10-18 20:25   ` Carl-Daniel Hailfinger
  0 siblings, 1 reply; 4+ messages in thread
From: Richard B. Johnson @ 2002-10-18 19:20 UTC (permalink / raw)
  To: Carl-Daniel Hailfinger; +Cc: Alexander Viro, Tigran Aivazian, linux-kernel

On Fri, 18 Oct 2002, Carl-Daniel Hailfinger wrote:
[SNIPPED,,,]
> 
> To put it another way: Is there any chance to umount / cleanly if / is local
> and /smbserver is a mounted remote SMB filesystem where the network link to
> the SMB server just went down? (Without waiting half an hour for a timeout.)
> 
> Thanks for your answer
> 
> Carl-Daniel
> 


You don't need to unmount a network drive (or any drive)
from a mount-point on a file-system before you umount that
file-system!

In other words, if I have quark:/tmp mounted on /tmp, I can
umount / without unmounting quark:/tmp. 

If the network file-system is r/o or otherwise immune to
incomplete operations, you can shut down your client system
with impunity.


For example:

Script started on Fri Oct 18 15:01:59 2002
# mount quark:/tmp /tmp
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sdb1             16603376   6434704   9325264  41% /
/dev/sdc1              6356624   1198700   4835020  20% /alt
/dev/sdc3              2253284   1768580    370244  83% /home/users
/dev/sda1              1048272    282768    765504  27% /dos/drive_C
/dev/sda5              1046224    181280    864944  17% /dos/drive_D
quark:/tmp              813598    430482    341082  56% /tmp
# umount /dos/drive_C
# umount /dos/drive_D
# umount /home/users
# umount /alt
# umount /
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sdb1             16603376   6434704   9325264  41% /
quark:/tmp              813598    430482    341082  56% /tmp
# > /xxx
bash: /xxx: Read-only file system
# > /tmp/xxx
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sdb1             16603376   6434704   9325264  41% /
quark:/tmp              813598    430482    341082  56% /tmp
# exit
exit

Script done on Fri Oct 18 15:05:39 2002

As you can see, '/' is now read-only, but /tmp is read-write.
It is save to hit the reset button or otherwise halt the CPU
at this time.

If your shutdown scripts or code 'think' you need to unmount
all the mount-points before you unmount '/', they are broken
and need to be fixed.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
The US military has given us many words, FUBAR, SNAFU, now ENRON.
Yes, top management were graduates of West Point and Annapolis.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Forced umount
  2002-10-18 19:20 ` Richard B. Johnson
@ 2002-10-18 20:25   ` Carl-Daniel Hailfinger
  2002-10-19 14:28     ` Denis Vlasenko
  0 siblings, 1 reply; 4+ messages in thread
From: Carl-Daniel Hailfinger @ 2002-10-18 20:25 UTC (permalink / raw)
  To: root; +Cc: Alexander Viro, Tigran Aivazian, linux-kernel

Richard B. Johnson wrote:
> On Fri, 18 Oct 2002, Carl-Daniel Hailfinger wrote:
> [SNIPPED,,,]
> 
>>To put it another way: Is there any chance to umount / cleanly if / is local
>>and /smbserver is a mounted remote SMB filesystem where the network link to
>>the SMB server just went down? (Without waiting half an hour for a timeout.)
>>
> You don't need to unmount a network drive (or any drive)
> from a mount-point on a file-system before you umount that
> file-system!
> 
> In other words, if I have quark:/tmp mounted on /tmp, I can
> umount / without unmounting quark:/tmp. 
> 
 > [SNIPPED]

Does not work here.

# mount /dev/fd0 /floppy/
# mount /dev/hda1 /floppy/test/
# umount /floppy/
umount: /media/floppy: device is busy
# touch /floppy/foo
umount -f /floppy/
umount2: Device or resource busy
umount: /dev/fd0: not mounted
umount: /media/floppy: Illegal seek
# touch /floppy/foo2
# mount
/dev/fd0 on /floppy type vfat (rw,sync)
/dev/hda1 on /floppy/test type vfat (rw)

In other words, your suggested method does not work here. (Kernel 2.4.18, 
util-linux-2.11n)

# mount -o remount,ro /floppy/
/dev/fd0 on /floppy type vfat (ro,sync)
/dev/hda1 on /floppy/test type vfat (rw)

This, however, seems to work.

Regards,

Carl-Daniel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Forced umount
  2002-10-18 20:25   ` Carl-Daniel Hailfinger
@ 2002-10-19 14:28     ` Denis Vlasenko
  0 siblings, 0 replies; 4+ messages in thread
From: Denis Vlasenko @ 2002-10-19 14:28 UTC (permalink / raw)
  To: Carl-Daniel Hailfinger; +Cc: linux-kernel

On 18 October 2002 20:25, Carl-Daniel Hailfinger wrote:
> Richard B. Johnson wrote:
> > In other words, if I have quark:/tmp mounted on /tmp, I can
> > umount / without unmounting quark:/tmp.

You can remount ro. I doubt you can umount.

> >
> > [SNIPPED]
>
> Does not work here.
>
> # mount /dev/fd0 /floppy/
> # mount /dev/hda1 /floppy/test/
> # umount /floppy/
> umount: /media/floppy: device is busy
> # touch /floppy/foo
> umount -f /floppy/
> umount2: Device or resource busy
> umount: /dev/fd0: not mounted
> umount: /media/floppy: Illegal seek
> # touch /floppy/foo2
> # mount
> /dev/fd0 on /floppy type vfat (rw,sync)
> /dev/hda1 on /floppy/test type vfat (rw)
>
> In other words, your suggested method does not work here. (Kernel
> 2.4.18, util-linux-2.11n)
>
> # mount -o remount,ro /floppy/
> /dev/fd0 on /floppy type vfat (ro,sync)
> /dev/hda1 on /floppy/test type vfat (rw)
>
> This, however, seems to work.

umount / is special: in fact it does remount ro.
So you two do the same thing.
--
vda

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-10-19  9:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-18 18:41 Forced umount Carl-Daniel Hailfinger
2002-10-18 19:20 ` Richard B. Johnson
2002-10-18 20:25   ` Carl-Daniel Hailfinger
2002-10-19 14:28     ` Denis Vlasenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.