LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   xfce USB automounting problem (http://www.linuxquestions.org/questions/slackware-14/xfce-usb-automounting-problem-4175446477/)

FeyFre 01-20-2013 11:52 AM

xfce USB automounting problem
 
Hi

Have weird behavior of XFCE
Habe 2 USB sticks:
A: Transcend JetFlash 4Gb udev creates /dev/sdb & /dev/sdb1 nodes
B: Transcend JetFlash 8Gb udev creates /dev/sdb nodes

Both formated as FAT32, work good.
Starting Xfce
Plugin USB A - xfce mounts it into /run/media/<username>/<disklabel>
Plugin USB B - no reaction

What to do? How to fix it?

UPD:
it is very weird. I did umount -a in root terminal and now thunar can see all disk partitions including NTFS partitions(which previously was atuomounted during system startup since they registered in /etc/fstab).

EDIT: Terminology fix(my bad): here and below, when I said "mount" or "automount" I meant not mounting itself(if it cannot be deducted from text) but creation proper label on navigation panel in Thunar, so one can click on that entry and it automatically will be mounted as FS. Sorry for misleading.

bobzilla 01-20-2013 12:53 PM

Do you use a desktop manager (boot in init level 4)? If not, did you, by any chance mount USB B before starting X?

Quote:

it is very weird. I did umount -a in root terminal and now thunar can see all disk partitions including NTFS partitions(which previously was atuomounted during system startup since they registered in /etc/fstab).
Thunar-volman won't manage any partitions already mounted during the boot (/etc/fstab). It might be (not really sure) also the case with any media mounted before starting X (if you boot in init level 3).

FeyFre 01-20-2013 01:38 PM

I boot into 3-runlevel only.
Then I do startx - xfce starts
Then I plug USB A - thunar show its label, and I use it immediately.
Unplug USB A, plug USB B - thunar does not shows its label, I forced to open terminal and do "mount /dev/sdb /media/flash -o rw,iocharset=utf8,sync" manually.
I do not care about media mounted during boot(since it mounted permanently into stale path). I want thunar(or xfce, or whoever responds for it) to detect all my(and foreign) USB Mass Storage Devices. But it seems it understand only HDD-like partioned USBs(i.e likes to have /dev/sdX and /dev/sdX1 rather then /dev/sdX only).
How to cure it?

bobzilla 01-20-2013 03:13 PM

Sorry, haven't had a similar problem before. I remember seeing it before and think it might be related to udev rules. But I can't help any further without searching LQ and Googling (and you don't need me for that :)).

Maybe there's someone with more direct knowledge/experience with this who can help.

cfdisk 01-20-2013 04:54 PM

Just in case, I have solve my problem after editing /etc/fstab

This line was added:

Code:

/dev/sdb1  /mnt/memstick  auto noauto,owner,users 0  0
and

Code:

mkdir /mnt/memstick

FeyFre 01-20-2013 05:12 PM

@cfdisk, yes, this probably will solve some problems, but not in my case(I think). It is possible to plug a number of USB sticks into PC(up to 6-8) simultaneously. Should I fill my /etc/fstab with 6-8 additional lines? I do not think it is proper solution.

cfdisk 01-20-2013 06:14 PM

Yes, you are right. I just plugged two USB sticks and the second stick gave me an error message.

Wait, what else did I expect? I was mounting two sticks on the same /mnt/memstick

You can create

/mnt/memstick1
/mnt/memstick2

and so on.


Now it's your turn to try! :)

bobzilla 01-23-2013 12:40 AM

Well, I see you haven't got any answer and I stumbled at something that might help. But first some diag.

Start the udisksctl with "monitor" option:
Code:

udisksctl monitor
Plugin the USB B stick and copy all messages dumped by udisksctl.

FeyFre 01-24-2013 04:52 PM

1 Attachment(s)
Here attached log you asked:

I have played some time with different removable devices and got next results:
0. First of all, I have entry in my /etc/fstab: /dev/sdb /mnt/flash auto user,fmask=111,noauto 0 0
1. I tried to insert SD card(the same partition configuration as USB B has - only /dev/sdb devnode created by udev) into cardreader (built-in into notebook card-reader) - thunar still does not recognizes storage.
2. Than I inserted USB A - thunar recognized it as I said earlier, and THEN I inserted USB B(it became /dev/sdc), It is miracle! Thunar recognized it. Unpluged it(B), and inserted SD card(again /dev/sdc) - miracle again!
3. THEN I hashed out /dev/sdb. Another miracle! Each and every USB stick and SD card now visible by thunar, no mater of kind of partitioning!

My conclusion:
USB A was visible by thunar(or whoever responds for that) only because it was accidentally formated in flopp-like manner(i.e. no partition table, FS located directly on /dev/sdb device) and because it /etc/fstab there was entry for /dev/sdb.
Other storages was revoked by thunar because entry /dev/sdb blocked hdd-like storage-device partitioning.

So actual question sound a bit differently now: where to setup thunar(or whoever responds for disk automounting features) in order to force it to ignore entries in /etc/fstab? (I shall not remove any entries from /etc/fstab)

bobzilla 01-24-2013 08:37 PM

Quote:

Originally Posted by FeyFre (Post 4876978)
So actual question sound a bit differently now: where to setup thunar(or whoever responds for disk automounting features) in order to force it to ignore entries in /etc/fstab? (I shall not remove any entries from /etc/fstab)

I don't think that's possible. At least not in that fashion. Why would you need that entry anyway? What is it supposed to achieve?

Mark Pettit 01-24-2013 11:55 PM

This is quite interesting. I too have some flash disks that automount, and some that don't. Even more interesting, I have a 500 GB hard disk in a USB case that never automounts at work, but sometimes (say 40-50% of time), when my laptop is at home , it does automount. I run XFCE under Slack14. To be honest, I haven't worried too much about this - it's no great effort to right click on the icon and choose 'mount'.

FeyFre 01-25-2013 03:36 AM

Quote:

Why would you need that entry anyway?
Because most of time I spend in tty1-tty4 without X started, and I want to be able to use simple "mount /dev/sdb" instead of "mount /dev/sdb /mnt/flash -o rw,fmask=111,..." and so on.

FeyFre 01-25-2013 03:42 AM

Quote:

To be honest, I haven't worried too much about this - it's no great effort to right click on the icon and choose 'mount'.
Problem is not on automount(this my bad, I called it "automount" instead of "autodetect" or similar) it never automounts for me(and I do not need it really), but creates entry in Thunars navigation panel. Problem is in some cases it does not create that entry in Thunar! I have nothing to right click on.

bobzilla 01-26-2013 12:27 PM

Quote:

Originally Posted by FeyFre (Post 4877231)
Because most of time I spend in tty1-tty4 without X started, and I want to be able to use simple "mount /dev/sdb" instead of "mount /dev/sdb /mnt/flash -o rw,fmask=111,..." and so on.

Ok, understood. Maybe you could try something else (instead of fstab entry). Take a peek here:
https://wiki.archlinux.org/index.php...disks_wrappers

Not sure how those play with Thunar, but maybe you'll get something out of it.


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