Should I unmount a USB drive before unplugging it?
When you unplug an USB drive without unmounting, your OS warns you about how dreadful could be such operation for your devices (I'm on OSX).
I usually follow the advice, unmounting before unplugging, but it happened many times (thousands) that, at the end of my tasks, I just unplugged (Hd storage, Cell phones, etc..) and I never ever noticed corrupted data on my devices.
Am I lucky or can this annoying warning just be ignored?
usb unmounting
|
show 8 more comments
When you unplug an USB drive without unmounting, your OS warns you about how dreadful could be such operation for your devices (I'm on OSX).
I usually follow the advice, unmounting before unplugging, but it happened many times (thousands) that, at the end of my tasks, I just unplugged (Hd storage, Cell phones, etc..) and I never ever noticed corrupted data on my devices.
Am I lucky or can this annoying warning just be ignored?
usb unmounting
2
Not posting an answer since my data is totally anecdotal. I have been a sysadmin and then a software developer for about 15 years and many of my friends is in the same trade and I can't remember one person complaining about data-loss from unplugging a USB device without unmounting. Just use some common sense. Don't pull it out while you are copying/moving stuff.
– Nifle
Aug 25 '10 at 22:30
@Nifle that's what i'm talking about :) (actually, i have specified "at the end of my tasks")
– systempuntoout
Aug 25 '10 at 22:46
1
I'd like to offer an additional anecdotal story - in the lab's at Uni people would (obviously) plug USB sticks in for transporting work about. We didn't have the relevant permissions to unmount (don't ask..) and after the first term several large important looking signs appeared telling people not to use the USB ports in the keyboards, this was because they kept corrupting sticks (I knew personally of at least four incidents). But, the ones in the base units used in the same way (without unmount permissions) seemed to work fine!
– DMA57361
Aug 26 '10 at 8:11
1
@DMA57361, If you don't have permissions to unmount (I wonder how you mounted then in first place then... bad bad admin), you can anyways runsync
, wait for a few seconds and then unplug.
– user39559
Aug 26 '10 at 10:39
2
another prize?! who's muffin ya butterin? ;-) here, have another vote...
– Sky Sanders
Sep 6 '10 at 11:33
|
show 8 more comments
When you unplug an USB drive without unmounting, your OS warns you about how dreadful could be such operation for your devices (I'm on OSX).
I usually follow the advice, unmounting before unplugging, but it happened many times (thousands) that, at the end of my tasks, I just unplugged (Hd storage, Cell phones, etc..) and I never ever noticed corrupted data on my devices.
Am I lucky or can this annoying warning just be ignored?
usb unmounting
When you unplug an USB drive without unmounting, your OS warns you about how dreadful could be such operation for your devices (I'm on OSX).
I usually follow the advice, unmounting before unplugging, but it happened many times (thousands) that, at the end of my tasks, I just unplugged (Hd storage, Cell phones, etc..) and I never ever noticed corrupted data on my devices.
Am I lucky or can this annoying warning just be ignored?
usb unmounting
usb unmounting
edited Nov 15 '10 at 9:55
systempuntoout
asked Aug 25 '10 at 21:09
systempuntooutsystempuntoout
4091515
4091515
2
Not posting an answer since my data is totally anecdotal. I have been a sysadmin and then a software developer for about 15 years and many of my friends is in the same trade and I can't remember one person complaining about data-loss from unplugging a USB device without unmounting. Just use some common sense. Don't pull it out while you are copying/moving stuff.
– Nifle
Aug 25 '10 at 22:30
@Nifle that's what i'm talking about :) (actually, i have specified "at the end of my tasks")
– systempuntoout
Aug 25 '10 at 22:46
1
I'd like to offer an additional anecdotal story - in the lab's at Uni people would (obviously) plug USB sticks in for transporting work about. We didn't have the relevant permissions to unmount (don't ask..) and after the first term several large important looking signs appeared telling people not to use the USB ports in the keyboards, this was because they kept corrupting sticks (I knew personally of at least four incidents). But, the ones in the base units used in the same way (without unmount permissions) seemed to work fine!
– DMA57361
Aug 26 '10 at 8:11
1
@DMA57361, If you don't have permissions to unmount (I wonder how you mounted then in first place then... bad bad admin), you can anyways runsync
, wait for a few seconds and then unplug.
– user39559
Aug 26 '10 at 10:39
2
another prize?! who's muffin ya butterin? ;-) here, have another vote...
– Sky Sanders
Sep 6 '10 at 11:33
|
show 8 more comments
2
Not posting an answer since my data is totally anecdotal. I have been a sysadmin and then a software developer for about 15 years and many of my friends is in the same trade and I can't remember one person complaining about data-loss from unplugging a USB device without unmounting. Just use some common sense. Don't pull it out while you are copying/moving stuff.
– Nifle
Aug 25 '10 at 22:30
@Nifle that's what i'm talking about :) (actually, i have specified "at the end of my tasks")
– systempuntoout
Aug 25 '10 at 22:46
1
I'd like to offer an additional anecdotal story - in the lab's at Uni people would (obviously) plug USB sticks in for transporting work about. We didn't have the relevant permissions to unmount (don't ask..) and after the first term several large important looking signs appeared telling people not to use the USB ports in the keyboards, this was because they kept corrupting sticks (I knew personally of at least four incidents). But, the ones in the base units used in the same way (without unmount permissions) seemed to work fine!
– DMA57361
Aug 26 '10 at 8:11
1
@DMA57361, If you don't have permissions to unmount (I wonder how you mounted then in first place then... bad bad admin), you can anyways runsync
, wait for a few seconds and then unplug.
– user39559
Aug 26 '10 at 10:39
2
another prize?! who's muffin ya butterin? ;-) here, have another vote...
– Sky Sanders
Sep 6 '10 at 11:33
2
2
Not posting an answer since my data is totally anecdotal. I have been a sysadmin and then a software developer for about 15 years and many of my friends is in the same trade and I can't remember one person complaining about data-loss from unplugging a USB device without unmounting. Just use some common sense. Don't pull it out while you are copying/moving stuff.
– Nifle
Aug 25 '10 at 22:30
Not posting an answer since my data is totally anecdotal. I have been a sysadmin and then a software developer for about 15 years and many of my friends is in the same trade and I can't remember one person complaining about data-loss from unplugging a USB device without unmounting. Just use some common sense. Don't pull it out while you are copying/moving stuff.
– Nifle
Aug 25 '10 at 22:30
@Nifle that's what i'm talking about :) (actually, i have specified "at the end of my tasks")
– systempuntoout
Aug 25 '10 at 22:46
@Nifle that's what i'm talking about :) (actually, i have specified "at the end of my tasks")
– systempuntoout
Aug 25 '10 at 22:46
1
1
I'd like to offer an additional anecdotal story - in the lab's at Uni people would (obviously) plug USB sticks in for transporting work about. We didn't have the relevant permissions to unmount (don't ask..) and after the first term several large important looking signs appeared telling people not to use the USB ports in the keyboards, this was because they kept corrupting sticks (I knew personally of at least four incidents). But, the ones in the base units used in the same way (without unmount permissions) seemed to work fine!
– DMA57361
Aug 26 '10 at 8:11
I'd like to offer an additional anecdotal story - in the lab's at Uni people would (obviously) plug USB sticks in for transporting work about. We didn't have the relevant permissions to unmount (don't ask..) and after the first term several large important looking signs appeared telling people not to use the USB ports in the keyboards, this was because they kept corrupting sticks (I knew personally of at least four incidents). But, the ones in the base units used in the same way (without unmount permissions) seemed to work fine!
– DMA57361
Aug 26 '10 at 8:11
1
1
@DMA57361, If you don't have permissions to unmount (I wonder how you mounted then in first place then... bad bad admin), you can anyways run
sync
, wait for a few seconds and then unplug.– user39559
Aug 26 '10 at 10:39
@DMA57361, If you don't have permissions to unmount (I wonder how you mounted then in first place then... bad bad admin), you can anyways run
sync
, wait for a few seconds and then unplug.– user39559
Aug 26 '10 at 10:39
2
2
another prize?! who's muffin ya butterin? ;-) here, have another vote...
– Sky Sanders
Sep 6 '10 at 11:33
another prize?! who's muffin ya butterin? ;-) here, have another vote...
– Sky Sanders
Sep 6 '10 at 11:33
|
show 8 more comments
11 Answers
11
active
oldest
votes
Either you're lucky to never have had corrupted data, or you're unlucky to never had noticed your data was corrupted.
When you perform an action that should write on a disk, most operating systems put the write operation into a queue. From time to time, they flush the queue. (I'm calling it a queue here, but actually operations can be performed out of order, operating systems do this when it's faster and gives the same final result.) This can make the write operations a lot faster, both because the system tries to perform them when it doesn't have anything better to do and because it can group them intelligently.
If you happen to unplug your device before everything has been written, you may miss the latest data. Worse, if the OS has been performing operations out of order, you may put your device into an inconsistent state and lose more than the latest data.
Some operating systems go into a more conservative (but slower) mode for removable devices, to reduce the risks associated with unplugging the device before it has been unmounted.
ADDED:
Doing operations out of order is sometimes not just a matter of speed. Cheap flash media (that doesn't to sector reallocation at the hardware level) has a limitation on the number of times you can write over any given sector. If you naively write all changes as they happen, this can kill the sectors that contain the file allocation table on a (V)FAT filesystem (the most common case for removable drives) or the journal on a typical modern filesystem. (See e.g. this discussion of sync
on the Linux Kernel mailing list.) Here, not updating the FAT or journal every time a file is written to is not just a big performance gain, it's also good for the lifetime of the hardware.
Until recently, Linux only gave a choice between sync
(write all changes as they happen) and async
(write whenever it's convenient). Recent versions introduce the flush
option for FAT filesystems, which is somewhere in between (flush all delayed writes as soon as the disk becomes inactive); it's on by default in Ubuntu 10.04.
On a different note, unmounting a removable drive ensures that no application has a file open. If you don't unmount before unplugging, you won't notice if you have unsaved data until it's too late. Unmounting while a file is open also increases the chance of corruption, both at the filesystem level (the OS may have queued some operations until the file is closed) and at the application level (e.g. if the application puts a lock file, it won't be removed).
3
Go forsync
mounting! :D
– BloodPhilia
Aug 25 '10 at 21:26
Is this still an issue when using a journaled filesystem?
– NReilingh
Aug 25 '10 at 23:36
1
@NRei Yes. Journaled filesystems just prevent corruption of data if something goes wrong in the middle of the writing process. It doesn't prevent corruption or missing data due to the writing not having taken place at all because the drive was unplugged before the OS got around to write the data.
– deceze
Aug 26 '10 at 1:47
@BloodPhilia:sync
sometimes hurts more than performance, see my edit.
– Gilles
Aug 26 '10 at 19:28
2
Agreed - systempuntoout has been lucky so far. I have lost quite a bit of work by not unmounting before removing a flash drive. You can save all you want in your application, but if the writes are buffered, it hasn't happened where it matters. You only get burned by this once.
– brice
Sep 21 '10 at 9:01
|
show 3 more comments
The main risk you have is delayed writing. For various reasons the system doesn't always write the data to a disk when it is told to and keeps it instead in memory. When you unmount it, it makes sure all that is then written to the disk (and makes sure it isn't currently being used). You would probably know if you are currently writing to the disk, but you might not realize that your OS hasn't written everything you previously told it to write.
The frequency of this depends on your system and what your doing with the USB drive. If unmounts are usually slow and you can hear the writing noise coming from the drive, then you should probably continue to unmount. If unmounts are always instant though, then feel free to skip this step at your own risk.
4
I believe most OS'es disable this sort of delayed write for removable drives, though.
– Jeff Atwood
Aug 25 '10 at 23:33
@Jeff, that would certainly be the sensible way to treat USB drives. Is there a way to check that? In Windows 7?
– Torben Gundtofte-Bruun
Aug 26 '10 at 6:48
@torbengb: Actually, it's not always sensible — see my edited answer.
– Gilles
Aug 26 '10 at 19:29
My USB if I go into the policies options, it's defaulted to use Quick Removal which says in the description that Safety Remove is not needed. The other option is Best Performance which is not the default but would require you to safety remove. So for most the default would be quick remove meaning not needing to safety remove.
– ComputerLocus
Apr 25 '12 at 1:47
@Fogest, that’s true, but it’s also specific to Windows; the OP is using OSX. Of course, I’m sure that OSX does something similar.
– Synetech
Dec 19 '13 at 21:31
add a comment |
I work in a casino and a lot of slot machine manufacturers now use USB thumbdrives to install the bin files (games and OS) onto the slot machine.
A slot machine that has corrupt firmware may or may not award thousands if not tens of thousands of dollars is great incentive to make sure the integrity of the data on that USB drive is not corrupt. Compliance/Regulator checks it anyway but it still saves work to do it right the first time.
In a corporate environment data loss could cost millions and personally you may lose something irreplaceable.
I'd certainly would make sure to unmount, safely remove or whatever terminology is used to make sure that any USB device with data on it is safe to remove.
1
But, copying mp3s to listen to, not so much.
– cgp
Aug 26 '10 at 3:15
add a comment |
Driving a car without wearing a seat belt can be safe for most of the time. But when something goes haywire, you thank you used it.
So yes. Even if most of the time just removing the USB drive without unmounting it can be safe, it definitely is not recommended.
add a comment |
I don't think anyone has addressed the issue of read vs write access. If you haven't copied anything to the flash drive, or opened a file on it for writing, you are probably safe just removing it -- if I only copy a file from a flash drive to my computer, I generally do not take the time to unmount it. But if I am copying files to the flash drive, then I do take the eatra step -- and yes, I have had corrupted files as a result of removing a flash drive too soon after writing to it.
add a comment |
When a drive is being written to I have seen corruption when it was dismounted too early. While the OS doesn't hold data unwritten normally XP at least will accept write requests that back up.
I have had someone copy a file onto a flash drive and immediately hand it to me once the copy finished on his screen--the file was corrupt.
I have seen the write light flicker for some seconds after something supposedly has finished copying to a flash drive also.
add a comment |
If the system is performing file operations on the disk, there's a chance it'll corrupt data. Since it never happened to you, you're lucky. Use common sense to decide whether or not there's a chance your OS is performing operations. (Are there programs/files from the drive open/in use? Do I have caching on the drive on? Is it being indexed? Does my OS store temporary files on it?)
add a comment |
Anecdotal evidence, not proof, but I have had data corruption due to USB disconnection, but it has only occurred to me with Blackberry phones.
add a comment |
Trust me, YES.
You may thing nothing is accessing the USB drive, but in truth something is. This way I've trashed 3 external Backup HDDs, and lost Data in the amount close to 2 terabyte.
ALWAYS, ALWAYS, unmount before unplugging.
Wow, 3 HDD is bad luck.
– systempuntoout
Aug 26 '10 at 10:17
3
@systempuntoout: "Once it's funny, twice it's silly, three times it's worth a spanking." After the first couple of incidents, you might want to look deeper than "bad luck".
– Chris Burgess
Apr 28 '11 at 9:38
add a comment |
Unmount it to be safe (if you are totally paranoid), but as already mentioned data loss mainly occurs due to delayed writes.
There is one other thing though and thats to do with my WD essentials portable drive. If I just unplug it without a clean mount, next time I plug it in it'll make the drive read-only. I have to reboot the pc with the drive in to make it writable again.. most definatly annoying!
add a comment |
Another scenario on a Windows 10 system is when a (here, 64 Gb, no readyboost) flash drive is physically removed while the system is in hibernation. After the system soft boots from the hibernate, a move or copy of any changed files on the flash stick may incur a file or directory is corrupt and unreadable error.
To bypass the error (along with the requisite chkdsk action producing a chk fragment or two, and "recovering" the otherwise perfectly healthy drive), we try the right_click_on_drive_to_eject, or dismount the stick. Fine, but when the user then disables/enables it in Devices, the drive will not appear in any explorer windows, and still shows up as No Media in Disk Management.
The only way then to fully re-attach the device is simply to physically disconnect and re-connect the unit.
Thus it's preferable to gracefully dismount the device before unplugging it.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f180722%2fshould-i-unmount-a-usb-drive-before-unplugging-it%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
11 Answers
11
active
oldest
votes
11 Answers
11
active
oldest
votes
active
oldest
votes
active
oldest
votes
Either you're lucky to never have had corrupted data, or you're unlucky to never had noticed your data was corrupted.
When you perform an action that should write on a disk, most operating systems put the write operation into a queue. From time to time, they flush the queue. (I'm calling it a queue here, but actually operations can be performed out of order, operating systems do this when it's faster and gives the same final result.) This can make the write operations a lot faster, both because the system tries to perform them when it doesn't have anything better to do and because it can group them intelligently.
If you happen to unplug your device before everything has been written, you may miss the latest data. Worse, if the OS has been performing operations out of order, you may put your device into an inconsistent state and lose more than the latest data.
Some operating systems go into a more conservative (but slower) mode for removable devices, to reduce the risks associated with unplugging the device before it has been unmounted.
ADDED:
Doing operations out of order is sometimes not just a matter of speed. Cheap flash media (that doesn't to sector reallocation at the hardware level) has a limitation on the number of times you can write over any given sector. If you naively write all changes as they happen, this can kill the sectors that contain the file allocation table on a (V)FAT filesystem (the most common case for removable drives) or the journal on a typical modern filesystem. (See e.g. this discussion of sync
on the Linux Kernel mailing list.) Here, not updating the FAT or journal every time a file is written to is not just a big performance gain, it's also good for the lifetime of the hardware.
Until recently, Linux only gave a choice between sync
(write all changes as they happen) and async
(write whenever it's convenient). Recent versions introduce the flush
option for FAT filesystems, which is somewhere in between (flush all delayed writes as soon as the disk becomes inactive); it's on by default in Ubuntu 10.04.
On a different note, unmounting a removable drive ensures that no application has a file open. If you don't unmount before unplugging, you won't notice if you have unsaved data until it's too late. Unmounting while a file is open also increases the chance of corruption, both at the filesystem level (the OS may have queued some operations until the file is closed) and at the application level (e.g. if the application puts a lock file, it won't be removed).
3
Go forsync
mounting! :D
– BloodPhilia
Aug 25 '10 at 21:26
Is this still an issue when using a journaled filesystem?
– NReilingh
Aug 25 '10 at 23:36
1
@NRei Yes. Journaled filesystems just prevent corruption of data if something goes wrong in the middle of the writing process. It doesn't prevent corruption or missing data due to the writing not having taken place at all because the drive was unplugged before the OS got around to write the data.
– deceze
Aug 26 '10 at 1:47
@BloodPhilia:sync
sometimes hurts more than performance, see my edit.
– Gilles
Aug 26 '10 at 19:28
2
Agreed - systempuntoout has been lucky so far. I have lost quite a bit of work by not unmounting before removing a flash drive. You can save all you want in your application, but if the writes are buffered, it hasn't happened where it matters. You only get burned by this once.
– brice
Sep 21 '10 at 9:01
|
show 3 more comments
Either you're lucky to never have had corrupted data, or you're unlucky to never had noticed your data was corrupted.
When you perform an action that should write on a disk, most operating systems put the write operation into a queue. From time to time, they flush the queue. (I'm calling it a queue here, but actually operations can be performed out of order, operating systems do this when it's faster and gives the same final result.) This can make the write operations a lot faster, both because the system tries to perform them when it doesn't have anything better to do and because it can group them intelligently.
If you happen to unplug your device before everything has been written, you may miss the latest data. Worse, if the OS has been performing operations out of order, you may put your device into an inconsistent state and lose more than the latest data.
Some operating systems go into a more conservative (but slower) mode for removable devices, to reduce the risks associated with unplugging the device before it has been unmounted.
ADDED:
Doing operations out of order is sometimes not just a matter of speed. Cheap flash media (that doesn't to sector reallocation at the hardware level) has a limitation on the number of times you can write over any given sector. If you naively write all changes as they happen, this can kill the sectors that contain the file allocation table on a (V)FAT filesystem (the most common case for removable drives) or the journal on a typical modern filesystem. (See e.g. this discussion of sync
on the Linux Kernel mailing list.) Here, not updating the FAT or journal every time a file is written to is not just a big performance gain, it's also good for the lifetime of the hardware.
Until recently, Linux only gave a choice between sync
(write all changes as they happen) and async
(write whenever it's convenient). Recent versions introduce the flush
option for FAT filesystems, which is somewhere in between (flush all delayed writes as soon as the disk becomes inactive); it's on by default in Ubuntu 10.04.
On a different note, unmounting a removable drive ensures that no application has a file open. If you don't unmount before unplugging, you won't notice if you have unsaved data until it's too late. Unmounting while a file is open also increases the chance of corruption, both at the filesystem level (the OS may have queued some operations until the file is closed) and at the application level (e.g. if the application puts a lock file, it won't be removed).
3
Go forsync
mounting! :D
– BloodPhilia
Aug 25 '10 at 21:26
Is this still an issue when using a journaled filesystem?
– NReilingh
Aug 25 '10 at 23:36
1
@NRei Yes. Journaled filesystems just prevent corruption of data if something goes wrong in the middle of the writing process. It doesn't prevent corruption or missing data due to the writing not having taken place at all because the drive was unplugged before the OS got around to write the data.
– deceze
Aug 26 '10 at 1:47
@BloodPhilia:sync
sometimes hurts more than performance, see my edit.
– Gilles
Aug 26 '10 at 19:28
2
Agreed - systempuntoout has been lucky so far. I have lost quite a bit of work by not unmounting before removing a flash drive. You can save all you want in your application, but if the writes are buffered, it hasn't happened where it matters. You only get burned by this once.
– brice
Sep 21 '10 at 9:01
|
show 3 more comments
Either you're lucky to never have had corrupted data, or you're unlucky to never had noticed your data was corrupted.
When you perform an action that should write on a disk, most operating systems put the write operation into a queue. From time to time, they flush the queue. (I'm calling it a queue here, but actually operations can be performed out of order, operating systems do this when it's faster and gives the same final result.) This can make the write operations a lot faster, both because the system tries to perform them when it doesn't have anything better to do and because it can group them intelligently.
If you happen to unplug your device before everything has been written, you may miss the latest data. Worse, if the OS has been performing operations out of order, you may put your device into an inconsistent state and lose more than the latest data.
Some operating systems go into a more conservative (but slower) mode for removable devices, to reduce the risks associated with unplugging the device before it has been unmounted.
ADDED:
Doing operations out of order is sometimes not just a matter of speed. Cheap flash media (that doesn't to sector reallocation at the hardware level) has a limitation on the number of times you can write over any given sector. If you naively write all changes as they happen, this can kill the sectors that contain the file allocation table on a (V)FAT filesystem (the most common case for removable drives) or the journal on a typical modern filesystem. (See e.g. this discussion of sync
on the Linux Kernel mailing list.) Here, not updating the FAT or journal every time a file is written to is not just a big performance gain, it's also good for the lifetime of the hardware.
Until recently, Linux only gave a choice between sync
(write all changes as they happen) and async
(write whenever it's convenient). Recent versions introduce the flush
option for FAT filesystems, which is somewhere in between (flush all delayed writes as soon as the disk becomes inactive); it's on by default in Ubuntu 10.04.
On a different note, unmounting a removable drive ensures that no application has a file open. If you don't unmount before unplugging, you won't notice if you have unsaved data until it's too late. Unmounting while a file is open also increases the chance of corruption, both at the filesystem level (the OS may have queued some operations until the file is closed) and at the application level (e.g. if the application puts a lock file, it won't be removed).
Either you're lucky to never have had corrupted data, or you're unlucky to never had noticed your data was corrupted.
When you perform an action that should write on a disk, most operating systems put the write operation into a queue. From time to time, they flush the queue. (I'm calling it a queue here, but actually operations can be performed out of order, operating systems do this when it's faster and gives the same final result.) This can make the write operations a lot faster, both because the system tries to perform them when it doesn't have anything better to do and because it can group them intelligently.
If you happen to unplug your device before everything has been written, you may miss the latest data. Worse, if the OS has been performing operations out of order, you may put your device into an inconsistent state and lose more than the latest data.
Some operating systems go into a more conservative (but slower) mode for removable devices, to reduce the risks associated with unplugging the device before it has been unmounted.
ADDED:
Doing operations out of order is sometimes not just a matter of speed. Cheap flash media (that doesn't to sector reallocation at the hardware level) has a limitation on the number of times you can write over any given sector. If you naively write all changes as they happen, this can kill the sectors that contain the file allocation table on a (V)FAT filesystem (the most common case for removable drives) or the journal on a typical modern filesystem. (See e.g. this discussion of sync
on the Linux Kernel mailing list.) Here, not updating the FAT or journal every time a file is written to is not just a big performance gain, it's also good for the lifetime of the hardware.
Until recently, Linux only gave a choice between sync
(write all changes as they happen) and async
(write whenever it's convenient). Recent versions introduce the flush
option for FAT filesystems, which is somewhere in between (flush all delayed writes as soon as the disk becomes inactive); it's on by default in Ubuntu 10.04.
On a different note, unmounting a removable drive ensures that no application has a file open. If you don't unmount before unplugging, you won't notice if you have unsaved data until it's too late. Unmounting while a file is open also increases the chance of corruption, both at the filesystem level (the OS may have queued some operations until the file is closed) and at the application level (e.g. if the application puts a lock file, it won't be removed).
edited Aug 26 '10 at 19:28
answered Aug 25 '10 at 21:21
GillesGilles
52.8k15114161
52.8k15114161
3
Go forsync
mounting! :D
– BloodPhilia
Aug 25 '10 at 21:26
Is this still an issue when using a journaled filesystem?
– NReilingh
Aug 25 '10 at 23:36
1
@NRei Yes. Journaled filesystems just prevent corruption of data if something goes wrong in the middle of the writing process. It doesn't prevent corruption or missing data due to the writing not having taken place at all because the drive was unplugged before the OS got around to write the data.
– deceze
Aug 26 '10 at 1:47
@BloodPhilia:sync
sometimes hurts more than performance, see my edit.
– Gilles
Aug 26 '10 at 19:28
2
Agreed - systempuntoout has been lucky so far. I have lost quite a bit of work by not unmounting before removing a flash drive. You can save all you want in your application, but if the writes are buffered, it hasn't happened where it matters. You only get burned by this once.
– brice
Sep 21 '10 at 9:01
|
show 3 more comments
3
Go forsync
mounting! :D
– BloodPhilia
Aug 25 '10 at 21:26
Is this still an issue when using a journaled filesystem?
– NReilingh
Aug 25 '10 at 23:36
1
@NRei Yes. Journaled filesystems just prevent corruption of data if something goes wrong in the middle of the writing process. It doesn't prevent corruption or missing data due to the writing not having taken place at all because the drive was unplugged before the OS got around to write the data.
– deceze
Aug 26 '10 at 1:47
@BloodPhilia:sync
sometimes hurts more than performance, see my edit.
– Gilles
Aug 26 '10 at 19:28
2
Agreed - systempuntoout has been lucky so far. I have lost quite a bit of work by not unmounting before removing a flash drive. You can save all you want in your application, but if the writes are buffered, it hasn't happened where it matters. You only get burned by this once.
– brice
Sep 21 '10 at 9:01
3
3
Go for
sync
mounting! :D– BloodPhilia
Aug 25 '10 at 21:26
Go for
sync
mounting! :D– BloodPhilia
Aug 25 '10 at 21:26
Is this still an issue when using a journaled filesystem?
– NReilingh
Aug 25 '10 at 23:36
Is this still an issue when using a journaled filesystem?
– NReilingh
Aug 25 '10 at 23:36
1
1
@NRei Yes. Journaled filesystems just prevent corruption of data if something goes wrong in the middle of the writing process. It doesn't prevent corruption or missing data due to the writing not having taken place at all because the drive was unplugged before the OS got around to write the data.
– deceze
Aug 26 '10 at 1:47
@NRei Yes. Journaled filesystems just prevent corruption of data if something goes wrong in the middle of the writing process. It doesn't prevent corruption or missing data due to the writing not having taken place at all because the drive was unplugged before the OS got around to write the data.
– deceze
Aug 26 '10 at 1:47
@BloodPhilia:
sync
sometimes hurts more than performance, see my edit.– Gilles
Aug 26 '10 at 19:28
@BloodPhilia:
sync
sometimes hurts more than performance, see my edit.– Gilles
Aug 26 '10 at 19:28
2
2
Agreed - systempuntoout has been lucky so far. I have lost quite a bit of work by not unmounting before removing a flash drive. You can save all you want in your application, but if the writes are buffered, it hasn't happened where it matters. You only get burned by this once.
– brice
Sep 21 '10 at 9:01
Agreed - systempuntoout has been lucky so far. I have lost quite a bit of work by not unmounting before removing a flash drive. You can save all you want in your application, but if the writes are buffered, it hasn't happened where it matters. You only get burned by this once.
– brice
Sep 21 '10 at 9:01
|
show 3 more comments
The main risk you have is delayed writing. For various reasons the system doesn't always write the data to a disk when it is told to and keeps it instead in memory. When you unmount it, it makes sure all that is then written to the disk (and makes sure it isn't currently being used). You would probably know if you are currently writing to the disk, but you might not realize that your OS hasn't written everything you previously told it to write.
The frequency of this depends on your system and what your doing with the USB drive. If unmounts are usually slow and you can hear the writing noise coming from the drive, then you should probably continue to unmount. If unmounts are always instant though, then feel free to skip this step at your own risk.
4
I believe most OS'es disable this sort of delayed write for removable drives, though.
– Jeff Atwood
Aug 25 '10 at 23:33
@Jeff, that would certainly be the sensible way to treat USB drives. Is there a way to check that? In Windows 7?
– Torben Gundtofte-Bruun
Aug 26 '10 at 6:48
@torbengb: Actually, it's not always sensible — see my edited answer.
– Gilles
Aug 26 '10 at 19:29
My USB if I go into the policies options, it's defaulted to use Quick Removal which says in the description that Safety Remove is not needed. The other option is Best Performance which is not the default but would require you to safety remove. So for most the default would be quick remove meaning not needing to safety remove.
– ComputerLocus
Apr 25 '12 at 1:47
@Fogest, that’s true, but it’s also specific to Windows; the OP is using OSX. Of course, I’m sure that OSX does something similar.
– Synetech
Dec 19 '13 at 21:31
add a comment |
The main risk you have is delayed writing. For various reasons the system doesn't always write the data to a disk when it is told to and keeps it instead in memory. When you unmount it, it makes sure all that is then written to the disk (and makes sure it isn't currently being used). You would probably know if you are currently writing to the disk, but you might not realize that your OS hasn't written everything you previously told it to write.
The frequency of this depends on your system and what your doing with the USB drive. If unmounts are usually slow and you can hear the writing noise coming from the drive, then you should probably continue to unmount. If unmounts are always instant though, then feel free to skip this step at your own risk.
4
I believe most OS'es disable this sort of delayed write for removable drives, though.
– Jeff Atwood
Aug 25 '10 at 23:33
@Jeff, that would certainly be the sensible way to treat USB drives. Is there a way to check that? In Windows 7?
– Torben Gundtofte-Bruun
Aug 26 '10 at 6:48
@torbengb: Actually, it's not always sensible — see my edited answer.
– Gilles
Aug 26 '10 at 19:29
My USB if I go into the policies options, it's defaulted to use Quick Removal which says in the description that Safety Remove is not needed. The other option is Best Performance which is not the default but would require you to safety remove. So for most the default would be quick remove meaning not needing to safety remove.
– ComputerLocus
Apr 25 '12 at 1:47
@Fogest, that’s true, but it’s also specific to Windows; the OP is using OSX. Of course, I’m sure that OSX does something similar.
– Synetech
Dec 19 '13 at 21:31
add a comment |
The main risk you have is delayed writing. For various reasons the system doesn't always write the data to a disk when it is told to and keeps it instead in memory. When you unmount it, it makes sure all that is then written to the disk (and makes sure it isn't currently being used). You would probably know if you are currently writing to the disk, but you might not realize that your OS hasn't written everything you previously told it to write.
The frequency of this depends on your system and what your doing with the USB drive. If unmounts are usually slow and you can hear the writing noise coming from the drive, then you should probably continue to unmount. If unmounts are always instant though, then feel free to skip this step at your own risk.
The main risk you have is delayed writing. For various reasons the system doesn't always write the data to a disk when it is told to and keeps it instead in memory. When you unmount it, it makes sure all that is then written to the disk (and makes sure it isn't currently being used). You would probably know if you are currently writing to the disk, but you might not realize that your OS hasn't written everything you previously told it to write.
The frequency of this depends on your system and what your doing with the USB drive. If unmounts are usually slow and you can hear the writing noise coming from the drive, then you should probably continue to unmount. If unmounts are always instant though, then feel free to skip this step at your own risk.
edited Aug 25 '10 at 21:21
answered Aug 25 '10 at 21:16
JarvinJarvin
5,88544062
5,88544062
4
I believe most OS'es disable this sort of delayed write for removable drives, though.
– Jeff Atwood
Aug 25 '10 at 23:33
@Jeff, that would certainly be the sensible way to treat USB drives. Is there a way to check that? In Windows 7?
– Torben Gundtofte-Bruun
Aug 26 '10 at 6:48
@torbengb: Actually, it's not always sensible — see my edited answer.
– Gilles
Aug 26 '10 at 19:29
My USB if I go into the policies options, it's defaulted to use Quick Removal which says in the description that Safety Remove is not needed. The other option is Best Performance which is not the default but would require you to safety remove. So for most the default would be quick remove meaning not needing to safety remove.
– ComputerLocus
Apr 25 '12 at 1:47
@Fogest, that’s true, but it’s also specific to Windows; the OP is using OSX. Of course, I’m sure that OSX does something similar.
– Synetech
Dec 19 '13 at 21:31
add a comment |
4
I believe most OS'es disable this sort of delayed write for removable drives, though.
– Jeff Atwood
Aug 25 '10 at 23:33
@Jeff, that would certainly be the sensible way to treat USB drives. Is there a way to check that? In Windows 7?
– Torben Gundtofte-Bruun
Aug 26 '10 at 6:48
@torbengb: Actually, it's not always sensible — see my edited answer.
– Gilles
Aug 26 '10 at 19:29
My USB if I go into the policies options, it's defaulted to use Quick Removal which says in the description that Safety Remove is not needed. The other option is Best Performance which is not the default but would require you to safety remove. So for most the default would be quick remove meaning not needing to safety remove.
– ComputerLocus
Apr 25 '12 at 1:47
@Fogest, that’s true, but it’s also specific to Windows; the OP is using OSX. Of course, I’m sure that OSX does something similar.
– Synetech
Dec 19 '13 at 21:31
4
4
I believe most OS'es disable this sort of delayed write for removable drives, though.
– Jeff Atwood
Aug 25 '10 at 23:33
I believe most OS'es disable this sort of delayed write for removable drives, though.
– Jeff Atwood
Aug 25 '10 at 23:33
@Jeff, that would certainly be the sensible way to treat USB drives. Is there a way to check that? In Windows 7?
– Torben Gundtofte-Bruun
Aug 26 '10 at 6:48
@Jeff, that would certainly be the sensible way to treat USB drives. Is there a way to check that? In Windows 7?
– Torben Gundtofte-Bruun
Aug 26 '10 at 6:48
@torbengb: Actually, it's not always sensible — see my edited answer.
– Gilles
Aug 26 '10 at 19:29
@torbengb: Actually, it's not always sensible — see my edited answer.
– Gilles
Aug 26 '10 at 19:29
My USB if I go into the policies options, it's defaulted to use Quick Removal which says in the description that Safety Remove is not needed. The other option is Best Performance which is not the default but would require you to safety remove. So for most the default would be quick remove meaning not needing to safety remove.
– ComputerLocus
Apr 25 '12 at 1:47
My USB if I go into the policies options, it's defaulted to use Quick Removal which says in the description that Safety Remove is not needed. The other option is Best Performance which is not the default but would require you to safety remove. So for most the default would be quick remove meaning not needing to safety remove.
– ComputerLocus
Apr 25 '12 at 1:47
@Fogest, that’s true, but it’s also specific to Windows; the OP is using OSX. Of course, I’m sure that OSX does something similar.
– Synetech
Dec 19 '13 at 21:31
@Fogest, that’s true, but it’s also specific to Windows; the OP is using OSX. Of course, I’m sure that OSX does something similar.
– Synetech
Dec 19 '13 at 21:31
add a comment |
I work in a casino and a lot of slot machine manufacturers now use USB thumbdrives to install the bin files (games and OS) onto the slot machine.
A slot machine that has corrupt firmware may or may not award thousands if not tens of thousands of dollars is great incentive to make sure the integrity of the data on that USB drive is not corrupt. Compliance/Regulator checks it anyway but it still saves work to do it right the first time.
In a corporate environment data loss could cost millions and personally you may lose something irreplaceable.
I'd certainly would make sure to unmount, safely remove or whatever terminology is used to make sure that any USB device with data on it is safe to remove.
1
But, copying mp3s to listen to, not so much.
– cgp
Aug 26 '10 at 3:15
add a comment |
I work in a casino and a lot of slot machine manufacturers now use USB thumbdrives to install the bin files (games and OS) onto the slot machine.
A slot machine that has corrupt firmware may or may not award thousands if not tens of thousands of dollars is great incentive to make sure the integrity of the data on that USB drive is not corrupt. Compliance/Regulator checks it anyway but it still saves work to do it right the first time.
In a corporate environment data loss could cost millions and personally you may lose something irreplaceable.
I'd certainly would make sure to unmount, safely remove or whatever terminology is used to make sure that any USB device with data on it is safe to remove.
1
But, copying mp3s to listen to, not so much.
– cgp
Aug 26 '10 at 3:15
add a comment |
I work in a casino and a lot of slot machine manufacturers now use USB thumbdrives to install the bin files (games and OS) onto the slot machine.
A slot machine that has corrupt firmware may or may not award thousands if not tens of thousands of dollars is great incentive to make sure the integrity of the data on that USB drive is not corrupt. Compliance/Regulator checks it anyway but it still saves work to do it right the first time.
In a corporate environment data loss could cost millions and personally you may lose something irreplaceable.
I'd certainly would make sure to unmount, safely remove or whatever terminology is used to make sure that any USB device with data on it is safe to remove.
I work in a casino and a lot of slot machine manufacturers now use USB thumbdrives to install the bin files (games and OS) onto the slot machine.
A slot machine that has corrupt firmware may or may not award thousands if not tens of thousands of dollars is great incentive to make sure the integrity of the data on that USB drive is not corrupt. Compliance/Regulator checks it anyway but it still saves work to do it right the first time.
In a corporate environment data loss could cost millions and personally you may lose something irreplaceable.
I'd certainly would make sure to unmount, safely remove or whatever terminology is used to make sure that any USB device with data on it is safe to remove.
answered Aug 26 '10 at 3:03
dghughesdghughes
24414
24414
1
But, copying mp3s to listen to, not so much.
– cgp
Aug 26 '10 at 3:15
add a comment |
1
But, copying mp3s to listen to, not so much.
– cgp
Aug 26 '10 at 3:15
1
1
But, copying mp3s to listen to, not so much.
– cgp
Aug 26 '10 at 3:15
But, copying mp3s to listen to, not so much.
– cgp
Aug 26 '10 at 3:15
add a comment |
Driving a car without wearing a seat belt can be safe for most of the time. But when something goes haywire, you thank you used it.
So yes. Even if most of the time just removing the USB drive without unmounting it can be safe, it definitely is not recommended.
add a comment |
Driving a car without wearing a seat belt can be safe for most of the time. But when something goes haywire, you thank you used it.
So yes. Even if most of the time just removing the USB drive without unmounting it can be safe, it definitely is not recommended.
add a comment |
Driving a car without wearing a seat belt can be safe for most of the time. But when something goes haywire, you thank you used it.
So yes. Even if most of the time just removing the USB drive without unmounting it can be safe, it definitely is not recommended.
Driving a car without wearing a seat belt can be safe for most of the time. But when something goes haywire, you thank you used it.
So yes. Even if most of the time just removing the USB drive without unmounting it can be safe, it definitely is not recommended.
answered Aug 26 '10 at 8:00
Janne PikkarainenJanne Pikkarainen
6,2792328
6,2792328
add a comment |
add a comment |
I don't think anyone has addressed the issue of read vs write access. If you haven't copied anything to the flash drive, or opened a file on it for writing, you are probably safe just removing it -- if I only copy a file from a flash drive to my computer, I generally do not take the time to unmount it. But if I am copying files to the flash drive, then I do take the eatra step -- and yes, I have had corrupted files as a result of removing a flash drive too soon after writing to it.
add a comment |
I don't think anyone has addressed the issue of read vs write access. If you haven't copied anything to the flash drive, or opened a file on it for writing, you are probably safe just removing it -- if I only copy a file from a flash drive to my computer, I generally do not take the time to unmount it. But if I am copying files to the flash drive, then I do take the eatra step -- and yes, I have had corrupted files as a result of removing a flash drive too soon after writing to it.
add a comment |
I don't think anyone has addressed the issue of read vs write access. If you haven't copied anything to the flash drive, or opened a file on it for writing, you are probably safe just removing it -- if I only copy a file from a flash drive to my computer, I generally do not take the time to unmount it. But if I am copying files to the flash drive, then I do take the eatra step -- and yes, I have had corrupted files as a result of removing a flash drive too soon after writing to it.
I don't think anyone has addressed the issue of read vs write access. If you haven't copied anything to the flash drive, or opened a file on it for writing, you are probably safe just removing it -- if I only copy a file from a flash drive to my computer, I generally do not take the time to unmount it. But if I am copying files to the flash drive, then I do take the eatra step -- and yes, I have had corrupted files as a result of removing a flash drive too soon after writing to it.
edited Aug 27 '10 at 17:25
answered Aug 26 '10 at 21:09
tcrosleytcrosley
448411
448411
add a comment |
add a comment |
When a drive is being written to I have seen corruption when it was dismounted too early. While the OS doesn't hold data unwritten normally XP at least will accept write requests that back up.
I have had someone copy a file onto a flash drive and immediately hand it to me once the copy finished on his screen--the file was corrupt.
I have seen the write light flicker for some seconds after something supposedly has finished copying to a flash drive also.
add a comment |
When a drive is being written to I have seen corruption when it was dismounted too early. While the OS doesn't hold data unwritten normally XP at least will accept write requests that back up.
I have had someone copy a file onto a flash drive and immediately hand it to me once the copy finished on his screen--the file was corrupt.
I have seen the write light flicker for some seconds after something supposedly has finished copying to a flash drive also.
add a comment |
When a drive is being written to I have seen corruption when it was dismounted too early. While the OS doesn't hold data unwritten normally XP at least will accept write requests that back up.
I have had someone copy a file onto a flash drive and immediately hand it to me once the copy finished on his screen--the file was corrupt.
I have seen the write light flicker for some seconds after something supposedly has finished copying to a flash drive also.
When a drive is being written to I have seen corruption when it was dismounted too early. While the OS doesn't hold data unwritten normally XP at least will accept write requests that back up.
I have had someone copy a file onto a flash drive and immediately hand it to me once the copy finished on his screen--the file was corrupt.
I have seen the write light flicker for some seconds after something supposedly has finished copying to a flash drive also.
answered Aug 26 '10 at 20:25
Loren PechtelLoren Pechtel
2,0441621
2,0441621
add a comment |
add a comment |
If the system is performing file operations on the disk, there's a chance it'll corrupt data. Since it never happened to you, you're lucky. Use common sense to decide whether or not there's a chance your OS is performing operations. (Are there programs/files from the drive open/in use? Do I have caching on the drive on? Is it being indexed? Does my OS store temporary files on it?)
add a comment |
If the system is performing file operations on the disk, there's a chance it'll corrupt data. Since it never happened to you, you're lucky. Use common sense to decide whether or not there's a chance your OS is performing operations. (Are there programs/files from the drive open/in use? Do I have caching on the drive on? Is it being indexed? Does my OS store temporary files on it?)
add a comment |
If the system is performing file operations on the disk, there's a chance it'll corrupt data. Since it never happened to you, you're lucky. Use common sense to decide whether or not there's a chance your OS is performing operations. (Are there programs/files from the drive open/in use? Do I have caching on the drive on? Is it being indexed? Does my OS store temporary files on it?)
If the system is performing file operations on the disk, there's a chance it'll corrupt data. Since it never happened to you, you're lucky. Use common sense to decide whether or not there's a chance your OS is performing operations. (Are there programs/files from the drive open/in use? Do I have caching on the drive on? Is it being indexed? Does my OS store temporary files on it?)
answered Aug 25 '10 at 21:14
BloodPhiliaBloodPhilia
24.5k1473104
24.5k1473104
add a comment |
add a comment |
Anecdotal evidence, not proof, but I have had data corruption due to USB disconnection, but it has only occurred to me with Blackberry phones.
add a comment |
Anecdotal evidence, not proof, but I have had data corruption due to USB disconnection, but it has only occurred to me with Blackberry phones.
add a comment |
Anecdotal evidence, not proof, but I have had data corruption due to USB disconnection, but it has only occurred to me with Blackberry phones.
Anecdotal evidence, not proof, but I have had data corruption due to USB disconnection, but it has only occurred to me with Blackberry phones.
answered Aug 26 '10 at 1:42
Dave JacobyDave Jacoby
154110
154110
add a comment |
add a comment |
Trust me, YES.
You may thing nothing is accessing the USB drive, but in truth something is. This way I've trashed 3 external Backup HDDs, and lost Data in the amount close to 2 terabyte.
ALWAYS, ALWAYS, unmount before unplugging.
Wow, 3 HDD is bad luck.
– systempuntoout
Aug 26 '10 at 10:17
3
@systempuntoout: "Once it's funny, twice it's silly, three times it's worth a spanking." After the first couple of incidents, you might want to look deeper than "bad luck".
– Chris Burgess
Apr 28 '11 at 9:38
add a comment |
Trust me, YES.
You may thing nothing is accessing the USB drive, but in truth something is. This way I've trashed 3 external Backup HDDs, and lost Data in the amount close to 2 terabyte.
ALWAYS, ALWAYS, unmount before unplugging.
Wow, 3 HDD is bad luck.
– systempuntoout
Aug 26 '10 at 10:17
3
@systempuntoout: "Once it's funny, twice it's silly, three times it's worth a spanking." After the first couple of incidents, you might want to look deeper than "bad luck".
– Chris Burgess
Apr 28 '11 at 9:38
add a comment |
Trust me, YES.
You may thing nothing is accessing the USB drive, but in truth something is. This way I've trashed 3 external Backup HDDs, and lost Data in the amount close to 2 terabyte.
ALWAYS, ALWAYS, unmount before unplugging.
Trust me, YES.
You may thing nothing is accessing the USB drive, but in truth something is. This way I've trashed 3 external Backup HDDs, and lost Data in the amount close to 2 terabyte.
ALWAYS, ALWAYS, unmount before unplugging.
answered Aug 26 '10 at 8:06
Grumpy ol' BearGrumpy ol' Bear
3,478104269
3,478104269
Wow, 3 HDD is bad luck.
– systempuntoout
Aug 26 '10 at 10:17
3
@systempuntoout: "Once it's funny, twice it's silly, three times it's worth a spanking." After the first couple of incidents, you might want to look deeper than "bad luck".
– Chris Burgess
Apr 28 '11 at 9:38
add a comment |
Wow, 3 HDD is bad luck.
– systempuntoout
Aug 26 '10 at 10:17
3
@systempuntoout: "Once it's funny, twice it's silly, three times it's worth a spanking." After the first couple of incidents, you might want to look deeper than "bad luck".
– Chris Burgess
Apr 28 '11 at 9:38
Wow, 3 HDD is bad luck.
– systempuntoout
Aug 26 '10 at 10:17
Wow, 3 HDD is bad luck.
– systempuntoout
Aug 26 '10 at 10:17
3
3
@systempuntoout: "Once it's funny, twice it's silly, three times it's worth a spanking." After the first couple of incidents, you might want to look deeper than "bad luck".
– Chris Burgess
Apr 28 '11 at 9:38
@systempuntoout: "Once it's funny, twice it's silly, three times it's worth a spanking." After the first couple of incidents, you might want to look deeper than "bad luck".
– Chris Burgess
Apr 28 '11 at 9:38
add a comment |
Unmount it to be safe (if you are totally paranoid), but as already mentioned data loss mainly occurs due to delayed writes.
There is one other thing though and thats to do with my WD essentials portable drive. If I just unplug it without a clean mount, next time I plug it in it'll make the drive read-only. I have to reboot the pc with the drive in to make it writable again.. most definatly annoying!
add a comment |
Unmount it to be safe (if you are totally paranoid), but as already mentioned data loss mainly occurs due to delayed writes.
There is one other thing though and thats to do with my WD essentials portable drive. If I just unplug it without a clean mount, next time I plug it in it'll make the drive read-only. I have to reboot the pc with the drive in to make it writable again.. most definatly annoying!
add a comment |
Unmount it to be safe (if you are totally paranoid), but as already mentioned data loss mainly occurs due to delayed writes.
There is one other thing though and thats to do with my WD essentials portable drive. If I just unplug it without a clean mount, next time I plug it in it'll make the drive read-only. I have to reboot the pc with the drive in to make it writable again.. most definatly annoying!
Unmount it to be safe (if you are totally paranoid), but as already mentioned data loss mainly occurs due to delayed writes.
There is one other thing though and thats to do with my WD essentials portable drive. If I just unplug it without a clean mount, next time I plug it in it'll make the drive read-only. I have to reboot the pc with the drive in to make it writable again.. most definatly annoying!
answered Aug 26 '10 at 7:50
user47602user47602
213
213
add a comment |
add a comment |
Another scenario on a Windows 10 system is when a (here, 64 Gb, no readyboost) flash drive is physically removed while the system is in hibernation. After the system soft boots from the hibernate, a move or copy of any changed files on the flash stick may incur a file or directory is corrupt and unreadable error.
To bypass the error (along with the requisite chkdsk action producing a chk fragment or two, and "recovering" the otherwise perfectly healthy drive), we try the right_click_on_drive_to_eject, or dismount the stick. Fine, but when the user then disables/enables it in Devices, the drive will not appear in any explorer windows, and still shows up as No Media in Disk Management.
The only way then to fully re-attach the device is simply to physically disconnect and re-connect the unit.
Thus it's preferable to gracefully dismount the device before unplugging it.
add a comment |
Another scenario on a Windows 10 system is when a (here, 64 Gb, no readyboost) flash drive is physically removed while the system is in hibernation. After the system soft boots from the hibernate, a move or copy of any changed files on the flash stick may incur a file or directory is corrupt and unreadable error.
To bypass the error (along with the requisite chkdsk action producing a chk fragment or two, and "recovering" the otherwise perfectly healthy drive), we try the right_click_on_drive_to_eject, or dismount the stick. Fine, but when the user then disables/enables it in Devices, the drive will not appear in any explorer windows, and still shows up as No Media in Disk Management.
The only way then to fully re-attach the device is simply to physically disconnect and re-connect the unit.
Thus it's preferable to gracefully dismount the device before unplugging it.
add a comment |
Another scenario on a Windows 10 system is when a (here, 64 Gb, no readyboost) flash drive is physically removed while the system is in hibernation. After the system soft boots from the hibernate, a move or copy of any changed files on the flash stick may incur a file or directory is corrupt and unreadable error.
To bypass the error (along with the requisite chkdsk action producing a chk fragment or two, and "recovering" the otherwise perfectly healthy drive), we try the right_click_on_drive_to_eject, or dismount the stick. Fine, but when the user then disables/enables it in Devices, the drive will not appear in any explorer windows, and still shows up as No Media in Disk Management.
The only way then to fully re-attach the device is simply to physically disconnect and re-connect the unit.
Thus it's preferable to gracefully dismount the device before unplugging it.
Another scenario on a Windows 10 system is when a (here, 64 Gb, no readyboost) flash drive is physically removed while the system is in hibernation. After the system soft boots from the hibernate, a move or copy of any changed files on the flash stick may incur a file or directory is corrupt and unreadable error.
To bypass the error (along with the requisite chkdsk action producing a chk fragment or two, and "recovering" the otherwise perfectly healthy drive), we try the right_click_on_drive_to_eject, or dismount the stick. Fine, but when the user then disables/enables it in Devices, the drive will not appear in any explorer windows, and still shows up as No Media in Disk Management.
The only way then to fully re-attach the device is simply to physically disconnect and re-connect the unit.
Thus it's preferable to gracefully dismount the device before unplugging it.
answered Jan 20 at 15:00
Laurie StearnLaurie Stearn
222211
222211
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f180722%2fshould-i-unmount-a-usb-drive-before-unplugging-it%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Not posting an answer since my data is totally anecdotal. I have been a sysadmin and then a software developer for about 15 years and many of my friends is in the same trade and I can't remember one person complaining about data-loss from unplugging a USB device without unmounting. Just use some common sense. Don't pull it out while you are copying/moving stuff.
– Nifle
Aug 25 '10 at 22:30
@Nifle that's what i'm talking about :) (actually, i have specified "at the end of my tasks")
– systempuntoout
Aug 25 '10 at 22:46
1
I'd like to offer an additional anecdotal story - in the lab's at Uni people would (obviously) plug USB sticks in for transporting work about. We didn't have the relevant permissions to unmount (don't ask..) and after the first term several large important looking signs appeared telling people not to use the USB ports in the keyboards, this was because they kept corrupting sticks (I knew personally of at least four incidents). But, the ones in the base units used in the same way (without unmount permissions) seemed to work fine!
– DMA57361
Aug 26 '10 at 8:11
1
@DMA57361, If you don't have permissions to unmount (I wonder how you mounted then in first place then... bad bad admin), you can anyways run
sync
, wait for a few seconds and then unplug.– user39559
Aug 26 '10 at 10:39
2
another prize?! who's muffin ya butterin? ;-) here, have another vote...
– Sky Sanders
Sep 6 '10 at 11:33