lkml.org 
[lkml]   [2002]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Unmounting a busy RO-Filesystem
Date
On 16 December 2002 23:06, Bourne wrote:
> I have 3 partitions. /dev/hda3 for '/' , /dev/hda1 for /boot and
> /dev/hda2 for swap.
>
> I boot & then i do a CTRL+ALT+SYSRQ+U. '/' and '/boot' are now
> remounted ReadOnly.
>
> 1) cd '/boot'
> 2) umount /boot ----> This gives me an error "Device Busy"

How do you imagine unmounting a directory when you are in it? ;)

> 3) cd /
> 4) umount / -------> No error

This is special case: "umount /" == "mount -o remount,ro /"

> 5) echo $? -----> outputs '0' indicating success. !!!!!!!!
>
> When i do the above by skipping the Sysrq part, i get the usual
> expected errors.

Without SysRq,

# mount -o remount,ro /

fails 'coz you have files open for writing.
You might ask how kernel can do that ro remount with SysRq?
It cheats! ;)
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.058 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site