Triode wrote:
> Thinking about this case - I'm not sure what the right UI behaviour is.
> Do we screen out the possibility of this or leave it to the user to end
> up with undefinded results.
>
> What we could do is only list available local file locations if they are
> not already in the mount list (either actively mounted or in fstab, but
> not mounted). This would prevent trying to mount the same partition
> twice and ending up with a random one of them working. I'm not sure
> whether we should do this though as they may be reasons why a user wants
> to temporarily unmount a filesystem and mount it elsewhere.
>
> Views?
Firstly, althought the orig tomcat/java storage page operates slightly
differently with entries to the /etc/fstab file not made unless, and
until, "persist" is selected, you can still end up with a filesystem
mounted at more than one point, e.g.:
journalclt -f extract:
Code:
--------------------
Apr 05 15:35:59 squeeze-v sudo[727]: tomcat : TTY=unknown ;
PWD=/usr/share/tomcat ; USER=root ; COMMAND=/bin/umount -f /mnt/disk2
Apr 05 15:35:59 squeeze-v sudo[731]: tomcat : TTY=unknown ;
PWD=/usr/share/tomcat ; USER=root ; COMMAND=/bin/mount -t ext4 -o
defaults,nofail /de...mnt/disk2
Apr 05 15:35:59 squeeze-v kernel: EXT4-fs (sdb1): mounted filesystem with
ordered data mode. Opts: (null)
Apr 05 15:36:45 squeeze-v sudo[741]: fedora : TTY=pts/0 ; PWD=/home/fedora ;
USER=root ; COMMAND=/bin/journalctl -f
Apr 05 15:37:35 squeeze-v sshd[744]: pam_unix(sshd:auth): authentication
failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.0.20 user=fedora
Apr 05 15:37:37 squeeze-v sshd[744]: Failed password for fedora from
192.168.0.20 port 50395 ssh2
Apr 05 15:37:40 squeeze-v sshd[744]: Accepted password for fedora from
192.168.0.20 port 50395 ssh2
Apr 05 15:37:40 squeeze-v systemd[1]: Starting Session 3 of user fedora.
Apr 05 15:37:40 squeeze-v systemd-logind[468]: New session 3 of user fedora.
Apr 05 15:37:40 squeeze-v systemd[1]: Started Session 3 of user fedora.
Apr 05 15:37:40 squeeze-v sshd[744]: pam_unix(sshd:session): session opened
for user fedora by (uid=0)
Apr 05 15:37:51 squeeze-v sudo[771]: fedora : TTY=pts/1 ; PWD=/home/fedora ;
USER=root ; COMMAND=/bin/cat /etc/fstab
Apr 05 15:38:04 squeeze-v sudo[774]: tomcat : TTY=unknown ;
PWD=/usr/share/tomcat ; USER=root ; COMMAND=/sbin/sp-fstabUpdate
/tmp/fstab_904247344...07592.txt
Apr 05 15:38:17 squeeze-v sudo[784]: fedora : TTY=pts/1 ; PWD=/home/fedora ;
USER=root ; COMMAND=/bin/cat /etc/fstab
Apr 05 15:38:42 squeeze-v sudo[788]: tomcat : TTY=unknown ;
PWD=/usr/share/tomcat ; USER=root ; COMMAND=/bin/umount -f /mnt/disk4
Apr 05 15:38:42 squeeze-v sudo[792]: tomcat : TTY=unknown ;
PWD=/usr/share/tomcat ; USER=root ; COMMAND=/bin/mount -t ext4 -o
defaults,nofail /de...mnt/disk4
Apr 05 15:38:42 squeeze-v sudo[796]: tomcat : TTY=unknown ;
PWD=/usr/share/tomcat ; USER=root ; COMMAND=/sbin/sp-fstabUpdate
/tmp/fstab_750594645...35327.txt
Apr 05 15:39:08 squeeze-v sudo[805]: fedora : TTY=pts/1 ; PWD=/home/fedora ;
USER=root ; COMMAND=/bin/cat /etc/fstab
--------------------
/etc/fstab changes:
Code:
--------------------
# START: Addition by squeeze-web-gui (Java) on 2014/04/05 15:38:04 BST
/dev/sdb1 /mnt/disk2 ext4 rw,relatime,data=ordered 0
0
# END: Addition by squeeze-web-gui (Java) on 2014/04/05 15:38:04 BST
# START: Addition by squeeze-web-gui (Java) on 2014/04/05 15:38:42 BST
/dev/sdb1 /mnt/disk4 ext4 defaults,nofail 0 0
# END: Addition by squeeze-web-gui (Java) on 2014/04/05 15:38:42 BST
--------------------
Speaking as primarily a desktop Linux user, I can't remember a situation
when I wanted entries like this in /etc/fstab. Currently, mount points
are consumed as local disks are mounted, it seems a sensible option to
do the same for devices. If a user wants to change a filesystem's mount
point, temporarily or not, they simply "remove" it (which also umounts
if on the LUA webUI) and remount it elsewhere.
------------------------------------------------------------------------
Krisbee's Profile: http://forums.slimdevices.com/member.php?userid=59080
View this thread: http://forums.slimdevices.com/showthread.php?t=99395
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix