USB mount/umount problme
I'm developing an application under OS Solaris 9 and i'm tring to use the USB device.
Doing test with different USB storage i can see that sometimes the mount fails.
To mount the device i do
mount -F pcfs /dev/dsk/c2t0d0s0:c /mnt/USB
and sometime doesn't work giving me after some minutes I/O error.
I checked with USB storage USB 1.0 and USB 2.0 and also with different dimension like 2GB, 1GB, 512MB and 128 MB.
What i can see is that for some old USB storage i have this problem but how i wrote before is not depending from USB 1 or 2.
Testing about 15 USB storage device i can see that 10 are working fine and 5 bad giving me this problem.
I also tried to do a fdisk -W - /dev/rdsk/c2t0d0s0 on these not working device but the result is the same: after some minutes i can see I/O error.
I cannot also formating the device because the device is not recognized. (Under Window OS all this USB device storage are working fine).
Somebody can suggest me something ?
Thanks in adavance to all
GP
http://www.linuxquestions.org/questions … -a-643022/
Did you already try the solution mentioned in that thread?
Similar Messages
-
Bash script to mount/umount usb ?
this thread https://bbs.archlinux.org/viewtopic.php?id=185712 gave me an idea and teach me.
I created a script to mount/umount usb. Save it in user's home dir, do
chmod
and click on it as a toggle button to mount/umount usb.
It only work for one usb plugged in. Please suggest me to get it work for two or more.
#! /bin/bash
# mr = mounted result
# ur = umounted result
# er = empty result
# cm = check mountpoint
# cup = check usb is plugged in
# usb = usb device (Example... /dev/sdb1)
cm=$(mountpoint /home/username/tmp)
cup=$(lsblk | grep "sd[b-z]1")
usb=$(ls /dev/sd[b-z]1)
er=""
ur="/home/username/tmp is not a mountpoint"
mr="/home/username/tmp is a mountpoint"
if [ "$cm" == "$ur" ] && [ "$cup" != "$er" ]; then
echo "password" | sudo -S mount -o uid=username,gid=users $usb /home/username/tmp
elif [ "$cm" == "$mr" ] && [ "$cup" != "$er" ]; then
echo "password" | sudo -S umount /home/username/tmp
else
exit
fiThere are a number of issues with your script; the reason you can't mount more than one device is that if "${usb[@]}" is populated by more than one drive, you need to iterate over the array to mount them.
Other issues that you should consider are:
your variable names are brief to the point of unintelligble: it is very hard to follow what is going on with "$mr", "$ur", "$cr" etc
don't parse the output of `ls`
don't put messages in variables; `printf` them
relatedly; check exit status, not strings: `$?`
if you are using bash; see What is the difference between [ and [[?
rather than `echo`ing your password (see 3), add the script to `sudoers`
Hope (some of) that helps. -
Make USB mount read only.
Hello again,
I am looking to make any USB mounted devices read only by default. Is there a way to do this in Leopard?Greetings,
While you can make a USB device read only, you can't make a port read only. There are ways to disable a USB port, but that's about it.
You can also use a OS X Server and with it, you can deny access to the device, but to make it (the port) read only, I don't think that's possible with any OS. You could mark the internal hard drives read only, as well, but that would be a major pain.
I have hundreds of machines, and the open labs are the only ones I disallow the use of USB devices for security reasons, PeeCee or Mac. Using the OS X Server, we can apply restrictions, as I do with Active Directory for the PeeCees.
Cheers,
M. -
[SOLVED] USB mount weird problem.
So, I have this weird problem - udev automounting does not allow normal user to write to usb device.
/etc/fstab:
/dev/sdc1 /media/usbhd-sdc1 vfat users,exec,dev,suid 0 1
/etc/rules.d/10-my-udev.rules:
KERNEL!="sd[a-z][0-9]", GOTO="mnt_auto_mount_end"
ACTION=="add", RUN+="/bin/mkdir /media/usbhd-%k", RUN+="/bin/mount /dev/%k"
ACTION=="remove", RUN+="/bin/umount -l /media/usbhd-%k", RUN+="/bin/rmdir /media/usbhd-%k"
LABEL="mnt_auto_mount_end"
When I manually do:
$ mount /dev/sdxy
it works nicely, but when i do it with 'sudo' it's the same as udev. So I guess that's something with udev. Can any1 help me?
Last edited by muchzill4 (2009-12-02 20:29:38)What filesystem is on your flash drive? If it's FAT, there's no concept of ownership, so linux will just make the user running mount own everything, hence permissions problems when root mounts it. I believe RUN+="/bin/mount -o uid=<your uid>,gid=<your gid> /dev/%k" or RUN+="/bin/mount -o umask=000 /dev/%k" will make it writeable by you and the world, respectively. If the second solution is too insecure but you need multiple users to be able to access mounted flash drives, check out HAL.
-
Xfce - thunar - gconf - dconf - usb mounting - why - how - bah
Hello,
I have disabled all automounting.
I need to know what file I need to edit to change the options that xfce uses to mount. Or whatever it uses to mount when you right click and hit mount.
I am trying to mount a usb stick.
I have tried looking in dconf and gconf.
How does it work?
A few people mentioned gvfs and udisks.
I think it uses udev. I know it does not any longer use hal.
What am I missing here? What do I need to read?
Thanks,
Web...Sorry for posting this link but I do not have time to write it again. This is my opinion and what I ended up doing.
http://wiki.hackspherelabs.com/index.ph … disks-GVFS
If I am correct kernal passes to udisks which passes to gvfs or udev or something right?
I gave up on Thunar.
I would really like to figure out how to configure the gvfs/thunar default mounting rules.
Thanks,
Web...
I also found this link: https://bbs.archlinux.org/viewtopic.php?id=112846
The entire reason I started this.
Last edited by webdawg (2011-11-15 19:22:35) -
Is it possible to use custom mount options for removable (usb) drives in kde4?
I'm mostly interested in -o flush option. So the actual write on the disk ocurs when copying, but not when I unmout the device.
P.S. editing fstab is not a solution! May be there is a way to amoid hal and automount using udev?http://wiki.archlinux.org/index.php/Ude … SB_devices
-
Can Time Machine back up to a USB mounted sparseimage?
Hi. After doing some research, I decided to ask someone, since I couldn't find an answer.
I backup my MacBook Air to a external USB drive plugged to an old MacBook which shares my WiFi network. My backup is in a sparsebundle image (that's normal TM procedure for WiFi backups). It works well for hourly backups, but it takes forever for the first backup, or when TM wants to start the backup from scratch.
So, I'd like to plug that USB drive in my MacBook Air for a quicker backup, and plug it back in my old MacBook so it keeps on doing the hourly backups via WiFi.
Is there any way to do this? I've found that it was ok in Leopard, but I'm using Mavericks in my Air (and Snow Leopard in my old MacBook).
I think this can be done with the 'associatedisk' command via Terminal, but I'd like to hear from you first.
Thank you!I believe the answer is no. It certainly is when I tried it.....
I tried this simple test, I mounted a TM sparsebundle on my Mac Pro. The looking at Sys. Prefs. ->Time Machine -> Add/Remove Disk......The mounted BAckups.backupdb (from the sparsebundle) is not offered as an available disk for TM to backup to. -
Helllo,
I've had to do a reinstall of my mac and have a number of USB devices that have difficulty mounting, Android phones etc as well as my iPhones. The happens since I installed a ZTE mobile broadband dongle which mounts, then unmounts and mounts a different drive.
I've had exactly the same problem before with something hiding a mounted drive, and somehow found the answer on Google to delete a couple of plist files, but for the life of me I cannot remember what plist files I need to delete. This worked perfectly before.
Anyone able to point in the right direction?Found it, just for reference if you have any android phones or dongles, I had to delete the ZTEUSBMassStorageFilter.ktext from my Extensions folder and restart the computer, once I did that, everything worked fine. No idea how I found it, but hopefully if it's here, it'll help everyone out if they google it.
-
For some reason when I connect my droid to my mac with a USB cable I no longer get an option to mount the phone. I've tried both ports on my computer and the phone shows it is charging while connected but I just don't get anything in my notifications. Help me!
Transfer files to / from the computer:
Ensure that your memory card is inserted.
Note: If your memory card is not inserted, you will receive "Please insert a disk" when trying to access the phone.
If your card is inserted correctly and is still not being recognized, you should try to format the card.
Connect your device to a computer using a data cable. (It is recommended to connect directly to the computer, not through a hub)
You will see the following icon under Notifications
Drag down the status bar, and touch the “USB connected” notification
Touch Mount
Use your computer interface to move files between your device and your computer.
Windows PC
Apple/MAC
* Open Computer or My Computer
* Your phone should appear under
Devices with Removable Storage
(If your phone is not being recognized you
may need to update your drivers HERE)
* Select your device
* For photos & videos select DCIM > Camera
* For Music select Music
* For ringtones select notifications or Music
* Your phone should appear on
the desktop, as NO NAME
* Select your device
For photos & videos select DCIM > Camera
For Music select Music
For ringtones select notifications or Music
When you are done, go to Notifications and touch Turn off USB storage, then disconnect the data cable from the device.
Important Notes:
If your Windows PC is asking for drivers, click here to obtain the Motorola Driver tool.
Looking for more transfer options, try downloading Motorola Media Link- www.motorola.com/medialink
I hope this helps. -
USB/mount drive detection issue (using AIR 2)
I'm creating a drive mount listener in Flash Builder. For the most part, it works well. Lately, I have had a problem actually getting the event of a drive being mounted.
var s:StorageVolumeInfo=StorageVolumeInfo.storageVolumeInfo;
s.addEventListener(StorageVolumeChangeEvent.STORAGE_VOLUME_MOUNT,USBM ounted);
Then the handling method:
private function USBMounted(e:StorageVolumeChangeEvent):void
Alert.show("Drive Unmounted");
printDirectory(e.rootDirectory);
My two questions:
- Has anyone ever used this method to read all drives being mounted (CD, SD card, etc)?
- Is there any way to get this to work using a USB hub?
Thanks> You can write on "usb" because the right are : drwxrwxrwx
They appear only when I use 'sudo mount -o rw,noauto,async,user,umask=1000' instead of plain 'sudo mount /dev/sdb1 /mnt/usb2'.
I use vfat for that USB stick, so maybe that's why it works for me. The first two listings in your first post show the drives in different order, but of course the mountpoints show that the offending drive is ext2 not vfat, my bad.
Edit: This is how my ext3 USB stick behaves like:
[karol@black test]$ sudo mount /dev/sdb1 /mnt/usb
[karol@black test]$ mount | grep sdb1
/dev/sdb1 on /mnt/usb type ext3 (rw)
[karol@black test]$ ls -l /mnt
total 8
drwxr-xr-x 2 karol users 4096 07-03 01:08 usb
drwxr-xr-x 2 root root 4096 2009-09-14 usb2
This time /mnt/usb is an ext3. As you can see, there's no root, I (karol) an the owner, so I can rw to my heart's content. Maybe you should change the ownership - 'chown' (man chown if you're not familiar w/ that command).
Last edited by karol (2010-07-02 23:05:52) -
Hi all,
While booting Arch32... I get failed to load "Mounting Network Filesystem", it then pops an error message but where does it log it too?
Also how to I mount a USB drive?
/media/usb/
shows my WinXP C:\ drive contents... which is nice & useful but I'd like to mount a USB device correctly.
TIAmount /dev/sd[b,c,d,*] /[mount point, usb]
i.e .. to get the first usb onto /usb i'd do .. `mount /dev/sdd1 /usb`
i cannot help with the previous error,sorry -
Problem with vmware server 1.0.10 and usb mounting into guest
Hi, I really ve a serious problem here because I ve some reason that I need to use vmware sv 1.0.10 with windows 7 64bit pro as the host and win xp pro sp3 as guest os .... now i can installed vmware on my win 7 with pressing F8 then disble driver signature technique and I also sign vmware driver with win7 using some tool...
However, my problem is that i cant mount USB flash drive into the guest... it just show me my flash drive's name at the toolbar>>removable device>>usb but when i click on it.. nothing happen .. and after that when i check vmware log I've found that my vmware saw my flashdrive normally as it should be... i really ve no idea how to solve this....
I also tried set .vmx config with many methods but nth can help me...
Ps. I know that vmware server may b ve a big issue with win7 compatible things but i do really need to make this version of VM working with my usb flashdrive... plz help me.. Thank you guys all:)))Hi creamac,
Welcome to communites
Please install vmware tool and then on vmware task bar select connect or unplug usb drive . You
will find that on right hand corner above to task bar of host machine .
"Nature always wears the colors of the spirit." -
I have done my best to research this, but have not found a solution.
After a new Arch installation on a new machine (Dell Precision T3400) I am unable to change the permissions (even as root!) on files once they are transferred to the usbstick (a Code 1 error message is returned). Other operations, such as copying, moving and deleting occur as usual. I have also noticed that as soon as files are transferred to the USB stick, the permissions get changed (but not the ownership), as if whatever is reading the stick is also changing the permissions.
It is not the stick -- the same stick performs normally on every other computer I use it on.
fstab: /dev/sdc1 /mnt/usbstick vfat rw,user,auto,sync 0 0
(basically the same as on 3 other Linux machines I use, all running Arch).
When mounted, sdc1 has ownership root:disk. I have added myself to the disk group. /mnt/usbstick has myself as the owner.
Not a major problem, just slightly irritating.
TheaThanks, Pheon --
I just noticed I made a mistake in giving my fstab line, it should be:
/dev/sdc1 /mnt/usbstick vfat rw,user,noauto,sync 0 0
(so "noauto" instead of "auto" in the mount options)
As I indicated, this is not a USB stick problem (same stick works just fine on other machines) -- also, in my attempts to troubleshoot this, I changed the filesystem on the USB stick to VFAT -- previously, it was whatever the default is when it comes out of the factory, and at that time the fstab line looked like:
/dev/sdc1 /mnt/usbstick auto rw,user,noauto,sync 0 0
Same situation, i.e. changing the filesystem did not affect the problem in any way.
Any other ideas? -
Post install issues (usb mounting, networking problems)
Hi guys, I'm new there, just wanted to ask you few questions.
That's my desk now, I just changed some colors.
http://i.imgur.com/ASN19z9.png
The question is: how should I move now? I mean I got some tecnical troubles like:
- connecting my USB it dosn't recognize it.
- It dosn't work with all WIFI connections.
- Pacman Syyu dosn't work
error: unresolvable package conflicts detected error: failed to prepare transaction (conflicting dependencies) :: xorg-server and xf86-video-modesetting are in conflict
I was wondering if there is some big pack i can install to get those basic features i really need like mounting an USB device, or some video player.
It's like now my OS is really poor, just basic.
Can you guys give me some tips how to move now? thanks a lot.
(like tell me some programs you would say "really needed" to use this OS)
-- mod edit: converted img to url. Please see guidelines on image sizes. Trilby --
Last edited by Trilby (2015-05-26 10:00:41)Trilby wrote:
How did you install archlinux? Did you follow the Beginner's Guide? If so, did you follow the links to General Recommendations, and the List of Applications? These are targetted directly at the questions you are asking here. All of what you are asking about is clearly answered in the wiki.
Feel free to ask specific questions about anything you find in the wiki that you have trouble with, but do not expect us to regurgitate all of that information here for you. If you do need help you'll need to pick one issue to work on in this thread, and provide us the relevant information so we can help you.
EDIT: How did you get the xf86-video-modesetting error? That package is no longer in the repos? If you want help with this, please describe what you have done to get that package installed.
First of all thanks a lot for the reply.
I didn't followed the wiki becouse I installed Arch by ArchBang CD-Rom (2years old).
That's also why (maybe) I got the xf86-video-modesetting error I guess.
jb.1234abcd wrote:
Regarding usb device, e.g.:
plug in your flash drive
$ lsblk
$ lsblk -f
log in as root (or use sudo)
mount your flash drive
# mount -t auto /dev/sdb? /media
For setting up net connection, go to some other Internet-connected computer (e.g. get a live cd from any Linux distro that will be already pre-setup for Internet access) and study tutorials on installation and setting up networking on archlinux.org
site.
Thanks for the reply, yep I understand but I would like to make the computer recognize automatically the USB when I connect it.
Anyway, the connection works fine, but with some networks it gives problems. (for example, at my own house it works, at friend's place dosn't, kept reposting pswd like if it was wrong but we checked loads of times and it was right.)
Last edited by Maynight (2015-05-26 12:15:14) -
Hi,
I want notification on USB device mount. I have registered observer for NSWorkspaceDidMountNotification notification as following
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:didMountMethod name:NSWorkspaceDidMountNotification object:nil];
but not able to get notification. What is wrong? Also how to check Device is USB or CD?
Thanks.Launch the Console application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
Step 1
Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
View ▹ Show Log List
from the menu bar.
Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
Please do not indiscriminately dump thousands of lines from the log into this discussion.
Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
Step 2
In the Console window, look under User Diagnostic Reports (not "Diagnostic and Usage Messages") for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents — again, the text, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.) Please don’t post other kinds of diagnostic report — they're very long and not helpful.
Maybe you are looking for
-
Up until yesterday, I could open a new tab with a blank page. Now, every new tab opens to a bing search page and focus is in the search box. Very annoying when I begin to type a URL and have to click in the URL to continue typing. How do I get back t
-
Start Lync 2010 client on remote machine
I have a couple of users who like to logout of their Lync 2010 client. They apparently think that they are being watched through this program. This is a bit of a hassle since we use this program to see if users are sitting at their desk. I am trying
-
Another windows 8.1 usb 3.0 issue
Hi all, my usb 3.0 port worked fine in windows 8,, then updated to 8.1 and 8.1 update 1. Then I had to run a system restore (to a point in time 24 hours before), and then... boom: No device is detected anymore on the usb 3.0 port of my laptop. No usb
-
How to get separate family mail accounts
Our mail server has allowed us to have five email accounts,-dad, mom, and three children. How do we set mail to get mail from only one account. ie-how does dad go onto the server and get dads mail and leave the others there? As it is now when I get m
-
[request] MUTE Simple, Anonymous File Sharing
http://mute-net.sourceforge.net/ thx