Re: mount -u effects

2012-12-11 Thread takCoder
nice and quick point! thanks a lot :)

 You could have found it out by refering to man mount. :-)
yes, it seems to be right! ;)

 So I'd say you should always take care that write operations are finished
properly (and so brought to an end)

but, how to become sure my write operations are completely finished?? by
obtaining some sort of sleep time before my restart command in my upgrade
shell for example? or there are other special ways to do so?

Best Regards,
t.a.k



On Tue, Dec 11, 2012 at 11:13 AM, Polytropon free...@edvax.de wrote:

 On Tue, 11 Dec 2012 10:55:10 +0330, takCoder wrote:
  via googling, i found out that i can use mount -u on the mentioned
  device, and then after doing whatsoever needed, when i restart my server
  the ro permission will be back via applying old fstab..

 You could have found it out by refering to man mount. :-)



  but i have no idea what kind of effects it may have on my server.. i
  couldn't find anything but suggestions about not to use this so often..
 and
  i really need to know why?? cause my bsd server is not allowed to be
 missed
  almost at all..
 
  i think that because this -u option is just increasing my permissions in
  this case, there won't be a danger for my server. is that true?!

 There are _few_ side effects that _may_ apply when using the -u
 option. From the manual:

 The -u flag indicates that the status of an already mounted file
 system should be changed.  Any of the options discussed above
 (the -o option) may be changed; also a file system can be changed
 from read-only to read-write or vice versa.  An attempt to change
 from read-write to read-only will fail if any files on the file
 system are currently open for writing unless the -f flag is also
 specified.  The set of options is determined by applying the
 options specified in the argument to -o and finally applying the
 -r or -w option.

 So I'd say you should always take care that write operations
 are finished properly (and so brought to an end).


 --
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mount -u effects

2012-12-11 Thread Polytropon
On Tue, 11 Dec 2012 11:39:24 +0330, takCoder wrote:
 but, how to become sure my write operations are completely finished?? by
 obtaining some sort of sleep time before my restart command in my upgrade
 shell for example? or there are other special ways to do so?

Basically, no user action is needed. If you perform an umount
(or change back to -o ro), all remaining buffers will be
flushed, so writes are eventually performed at this time.
If such an operation hasn't been finished yet, mount will
complain, and you have some time to wait and try again. :-)

In case you're using -f (force), this specific check will
not be performed, so it shouldn't be used.

Similarly, the sync command will cause all buffers to be
flushed. The file system driver will then let the device
driver perform the operation, which should be finished in
finite time (usually below a second). See man sync for
details.

You could always use the lsof command to check if there
are still files open for writing on the respective file
system.

At the time you're getting your command prompt back, the
write operation is likely to be finished. Add some time typing
the mount command, and you should be fine. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mount -u effects

2012-12-10 Thread Polytropon
On Tue, 11 Dec 2012 10:55:10 +0330, takCoder wrote:
 via googling, i found out that i can use mount -u on the mentioned
 device, and then after doing whatsoever needed, when i restart my server
 the ro permission will be back via applying old fstab..

You could have found it out by refering to man mount. :-)



 but i have no idea what kind of effects it may have on my server.. i
 couldn't find anything but suggestions about not to use this so often.. and
 i really need to know why?? cause my bsd server is not allowed to be missed
 almost at all..
 
 i think that because this -u option is just increasing my permissions in
 this case, there won't be a danger for my server. is that true?!

There are _few_ side effects that _may_ apply when using the -u
option. From the manual:

The -u flag indicates that the status of an already mounted file
system should be changed.  Any of the options discussed above
(the -o option) may be changed; also a file system can be changed
from read-only to read-write or vice versa.  An attempt to change
from read-write to read-only will fail if any files on the file
system are currently open for writing unless the -f flag is also
specified.  The set of options is determined by applying the
options specified in the argument to -o and finally applying the
-r or -w option.

So I'd say you should always take care that write operations
are finished properly (and so brought to an end).


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org