Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Mount data-storage ... Kate-session (Read 962 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Mount data-storage ... Kate-session

Hello,
I have in my System (Artix, Plasma, OpenRC) some data storage device-s.

Those are listed (in Dolphin) and by clicking on it are mounted and the contents displayed.

If I start `kate` after a mashine-restart the `File/Open Recent`-menu contain "only" the list of files opened (by former session) that reside on system-data-carrier but not the files resides inside additional devices.

All "additional" storage-devices are mounted by click on them in
Quote
/run/media/<username>/

Questions:
  • Will `kate` rember those files if I mount this Device by system start?
  • Is following command-line in the `/etc/fstab` correct?

Code: [Select]
UUID=64e86895-4482-42d6-9cca-51a1532b8ac8 /home/tony/Data-Devices/sa-850-evo-250/ ext4 rw,suid,dev,auto,user,exec,nofail,async,atime 0 0

Thank you

Re: Mount data-storage ... Kate-session

Reply #1
I don't have recent experience with KDE (used it a long time ago), but generally having an entry in fstab for a particular (removable) disk is a bad idea with automounters. They expect to manage mounting removable disks on their own. The line you quoted has a particular filesystem UUID for a particular mount point.

To view the syntax for /etc/fstab:

Code: [Select]
man fstab
man mount

Re: Mount data-storage ... Kate-session

Reply #2
I don't have recent experience with KDE (used it a long time ago), but generally having an entry in fstab for a particular (removable) disk is a bad idea with automounters. They expect to manage mounting removable disks on their own. The line you quoted has a particular filesystem UUID for a particular mount point.

To view the syntax for /etc/fstab:

Code: [Select]
man fstab
man mount
Sorry but this don't help so much.
The Drive I want mount is a Samsung 850 SATA 250 GB, this is not removable, but just a SATA storage drive/data-carrier.

If the editor (kate) will even not remember the files opened from this drive even if inserted in the `/etc/fstab` than is everything useless.

Fstab & Mount are known but in other os don't appear anywhere if not inserted in fstab, in Artix and Arch but in "File-Manager" left even if with yellow triangle.

By the command `sudo mount -fav` (=test-mount) have I no errors but the drive is not mounted in `~/Data-Devices/sa-850-evo-250/`

For the device I can use `PARTLABEL=`, `/dev/sda1` (cause system-drive is a nvme),  `ID=`, `/dev/disk/by-id/`, and so on, but arch-like systems prefer `UUID=` and so i done.

I hope we will not discuss now two weeks long on how to mount automatically a 250GB SATA drive!?

The drive is/are visible in Filemanager even if not mounted in fstab, so I presume someone (udev maybe) communicate to FM and tell there are 4 additional drives. At this point if I click on the listed drive, it will mounted under `/run/...` and is accessible.

All I want is to automount it in `/home/<username>/drives-folder/drive-folder/`.

All the mount options I mention are the same the system do when mounting the drives under `/run////` nothing else.

Please consider, the system handle those "drives" as removable devices even if are all Sata connected, in fact if I remove the data-cable of sata, the drive disappear immediately from FM-list and reappera as soon i reconnect the data cable.

Re: Mount data-storage ... Kate-session

Reply #3
I don't have recent experience with KDE (used it a long time ago), but generally having an entry in fstab for a particular (removable) disk is a bad idea with automounters. They expect to manage mounting removable disks on their own. The line you quoted has a particular filesystem UUID for a particular mount point.

To view the syntax for /etc/fstab:

Code: [Select]
man fstab
man mount
This is just an `ext4` filesystem, no raid, no encryption, no btrfs, no zfs, no hba in between, nothing, just an ext4 on sata direct on MB.

Re: Mount data-storage ... Kate-session

Reply #4
It's work like this...

To permit the editor to show in menu "File/Open Recent     >"  also the text-files opened and stored  from/to additional data-carrier is necessary to mount the same before starting the editor same ==> at boot.

The benefit of this action is: you don't need to start the editor by auto-opening of all files edited in former session.

How to:
  • Open terminal with <CTRL + ALT + T>
  • Open `fstab` with:
  • Insert Drive, mount-point, fs-type, options, dump, fsck
  • <CTRL + O> for save and <CTRL + X> for quit
  • Test mount with:
Code for 2.:
Code: [Select]
sudo nano /etc/fstab
Code for 3.:
Code: [Select]
UUID=64e86895-4482-42d6-9cca-51a1532b8ac8 /home/tony/Data-Devices/sa-850-evo-250/ ext4 rw,suid,dev,auto,user,exec,nofail,async,atime 0 0
Code for 5.:
Code: [Select]
sudo mount -fav

Wikies: Fstab, Mount.

Re: Mount data-storage ... Kate-session

Reply #5
Bonjour,

Is following command-line in the `/etc/fstab` correct?


Code: [Select]
UUID=64e86895-4482-42d6-9cca-51a1532b8ac8 /home/tony/Data-Devices/sa-850-evo-250/ ext4 rw,suid,dev,auto,user,exec,nofail,async,atime 0 0

Thank you
I also have an additional SSD drive.
On this SSD there is a partition that I want to mount automatically at startup.

So I edited /etc/fstab (sudo mousepad /etc/fstab or sudo kate /etc/fstab or sudo nano /etc/fstab) and added a line that looks like this:
UUID=9a1d0fdf-36a0-4fbc-bd99-52c0e23dd5fb /media/77 ext4 defaults, noatime, discard 0 0

To find out the UUID of your partition, you can use the following command: lsblk -f

As you can see I have specified the mount point (/media/77) and the file type (ext4).

Next, I created the directory (s) that correspond to this mount point:
sudo mkdir /media
then
sudo mkdir /media/77

Then to be able to designate jp as owner of this directory, I must first mount this partition:
sudo mount /media/77

And finally:
 sudo chown -R jp:jp /media/77

At the next start this partition is mounted automatically.

Re: Mount data-storage ... Kate-session

Reply #6
Not sure you need the -R with chown, if you mount the drive then chown the mountpoint it should work according to it's existing permissions. Also once you've done that, the drive details will be cached somewhere and even if you mount another mountpoint, that setting will still apply it seems. It doesn't work like that with FAT that doesn't support any permissions.

Re: Mount data-storage ... Kate-session

Reply #7
@ tintin,

"defaults" implicate also "noauto" (no automount), see the linked wiki, this was reason for me to set variables of "defaults" single and add "auto" instead.

Regarding "noatime" (no time-stamp), well ZFS use "relatime" where FS decide to set or not time-stamp, ext4 has no relatime, so i choose "atime" in case i want recovery some data sometime.

####### is right, the correct command is:
Code: [Select]
sudo chown -R $USER:$USER /data/
or
Code: [Select]
sudo chown -R $USER:$USER /data/77/
to find out if one or more files on the drive not appartain to $USER use:
Code: [Select]
find $HOME ! -user $USER -ls
this is an example for `/home/` where KDE-Plasma react very bad (better sayd, the Qt-Plugins & Plasmoids) if the complete content of `/home` don't appertain to `$USER`, for furter information see `man find`.

For all artix/arch users downloading something from AUR  having root-rights directly in `/home/` or `~./Downloads/`, this the reason why i download AUR-packages in `/tmp/`.

Finally, you don't need to find them first and after change the rights, for `/home/` use directly:
Code: [Select]
sudo chown -R $USER:$USER /home/$USER
if you are unsure... use find first

This is also the reason why artix/arch/manjaro mount additional "drive-s" in `/data/`,  thus additional "drive-s" can contain root-files.