LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 12-13-2013, 06:50 AM   #1
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

Rep: Reputation: 15
USB mount and umount issue in SUSE LInux


I have SUSE and Redhat Linux machines.

Whenever USB inserted to Redhat machine , then /proc/bus/usb/devices file is creating and whenever we umount USB from machine , /proc/bus/usb/devices file is automatically deleted.

But in case os SuSE Linux, unable to get /proc/bus/usb/devices file by default. Is this file available at any other place or Is there any other way to get this file by default?

I run following command to get this file in SuSE and I got this.
Code:
mount -t usbfs usbfs /proc/bus/usb
But whenever I umount the USB , this file is not removing automatically.

How to get '/proc/bus/ussb/devices' file (in case of usb inserion) and how to delete automatically this file (in case of usb umount)?

Please help me to fix the problem.

-regards
Nagendra
Please
 
Old 12-13-2013, 11:54 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
That afaict, is a Red Hat specific thing. IIRC they have some automount daemon running which you might investigate. It seems like you want suse to be red hat, and it isn't. FWIW, Slackware isn't either. The disk entry is added to /proc/mounts and /etc/fstab and if you are scripting then maybe you can pick up something there.
 
Old 12-13-2013, 04:26 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
is this SELS 11 sp3
or
OpenSUSE 13.1



rhel6 uses systemV
opensuse uses SystemD

suse is also very udev centric


suse and RHEL both use "rpm's"
but that is as close as they get
They are VERY VERY different os's

take the uuid 1000 VS 500
they start at different places
rhel at 500
and suse at 1000

Last edited by John VV; 12-13-2013 at 04:27 PM.
 
Old 12-15-2013, 11:06 PM   #4
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

Original Poster
Rep: Reputation: 15
My machine is SLES 11 sp3.

Is USB information updated at any place in SLES whenever it is inserted?

How would my executable possible to collect plug-in and plug-out USB event information?

Please help me.

- ThanQ
Nagendra
 
Old 12-17-2013, 04:17 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
/proc/bus/usb?
/sys/bus/usb?
/sys/bus/usb/drivers/usb?
 
Old 12-19-2013, 08:05 AM   #6
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

Original Poster
Rep: Reputation: 15
I got "/sys/kernel/debug/usb/devices" file to know about USB information. It looks like /proc/bus/usb/devices file.

Is this reliable (Is this available in all SuSE LES machines)?


please help me.

-regards,
Nagendra
 
Old 12-19-2013, 11:10 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
All ones running the same kernel as yours. I don't have it. Guessing, I reckon you have CONFIG_USB_DEBUG set and I don't.
 
Old 12-20-2013, 03:04 AM   #8
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

Original Poster
Rep: Reputation: 15
I got some information about USB from "/proc/scsi/usb-storage/3". Is this reliable (Is this available (with same name also ) in all SuSE LES machines)?

please help me.

-regards,
Nagendra
 
Old 12-20-2013, 10:25 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Just to clarify, I am running slackware, not Suse.

http://cateee.net/lkddb/web-lkddb/ACPI_PROCFS.html

That stuff is deprecated, and I didn't bother with it so I don't see /proc/scsi. The same would be true of any others who chose not to select that kernel option while compiling their own kernels. It does tell you the information is in /sys where I first sent you.

Did you do a web search? I did a lazy one on your behalf and found this from a website that's sometimes useful (This one!)
http://www.linuxquestions.org/questi...11-sp1-907921/

Also, as someone pointed out, suse is udev centric, and you haven't looked at the udev rules in force.
 
Old 12-21-2013, 12:29 AM   #10
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

Original Poster
Rep: Reputation: 15
Thanks for response. Not find any thing about USB plug-in & plug-out in /sys directory.


I already tried by adding usbfs mount in /etc/fstab. It is fine. But customer is not accepting to add usbfs in /etc/fstab.

So looking for some other way.

Here my application is listening for USB plug-in&plug-out.

-regards
Nagendra

Last edited by nagendrar; 12-21-2013 at 01:22 AM.
 
Old 12-22-2013, 03:26 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
With suse,it's probably udev you need to be looking at.

I presume plug/unplug is recorded in dmesg |tail. kernel knows about it - it's strange that nobody writes it down.

Isn't a device node created when you plug in
Code:
ash-4.2$ ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2	/dev/sda3  /dev/sda4  /dev/sda5  /dev/sda6  /dev/sdb  /dev/sdb1

[Plugged in my usb drive here. No mount just plugin]

bash-4.2$ ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2	/dev/sda3  /dev/sda4  /dev/sda5  /dev/sda6  /dev/sdb  /dev/sdb1  /dev/sdc  /dev/sdc1

[Plugged it back out. sdc disappears]

bash-4.2$ ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2	/dev/sda3  /dev/sda4  /dev/sda5  /dev/sda6  /dev/sdb  /dev/sdb1
I presume SuSE is set up for usb storage. I think the ones to use are sdb(My card reader) and sdc and not individual partitions. It will make for more inventive coding, because you have to think about nfs mounts, samba mounts, and so forth. When you look at the dmesg o/p
Code:
bash-4.2$ sudo dmesg |tail
[56693.842891] sd 11:0:0:0: [sdc] Mode Sense: 43 00 00 00
[56693.843426] sd 11:0:0:0: [sdc] No Caching mode page present
[56693.843433] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[56693.846651] sd 11:0:0:0: [sdc] No Caching mode page present
[56693.846659] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[56693.847449]  sdc: sdc1
[56693.848886] sd 11:0:0:0: [sdc] No Caching mode page present
[56693.848893] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[56693.848898] sd 11:0:0:0: [sdc] Attached SCSI removable disk
[56720.878539] usb 1-2: USB disconnect, device number 9
The 'Mode Sense' is probably greppable, and the USB disconnect is happening somewhere.
 
Old 12-24-2013, 06:30 AM   #12
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

Original Poster
Rep: Reputation: 15
With the help of 'usb-devices' command, I got the USB information same as like /proc/bus/usb/devices.

-regards
Nagendra
 
Old 06-23-2016, 05:21 PM   #13
CatBurglerV8
LQ Newbie
 
Registered: Mar 2014
Location: Maui
Distribution: Gnome opensuse 13.2
Posts: 3

Rep: Reputation: Disabled
Smile USB the Easy Way, Mount, Format, Install ISO

I looked all over for How To Install and Run openSUSE on a USB Drive. I found the easy way using tools supplied by openSUSE.
First install the USB in a usb slot, open Disks find Mount on the Top of app and Mount the ThumbDrive. Then choose Format and Format the Drive in DOS vfat 32. Next open SuseStudio and Select where the file is stored. I made a separate Directory Named Tumbleweed and DownLoaded Tumbleweed to the new Directory as opposed to Downloads because I intended to keep it for any Emergencies. Open SuseStudio, then let SuseStudio copy to ThumbDrive. That is all there is to it. EASY!
PS: SuseStudio is Available in YAST Software lookup usb and it's one of those (Read the description).

Signed:
CatBurglerV8
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB mount/umount Dartcoder Linux - Newbie 2 10-25-2007 09:37 PM
util-linux-2.12r error on 'make -C mount mount umount' james penguin Linux From Scratch 2 08-28-2006 11:55 PM
dm-crypt, USB and umount/mount carcassonne Linux - Security 3 07-24-2006 10:35 PM
how to mount and umount USB on redhat 9 pak_abdul Linux - Hardware 3 08-04-2005 06:02 AM
mount/umount usb pen - woody 2.4.21 rohr Debian 5 02-10-2005 07:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 01:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration