[SLE] Safely Removing USB Stick as a user
Hi All, I get the following message when trying to "safely remove" USB Stick as a user: umount: /media/usbdisk is not in the fstab (and you are not root) Please check that the disk is entered correctly. I tried to umount it from konsole after su-ing as root, but I think it is not the "safely remove". Missed something? Regards, -- Sergey Mkrtchyan Scientific Researcher Department Of Molecular Physics, Faculty Of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Tuesday 06 June 2006 4:07 pm, Sergey Mkrtchyan wrote:
Hi All, I get the following message when trying to "safely remove" USB Stick as a user:
umount: /media/usbdisk is not in the fstab (and you are not root) Please check that the disk is entered correctly.
I tried to umount it from konsole after su-ing as root, but I think it is not the "safely remove". The USB stick is an automount device. It can safely be removed without being umounted. A non-root user cannot umount a mounted file system that does not have a corresponding fstab entry that allows user mounting and umounting.
For years I have always been paranoid about umounting, but I've gotten away
from that in the past year, especially since the 2.6 kernel.
--
Jerry Feldman
Jerry Feldman wrote:
For years I have always been paranoid about umounting, but I've gotten away from that in the past year, especially since the 2.6 kernel.
So just taking it off, even when light on it is on, is OK ? Nothing "harmful" for the stick ? -- Sergey Mkrtchyan Scientific Researcher Department Of Molecular Physics, Faculty Of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Wed, 2006-06-07 at 01:40 +0500, Sergey Mkrtchyan wrote:
So just taking it off, even when light on it is on, is OK ? Nothing "harmful" for the stick ?
If you run "df" and it doesn't show up as mounted, it means it's been auto-umounted. Now I wouldn't remove the USB key immediately after writing to it. But if it's been 30 seconds or so, it's typically safe. -- Bryan J. Smith Professional, technical annoyance mailto:b.j.smith@ieee.org http://thebs413.blogspot.com ------------------------------------------------------- Illegal Immigration = "Representation Without Taxation" -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Tuesday 06 June 2006 4:40 pm, Sergey Mkrtchyan wrote:
Jerry Feldman wrote:
For years I have always been paranoid about umounting, but I've gotten away from that in the past year, especially since the 2.6 kernel.
So just taking it off, even when light on it is on, is OK ? Nothing "harmful" for the stick ? No. The USB stick file system is not cached.
--
Jerry Feldman
On Tue, 2006-06-06 at 16:48 -0400, Jerry Feldman wrote:
No. The USB stick file system is not cached.
No, it's not buffered. All writes are always written to leave the filesystem consistent. But writes are not instantaneous either. -- Bryan J. Smith Professional, technical annoyance mailto:b.j.smith@ieee.org http://thebs413.blogspot.com ------------------------------------------------------- Illegal Immigration = "Representation Without Taxation" -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Tuesday 06 June 2006 4:54 pm, Bryan J. Smith wrote:
On Tue, 2006-06-06 at 16:48 -0400, Jerry Feldman wrote:
No. The USB stick file system is not cached.
No, it's not buffered. All writes are always written to leave the filesystem consistent. But writes are not instantaneous either. True, but things don't hand around in kernel buffers like native file systems.
--
Jerry Feldman
Sergey, On Tuesday 06 June 2006 13:40, Sergey Mkrtchyan wrote:
...
So just taking it off, even when light on it is on, is OK ? Nothing "harmful" for the stick ?
Every flash-RAM-based "disk" I have has it's jewel light lit only when data is actually being transferred. In other words, the light is an activity indicator. So I'd wait for it to go out and stay out for a few seconds before I disconnected the device.
-- Sergey Mkrtchyan
Randall Schulz -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Tue, 2006-06-06 at 21:16 -0700, Randall R Schulz wrote:
Every flash-RAM-based "disk" I have has it's jewel light lit only when data is actually being transferred. In other words, the light is an activity indicator. So I'd wait for it to go out and stay out for a few seconds before I disconnected the device.
Unfortunately I have both Lexmark and Geek Squad (rebranded Memorex?) that have a light that indicates power/connectivity. The hot-plug/media configuration in kernel 2.6 distros "just work." But that doesn't mean you can just yank it out. Depending on speed, you need to give it time. 30 seconds since last transfer is typically fine, depending on the transfer. If your device uses UDF instead of FAT32, it's typically a tad safer since UDF was designed for forcing consistent writes to removable block devices. Ironically enough, Linux 2.6 is extremely superior to Windows XP in how it handles USB storage device consistency. In Windows XP, I've repeatedly seen corruptions, even when the user is only "reading" data from the device. It has to do with the fact that the NT kernel does _not_ have the concept of "read-only" filesystem access, whereas Linux (and all UNIX flavors) do. Don't get me started on that nightmare when it comes to NTFS. ;-> -- Bryan J. Smith Professional, technical annoyance mailto:b.j.smith@ieee.org http://thebs413.blogspot.com ------------------------------------------------------- Illegal Immigration = "Representation Without Taxation" -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Bryan J. Smith wrote:
On Tue, 2006-06-06 at 21:16 -0700, Randall R Schulz wrote:
Every flash-RAM-based "disk" I have has it's jewel light lit only when data is actually being transferred. In other words, the light is an activity indicator. So I'd wait for it to go out and stay out for a few seconds before I disconnected the device.
Unfortunately I have both Lexmark and Geek Squad (rebranded Memorex?) that have a light that indicates power/connectivity.
The hot-plug/media configuration in kernel 2.6 distros "just work." But that doesn't mean you can just yank it out. Depending on speed, you need to give it time. 30 seconds since last transfer is typically fine, depending on the transfer.
If your device uses UDF instead of FAT32, it's typically a tad safer since UDF was designed for forcing consistent writes to removable block devices.
Ironically enough, Linux 2.6 is extremely superior to Windows XP in how it handles USB storage device consistency. In Windows XP, I've repeatedly seen corruptions, even when the user is only "reading" data from the device.
It has to do with the fact that the NT kernel does _not_ have the concept of "read-only" filesystem access, whereas Linux (and all UNIX flavors) do. Don't get me started on that nightmare when it comes to NTFS. ;->
I believe at least from SUSE 10.0, unless you fiddle with HAL, the usb stick is mountedwith sync. It basically means there is no buffering on the transfer and make sure that each transfer is correctly placed into the USB stick (causes a lot of writes to the FAT table). As a result, if the transfer is complete, e.g. a cp, you can just yank the device out at that time. All the files and updates are already properly written to the USB stick. -- Joseph Loo jloo@acm.org -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Joseph Loo wrote:
I believe at least from SUSE 10.0, unless you fiddle with HAL, the usb stick is mountedwith sync. It basically means there is no buffering on the transfer and make sure that each transfer is correctly placed into the USB stick (causes a lot of writes to the FAT table). As a result, if the transfer is complete, e.g. a cp, you can just yank the device out at that time. All the files and updates are already properly written to the USB stick.
In 10.1, there's now a "Mounting" tab, in the device properties. You can specify read only, quiet, synchronous, access time updates, mount point, mount automatically, flushed IO, UTF-8 charset, mount as user and a drop down list for "Short names". -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
James Knott wrote:
In 10.1, there's now a "Mounting" tab, in the device properties.
what "device properties"? where do you find this? thanks jdd -- http://www.dodin.net http://dodin.org/galerie_photo_web/expo/index.html http://lucien.dodin.net http://fr.susewiki.org/index.php?title=Gérer_ses_photos -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
jdd sur free wrote:
James Knott wrote:
In 10.1, there's now a "Mounting" tab, in the device properties.
what "device properties"? where do you find this?
In 10.1, there's an icon for the drive in the "My Computer" folder. Right click on it. -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Randall R Schulz wrote:
Sergey,
On Tuesday 06 June 2006 13:40, Sergey Mkrtchyan wrote:
...
So just taking it off, even when light on it is on, is OK ? Nothing "harmful" for the stick ?
Every flash-RAM-based "disk" I have has it's jewel light lit only when data is actually being transferred. In other words, the light is an activity indicator. So I'd wait for it to go out and stay out for a few seconds before I disconnected the device.
This guys' light is on (not "on", trully - just on and off periodically(sorry, can't find the right word in English)) whatever happens...even when writing data to it - it's the same. I came to that from Windows, after safely removing it there, the light is getting off.
Randall Schulz
-- Sergey Mkrtchyan Scientific Researcher Department Of Molecular Physics, Faculty Of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Wednesday 07 June 2006 2:12 am, Sergey Mkrtchyan wrote:
This guys' light is on (not "on", trully - just on and off periodically(sorry, can't find the right word in English)) whatever happens...even when writing data to it - it's the same.
I came to that from Windows, after safely removing it there, the light is getting off. I think that Bryan's post answered this very correctly. Most of the USB stick devices that I have seen, including the 3 I have always keep their lights on. Under Windows, when you click the icon to "safely remove" the device, the light does go out. However, under the 2.6 kernel, you do not need to umount the device. -- Jerry Feldman
Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Jerry Feldman wrote:
On Wednesday 07 June 2006 2:12 am, Sergey Mkrtchyan wrote:
This guys' light is on (not "on", trully - just on and off periodically(sorry, can't find the right word in English)) whatever happens...even when writing data to it - it's the same.
I came to that from Windows, after safely removing it there, the light is getting off. I think that Bryan's post answered this very correctly. Most of the USB stick devices that I have seen, including the 3 I have always keep their lights on. Under Windows, when you click the icon to "safely remove" the device, the light does go out. However, under the 2.6 kernel, you do not need to umount the device.
In both SUSE 10.0 and 10.1, you can right click on the USB drive icon and select "Safely Remove", though 10.0 will complain you're not root. -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Wed, 2006-06-07 at 11:12 +0500, Sergey Mkrtchyan wrote:
I came to that from Windows, after safely removing it there, the light is getting off.
I really think it's a Linux 2.4 v. 2.6 kernel implementation difference. Most people running 2.6 kernels have no issues, as it has the support of how to command many devices out-of-the-box. I've seen both operations under Windows XP, depending on if the USB key automagically loaded a driver or other support. If someone wiped the USB key clean, and it's the first time that vendor's key has been inserted into a Windows XP system, I've seen it not work as advertised. In any case, I found the light to be _useless_ under Windows XP at times. I've waiting for the light to go out and have still seen corruption after yanking it. The _only_safe_ way under Windows XP is to hit the notification tray for "Safely Remove Hardware." I do the same with "umount" under Linux 2.4. Under Linux 2.6, I run "df" and see if it's mounted. -- Bryan J. Smith Professional, technical annoyance mailto:b.j.smith@ieee.org http://thebs413.blogspot.com ------------------------------------------------------- Illegal Immigration = "Representation Without Taxation" -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Wednesday 07 June 2006 00:16, Randall R Schulz wrote:
Every flash-RAM-based "disk" I have has it's jewel light lit only when data is actually being transferred. In other words, the light is an activity indicator. So I'd wait for it to go out and stay out for a few seconds before I disconnected the device.
Observe your LED to determine its pattern. Plug it in and see if the light is on or off. Then save a file to it and see what the light does. I recommend this because as Randall stated, normally we expect the lighted LED to mean activity. However, I have a PNY thumb drive that is the opposite. Under Windows it behaves as expected, i.e. when idle, the LED is dark. When saving a file, the LED lights up while saving, then goes out. However, with Linux (several different distros I have tried) it is the opposite! When I plug it in, the LED lights up. If I save a file and watch the LED, it goes out for a while while saving, then the LED comes back on! Bryan **************************************** Powered by Mepis Linux 3.4-3 KDE 3.5.2 KMail 1.9.1 This is a Microsoft-free computer Bryan S. Tyson bryantyson@earthlink.net **************************************** -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Wed, 2006-06-07 at 08:36 -0400, Bryan S. Tyson wrote:
I recommend this because as Randall stated, normally we expect the lighted LED to mean activity. However, I have a PNY thumb drive that is the opposite. Under Windows it behaves as expected, i.e. when idle, the LED is dark. When saving a file, the LED lights up while saving, then goes out.
That's because Windows is setting status information -- probably c/o a PNY support driver/executable automagically installed when you first insert it (that why they say don't touch/delete the included file). *HOWEVER*, Microsoft _still_ recommends you go to the little notification try and say "eject" before you pull it. Because the NT kernel can still have buffers open, etc... I've gotten a _lot_ of corrupted USB sticks from users who didn't -- even 1 minute _after_ they stopped writing.
However, with Linux (several different distros I have tried) it is the opposite! When I plug it in, the LED lights up. If I save a file and watch the LED, it goes out for a while while saving, then the LED comes back on!
It depends on the kernel, distro, etc... On kernel 2.4, I've seen this happen -- just how the Linux kernel accesses the device, uses buffers, etc... You typically and _always_ want to run "umount". Kernel 2.6 seems to handle /media correctly. As long as you wait about 30 seconds for a sub-100MB write (or sub-1GB write on higher speed media), then you're typically safe. I'd still run "df" to confirm in any case. You _never_ know when you "touch" the filesystem accidentally. NOTE: Another alternative is to set up /media to _always_ mount read-only by default. That way, you can plug and unplug to your heart's desire! Only when you need to write should you then run a "mount -o remount,rw" command on the media -- or you can create a script that does such that a user runs (and set the media to be "user" [re]mountable). -- Bryan J. Smith Professional, technical annoyance mailto:b.j.smith@ieee.org http://thebs413.blogspot.com ------------------------------------------------------- Illegal Immigration = "Representation Without Taxation" -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Wednesday 07 June 2006 10:00 am, Bryan J. Smith wrote:
*HOWEVER*, Microsoft _still_ recommends you go to the little notification try and say "eject" before you pull it. Because the NT kernel can still have buffers open, etc... I've gotten a _lot_ of corrupted USB sticks from users who didn't -- even 1 minute _after_ they stopped writing.
Yes, in Windows I always use the little "remove safely" icon in the system tray. A few times I have forgotten and just pulled it out (LED not lit). Twice it was corrupted. With Linux I still (even though not necessary) mount the USB stick using the command line. When done using it, I umount it with the command line and wait until it comes back to the prompt before pulling. Bryan *************************************** Powered by Mepis Linux 3.4-3 KDE 3.5.2 KMail 1.8.3 This is a Microsoft-free computer Bryan S. Tyson bryantyson@earthlink.net *************************************** -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Bryan S. Tyson wrote:
With Linux I still (even though not necessary) mount the USB stick using the command line. When done using it, I umount it with the command line and wait until it comes back to the prompt before pulling.
I let the hotplug system mount the stick to /media/usbdisk (or whatever), then use the "eject" command to unmount it so that all the write buffers will be flushed. eject /media/usbdisk (etc) Buddy Coffey Advanced Electromagnetics -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Bryan S. Tyson wrote:
On Wednesday 07 June 2006 00:16, Randall R Schulz wrote:
Every flash-RAM-based "disk" I have has it's jewel light lit only when data is actually being transferred. In other words, the light is an activity indicator. So I'd wait for it to go out and stay out for a few seconds before I disconnected the device.
Observe your LED to determine its pattern. Plug it in and see if the light is on or off. Then save a file to it and see what the light does.
I recommend this because as Randall stated, normally we expect the lighted LED to mean activity. However, I have a PNY thumb drive that is the opposite. Under Windows it behaves as expected, i.e. when idle, the LED is dark. When saving a file, the LED lights up while saving, then goes out.
However, with Linux (several different distros I have tried) it is the opposite! When I plug it in, the LED lights up. If I save a file and watch the LED, it goes out for a while while saving, then the LED comes back on!
Bryan
On two of my PCs running SuSE v10.1 and v9.1, it's just the opposite. When I insert a stick, there are two bouts of about 10 flashes of each while the device is mounted. The LED then stays OFF. Only when I copy a file to it or delete a file does the LED again flash, again about 10 flashes. Ken Hough -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Observe your LED to determine its pattern. Plug it in and see if the light is on or off. Then save a file to it and see what the light does.
on my stock 10.1, my usb key do as expected, that is the light blink when files are written. but after that (and before) the light blinks slowly. It get mounted (now as sdb, don't know if it's all the time, I have others usb devices) on /media/keyname I can see it in /media, of course, but also in the "service" konqueror system, mass storage, also by it's name (the name is given in windows XP for vfat system). On the service/mass storage/name, right clicking on neme I have a "enlever en toute sécurité" menu. I don't know what is the english counterpart, but this is in french the very same name as XP :-) validating this menu entry unmount the key. it no more blink, no more appear anywhere, need to be un plugged and replugged to access I had no time to look at this in deep, but in 10.0 I had to tweek the Hal config to have no sync between my computer and usb system for speed reason. I have also a "sync" application on on the desktop for safe disconnect of all the devices jdd -- http://www.dodin.net http://dodin.org/galerie_photo_web/expo/index.html http://lucien.dodin.net http://fr.susewiki.org/index.php?title=Gérer_ses_photos -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
participants (10)
-
Bryan J. Smith
-
Bryan S. Tyson
-
Buddy Coffey
-
James Knott
-
jdd sur free
-
Jerry Feldman
-
Joseph Loo
-
Ken Hough
-
Randall R Schulz
-
Sergey Mkrtchyan