Toon posts:

[fstab/sshfs] Mount disagrees with the fstab

Pagina: 1
Acties:

Verwijderd

Topicstarter
Ik kan mijn universiteits-home-dir thuis mounten via sshfs. Nu is het handig voor mij als dat via fstab kan, dus heb ik in fstab de volgende regel toegevoegd:

code:
1
sshfs#XXX@YYY.st.ewi.tudelft.nl:/home/XXX /mnt/tu fuse  noauto,users,allow_other,follow_symlinks 0  0


Hiermee kan ik de schijf makkelijk mounten, zowel als gewone user als als root. Als ik 'm mount als root kan ik 'm ook gewoon umounten. Maar als ik 'm mount als user, krijg ik als ik `umount /mnt/tu` type, de melding "umount: /mnt/tu mount disagrees with the fstab".

Als ik 'm gemount heb als user staat in mtab het volgende:

code:
1
XXX@YYY.st.ewi.tudelft.nl:/home/XXX /mnt/tu fuse.sshfs rw,noexec,nosuid,nodev,max_read=65536,allow_other,user=arvind 0 0


Iemand een idee wat hier nou mis gaat?

  • cherwin
  • Registratie: Maart 2006
  • Niet online
user@localhost[~]$ fusermount -u /mnt/tu

[ Voor 81% gewijzigd door cherwin op 15-03-2008 19:32 ]

Tell me your problem, not the solution you think I should build for you.


Verwijderd

Topicstarter
Tnx, dat werkt inderdaad, maar hoe combineer ik dat nu met /etc/fstab? Ik bedoel, zodat ik 'm gewoon kan unmounten door umount /mnt/tu te typen?

Verwijderd

fuse-partities moet je unmounten met fusermount -u... umount is hier niet van toepassing

  • cherwin
  • Registratie: Maart 2006
  • Niet online
Je zou een bash functie kunnen schrijven om fusermount aan te roepen zodra je een fuse bestandssytemen wilt laten unmounten. Ik zou echter gewoon wennen aan het feit dat je fusermount moet gebruiken in combinatie met fuse.

Tell me your problem, not the solution you think I should build for you.


  • Pim.
  • Registratie: Mei 2001
  • Laatst online: 16-08-2025

Pim.

Aut viam inveniam, aut faciam

en als je lui bent maak je een alias aan :P

"The trouble with quotes from the Internet is that you can never know if they are genuine." - Elvis Presley | Niet met me eens ? DM ME


Verwijderd

alias 'umount tu'='fusermount -u /mnt/tu'

[ Voor 11% gewijzigd door Verwijderd op 16-03-2008 12:13 ]


  • cherwin
  • Registratie: Maart 2006
  • Niet online
Je kan geen alias aanmaken met een spatie.

Tell me your problem, not the solution you think I should build for you.


  • Pim.
  • Registratie: Mei 2001
  • Laatst online: 16-08-2025

Pim.

Aut viam inveniam, aut faciam

cherwin schreef op zondag 16 maart 2008 @ 18:40:
Je kan geen alias aanmaken met een spatie.
Ik zie niet in waarom niet ???
De optie van ricewind moet gewoon werken

"The trouble with quotes from the Internet is that you can never know if they are genuine." - Elvis Presley | Niet met me eens ? DM ME


  • cherwin
  • Registratie: Maart 2006
  • Niet online
Waarom probeer je het niet uit en dan zie je zelf de foutmelding die je terug krijgt
alias 'umount tu'='fusermount -u /mnt/tu'
bash: alias: `umount tu': Invalid alias name

Een stukje uit de manual page van bash
ALIASES
For almost every purpose, aliases are superseded by shell functions.
En uit de Advanced Bash Scripting Guide
In a script, aliases have very limited usefulness. It would be quite nice if aliases could assume some of the functionality of the C preprocessor, such as macro expansion, but unfortunately Bash does not expand arguments within the alias body. [1] Moreover, a script fails to expand an alias itself within "compound constructs", such as if/then statements, loops, and functions. An added limitation is that an alias will not expand recursively. Almost invariably, whatever we would like an alias to do could be accomplished much more effectively with a function.

Tell me your problem, not the solution you think I should build for you.


  • Pim.
  • Registratie: Mei 2001
  • Laatst online: 16-08-2025

Pim.

Aut viam inveniam, aut faciam

In de alias naam misschien niet maar het commando wel:

alias 'umounttu'='fusermount -u /mnt/tu'

"The trouble with quotes from the Internet is that you can never know if they are genuine." - Elvis Presley | Niet met me eens ? DM ME


  • cherwin
  • Registratie: Maart 2006
  • Niet online
Ik had het over de naam, natuurlijk kan je spatie's doen in het commando, nogal logisch. Nu heb je dan nog steeds een andere commando, dus wat schiet je hier nu mee op? Dan kan je beter fusermount gebruiken, heb je ook meteen geen problemen wanneer je op andere systemen werkt zonder die alias. Verder denk ik dat jij je wat meer moet verdiepen in het gebruik van aliassen, want in jouw voorbeeld zie ik dat jij de alias umounttu tussen quotes zet, wat overbodig is.

We gaan nu wel heel erg offtopic, ik hoop in ieder geval dat de ts genoeg informatie heeft om zijn probleem aan te pakken :)

Tell me your problem, not the solution you think I should build for you.


Verwijderd

zat eventjes niet aan linux-bakje om te checken. maar idd geen spaties mogelijk in alias. sry voor bad info
Pagina: 1