Author Topic: [ solved ] Simple automount partition has become a challenge  (Read 690 times)

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2420
  • Any Bugs in site?
[ solved ] Simple automount partition has become a challenge
« on: March 21, 2012, 05:45:51 PM »
I have a simple KDE-mini fully updated until a few days ago.  The system has access to over 40 partitions on 3 drives, generally I do not mount any data drives on start.

Of late doing some testing the novelty of mounting a drive partition constantly has worn off.  I decided to have a go at using fstab to automount LABEL=DELTA-10 partition.

Here is my fstab attempt

Code: [Select]
[root@KDE-mini-Cprog gert]# cat /etc/fstab
# Entry for /dev/sda16 :
LABEL=ALFA-16           /                       ext4    defaults                        1 1
none                    /proc                   proc    defaults                        0 0
# Entry for /dev/sda6 :
LABEL=swap4000          swap                    swap    defaults                        0 0
none                    /dev/pts                devpts  defaults                        0 0
# Entry for /dev/sdb10 = DELTA-10
LABEL=DELTA-10          /dev/sdb10              ext4    rw,user,auto,exec,noatime       0 0

[root@KDE-mini-Cprog gert]# nano /etc/fstab

After several reboots:

Code: [Select]
[root@KDE-mini-Cprog gert]# mount
/dev/sda16 on / type ext4 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
[root@KDE-mini-Cprog gert]#

Quote
...... rw,user,auto,exec,noatime       0 0

I thought setting the above auto would do the trick.

Following is a line from cfdisk

Quote
    sdb10          NC              Logical     ext4                  [DELTA-10]          10738.47    *

Searching Forum seems to indicate I was on the right track.  I must have missed something simple?   :D
 
« Last Edit: March 22, 2012, 09:07:09 PM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: simple automount partition have become a challenge
« Reply #1 on: March 21, 2012, 05:51:15 PM »
Quote
# Entry for /dev/sdb10 = DELTA-10
LABEL=DELTA-10          /dev/sdb10              ext4    rw,user,auto,exec,noatime       0 0

The above line says .... mount  the partition labeled DELTA-10 on the mountpoint  ... /dev/sdb10 .... guess what ?  ;D

AS

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2420
  • Any Bugs in site?
Re: simple automount partition have become a challenge
« Reply #2 on: March 21, 2012, 06:01:48 PM »
AS
Hmmmm, good question. Sometimes I wonder where my mind is. Thank you, I might try something like this.   ;D

Quote
# Entry for /dev/sdb10 = DELTA-10
LABEL=DELTA-10          /mnt                    ext4    rw,user,auto,exec,noatime       0 0
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2420
  • Any Bugs in site?
Re: simple automount partition have become a challenge
« Reply #3 on: March 21, 2012, 06:42:55 PM »
A twist has shown up.  The automount works but I forgot a comment I saw while searching forum earlier 30 min ago, something like

udev / hal  will not touch a partition in fstab at the time I did not think of the implications but I think I have just got a reminder.

With DELTA-10 now automounting I no longer will see this in places  in the pane on the left in Dolphin / Konqueror that was not my intention.

A little more background:
I have a small number of of reference files that I keep on DELTA-10, in the format yymmdd-name.glk I make a link to an icon on the desktop so I have 'instant access' to this file to make notes/records.  I set up and delete the icons as needed.  I move between systems a lot at times so I have selected DELTA-10 to be a reference store house.

On a newly installed system I would use Dolphin say to pick up whichever reference file I am going to make a comment in, for example yymmdd-scanner_problems.glk I may not need the icon if the comments are infrequent perhaps once or twice a day. In case I may need to make frequent use of a file I will set up and Icon, which in my case will 'share' over 8 desktops, so I don't need to worry about what desktop I am presently on (there is a disadvantage here because multiple instances of same file easily can happen ). 

I think that covers my little customisation problem.

Question: Can an automount partition be made to show in filemanagers?  Perhaps I am approaching my wish wrongly?
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: simple automount partition have become a challenge
« Reply #4 on: March 21, 2012, 06:53:48 PM »
Use the option noauto in /etc/fstab   ;)

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10605
  • MLUs Forever!
Re: simple automount partition have become a challenge
« Reply #5 on: March 21, 2012, 07:10:13 PM »
Quote
Question: Can an automount partition be made to show in filemanagers?  Perhaps I am approaching my wish wrongly?

Maybe not quite in the manner you are thinking of, but, yes I believe, to resolve your need.

I do not have any mounting of partitions done in fstab, except those that are needed for the OS to fire up.

All the others are controlled by Device Notifier -----  I even have a DN widget on the desktop to facilitate mounting and unmounting of partitions with one click.

All the partitions of the internal device show up in Dolphin also.
I have four of those partitions automounting ...... using Device Notifier.
All the others are present in the Dolphin list and in the list of the desktop DN widget.

They can be (un)mounted with one click of the mouse in either location.

« Last Edit: March 21, 2012, 08:12:36 PM by Just18 »
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2420
  • Any Bugs in site?
Re: simple automount partition have become a challenge
« Reply #6 on: March 21, 2012, 07:43:37 PM »
AS
Well yes, true now the DELTA-10 of course shows in Dolphin as umount.   If I now click on my Icon link to a file on DELTA-10 I get a warning message

Unable to run the command specified. The file or folder file:///media/DELTA-10/120321-liveHDD/120321-liveHDD.glk does not exist.

So back to Dolphin and mount DELTA-10 then back and click on my Icon link.  This is what I got tired of.  This reflects the situation I had before adding the line in fstab

When DELTA-10 is mounted via Dolphin/Konqueror the partition of course stays visible as well and it is easy to look for other reference files via Dolphin as well as using the 'fast lane, Icon click access to a very frequently needed file' .

