I saw that it is a common practice to issue sync several times before
umount. I know it's a good practice, but is it really necessary?
If I copy a big chuck of file to my USB, then issue umount immediately,
will I lost any data? I think Linux will make sure all data are flushed
to USB before the umount is successfully finished, but I want a confirm.
How about umount swaps? umount really necessary?
Thanks
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i6vmo2$kug$1@dough.gmane.org">http://lists.debian.org/i6vmo2$kug$1@dough.gmane.org
09-17-2010, 12:32 PM
Timo Juhani Lindfors
umount without sync
T o n g <mlist4suntong@yahoo.com> writes:
> I saw that it is a common practice to issue sync several times before
> umount. I know it's a good practice, but is it really necessary?
There have been some bugs afaik and a sync has been a workaround.
> If I copy a big chuck of file to my USB, then issue umount immediately,
> will I lost any data? I think Linux will make sure all data are flushed
> to USB before the umount is successfully finished, but I want a confirm.
You should not lose any data if you wait for umount to succeed afaik.
> How about umount swaps? umount really necessary?
You don't mount swaps so you can't umount them either.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 84k4mk35zw.fsf@sauna.l.org">http://lists.debian.org/84k4mk35zw.fsf@sauna.l.org
09-17-2010, 12:35 PM
T o n g
umount without sync
On Fri, 17 Sep 2010 15:32:35 +0300, Timo Juhani Lindfors wrote:
>> How about umount swaps? umount really necessary?
>
> You don't mount swaps so you can't umount them either.
OK, I meant swapoff. Let's not focus on how it called but how it works.
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i6vnam$kug$2@dough.gmane.org">http://lists.debian.org/i6vnam$kug$2@dough.gmane.org
09-17-2010, 12:37 PM
T o n g
umount without sync
On Fri, 17 Sep 2010 15:32:35 +0300, Timo Juhani Lindfors wrote:
> There have been some bugs afaik and a sync has been a workaround.
>
>> . . .
>
> You should not lose any data if you wait for umount to succeed afaik.
So the "workaround" doesn't hold any more?
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i6vndr$kug$3@dough.gmane.org">http://lists.debian.org/i6vndr$kug$3@dough.gmane.org
09-17-2010, 12:41 PM
Jochen Schulz
umount without sync
T o n g:
>
> I saw that it is a common practice to issue sync several times before
> umount. I know it's a good practice, but is it really necessary?
No, it's completely unnecessary as umount does the sync for you. Just
don't unplug removable drives before umount returns.
> If I copy a big chuck of file to my USB, then issue umount immediately,
> will I lost any data?
No. Umount will do the sync and take (at least) the same time to return
as sync would do.
> How about umount swaps? umount really necessary?
That's a different story. When umounting swap, you are forcing the
system to re-read all of swap back into memory (if it's not there
anymore). But how often do you do that manually? Do you put swap on
removable drives!?
J.
--
I throw away plastics and think about the discoveries of future
archeologists.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
09-17-2010, 12:42 PM
Scott Ferguson
umount without sync
On 17/09/10 22:25, T o n g wrote:
> Hi,
>
> I saw that it is a common practice to issue sync several times before
> umount. I know it's a good practice, but is it really necessary?
>
> If I copy a big chuck of file to my USB, then issue umount immediately,
> will I lost any data? I think Linux will make sure all data are flushed
> to USB before the umount is successfully finished, but I want a confirm.
>
> How about umount swaps? umount really necessary?
>
> Thanks
>
umount has been answered already...
With the USB I'd add the obvious - don't use "umount -l"
Any unusual mount options you're using?
What is the file system?
umount swap? I suspect you mean "swapoff" (though I can't think of many
uses).
man swapon
Cheers
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C936240.3030006@gmail.com">http://lists.debian.org/4C936240.3030006@gmail.com
09-17-2010, 12:54 PM
Erwan David
umount without sync
On Fri, Sep 17, 2010 at 02:32:35PM CEST, Timo Juhani Lindfors <timo.lindfors@iki.fi> said:
> T o n g <mlist4suntong@yahoo.com> writes:
> > I saw that it is a common practice to issue sync several times before
> > umount. I know it's a good practice, but is it really necessary?
>
> There have been some bugs afaik and a sync has been a workaround.
>
> > If I copy a big chuck of file to my USB, then issue umount immediately,
> > will I lost any data? I think Linux will make sure all data are flushed
> > to USB before the umount is successfully finished, but I want a confirm.
>
> You should not lose any data if you wait for umount to succeed afaik.
>
> > How about umount swaps? umount really necessary?
>
> You don't mount swaps so you can't umount them either.
>
>
once a upon a time, in a far far away version of unix, umount might
return without having really fished writing data on disc. Thus admins
issued sync command(s) before unmounting to ensure the data was really
written.
Old storys even says that the magical incantation was
sync;sync;sync
wait completion
umount
--
Erwan
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100917125449.GB25266@trusted-logic.com">http://lists.debian.org/20100917125449.GB25266@trusted-logic.com
09-17-2010, 03:09 PM
Daniel Barclay
umount without sync
Scott Ferguson wrote:
On 17/09/10 22:25, T o n g wrote:
...
umount swap? I suspect you mean "swapoff" (though I can't think of many
uses).
There probably aren't many, but one is to reclaim disk space.
For example, if you use swap files (as opposed to partitions) and the file
system containing a swap file becomes full or low on space, if you're not
currently using too much swap space, you can use swapoff to stop using a
swap file, delete that file, and then have that space available for other
files.
Daniel
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
On Fri, 17 Sep 2010 22:42:40 +1000, Scott Ferguson wrote:
> Any unusual mount options you're using? What is the file system?
> umount swap? I suspect you mean "swapoff" (though I can't think of many
> uses).
Na, just curious.
Thanks everybody!
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i70484$go8$2@dough.gmane.org">http://lists.debian.org/i70484$go8$2@dough.gmane.org