The situation arises when you are trying to do reboots in very rapid succession, on every run need to manually mount Delta-10.  With the fix in parted 2.4 I have revived a problem with liveHDD

In chasing this I was constantly rebooting and what started out as a simple little test not making notes.  After an hour of course I could no longer remember precisely what I was doing so I reverted to making simple notes on every reboot in a file on DELTA-10.

I am putting above problem on hold again and it was in the winding up I thought I will just fix this little problem with fast accessing specific file on DELTA-10.  

Just18
Yes I run exactly like you but have just used Dolphin/Konqueror.  I will look into the Device Manager hint but from my point it seems I still will have to mount before I click my 'special notes files'.  What you do say is that yes you can mount/umount and still have Dolphin showing status and using Dolphin to find that 'other' file which does not have an Icon link.

I have just tried via command line to mount /dev/sdb10 /media   and then opening Dolphin/Konqueror but now DELTA-10 gone from places.  Of course the content of can now be found via /media.

Intriguing.  :D

32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: simple automount partition have become a challenge
« Reply #7 on: March 21, 2012, 07:46:44 PM »

Intriguing.  :D


Or confusing  :D ... depending on the point of view.

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10605
  • MLUs Forever!
Re: simple automount partition have become a challenge
« Reply #8 on: March 21, 2012, 08:08:43 PM »
These might give you some idea what I mean

As you can see I have the ability to mount and unmount each partition by clicking on the small icon to the right of the entry - on the Desktop


This shows the entries in Device Notifier settings which determine which partitions are automounted at log in


This is how they appear in Dolphin
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline ternor

  • Hero Member
  • *****
  • Posts: 1791
Re: simple automount partition have become a challenge
« Reply #9 on: March 22, 2012, 05:01:44 AM »
<snip>

Question: Can an automount partition be made to show in filemanagers?  Perhaps I am approaching my wish wrongly?


On Konqueror, you can add an entry to the side bar or to 'places'.  The entry consists of an icon and a path.

This shows partition sda7 which mounts automatically to /data:


This shows various 'folders' in 'places' in Konqueror:

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2420
  • Any Bugs in site?
Re: simple automount partition have become a challenge
« Reply #10 on: March 22, 2012, 06:09:46 AM »
Thank you all. I have and am exploring the suggestions.  They come close and to make sure I don't miss out on something here I am also considering if perhaps I should adjust my behaviour and thinking.

The confusion has increased, I have just discovered after some tinkering with a script file, which I gave away, that since a reboot my system for the moment behaves exactly as I would like. Trying to figure why that is.   As soon as the desktop were ready I clicked on the reference file and it opened, without any DELTA-10 mounting on my part. Opening Dolphin, via a desktop widget, which is set to show content of DELTA-10 by having this in the command line:  

Exec=dolphin %i -caption "%c" %u /media/DELTA-10/

Despite DELTA-10 being mounted I also have it in Dolphin as I would like, already opened where I store new ref files

Side track: been trying without success finding out what the %i, %c and %u stands for as I have forgotten though I use some in Opera.

I have commented out DELTA-10 in my fstab and yet DELTA-10 was mounted.

Code: [Select]
[gert@KDE-mini-Cprog ~]$ cat /etc/fstab
# Entry for /dev/sda16 :
LABEL=ALFA-16           /                       ext4    defaults                        1 1
none                    /proc                   proc    defaults                        0 0
# Entry for /dev/sda6 :
LABEL=swap4000          swap                    swap    defaults                        0 0
none                    /dev/pts                devpts  defaults                        0 0
# Entry for /dev/sdb10 = DELTA-10
#LABEL=DELTA-10                /media                  ext4    rw,user,noauto,exec,noatime
0 0
[gert@KDE-mini-Cprog ~]$


Quote
[gert@KDE-mini-Cprog ~]$ mount
/dev/sda16 on / type ext4 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sdb10 on /media/DELTA-10 type ext4 (rw,nosuid,nodev,uhelper=hal) < --- Noticed this is not the fstab line I played with
[gert@KDE-mini-Cprog ~]$


I certainly would like to know what oddity delivered my intended operation so that I can repeat it on other systems.  
Perhaps an earlier than usual night for me will provide the answer, I will just enjoy playing with the setup as is for a while  :D  

Edit:
Another reboot and it still works.  I remembered that at some stage I ran hald thinking it might create an event 'doing something' but did not notice anything at the time.
« Last Edit: March 22, 2012, 07:45:07 AM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2420
  • Any Bugs in site?
Re: simple automount partition have become a challenge
« Reply #11 on: March 22, 2012, 09:06:16 PM »
By accident I think I found the settings that gives me what I am looking for.  When I was experimenting with Device Notifier which I really never have taken any interest in I tried a combination from Just18's post.


Settings
Automounting Section
   Automounting -> tick enable
      -    Only automatically mount removable media that has been manually mounted before
      v   Mount all removable media at login
      v   Automatically mount removable media when attached

Device overrides
   .....
   .....
   v   DELTA-10
   ...
   ...


Above description held against the pictures already posted will enable you to set up.

I have now installed on another system and the settings seem to work. I can now drag any file in DELTA-10 partition to a desktop location and drop an Icon marker, when no longer frequently needed I just delete the Icon.  The file access is not 'instant' when needed. I am happy.

Dolphin/Konqueror still works as I am used to, with no missing 'holes/entries' now I have 'pre-mounted' DELTA-10.  ;D

It is not important but I believe there is a way that I could group the 6 files that now dot the desktop in a for of widget on its own so I could have a nice list that would auto sort as I install/remove files, but I don't know how to and this has taken a bit too long.

I will mark this as solved
« Last Edit: March 22, 2012, 09:10:20 PM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen