.\" -*- coding: UTF-8 -*- .\" Copyright (C) 1993 Rickard E. Faith .\" and Copyright (C) 1994 Andries E. Brouwer .\" and Copyright (C) 2002, 2005 Michael Kerrisk .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" 2008-10-06, mtk: Created this as a new page by splitting .\" umount/umount2 material out of mount.2 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH umount 2 "30 marzo 2023" "Linux man\-pages 6.05.01" .SH NOME umount, umount2 \- smonta i filesystem .SH LIBRARY Standard C library (\fIlibc\fP, \fI\-lc\fP) .SH SINTASSI .nf \fB#include \fP .PP \fBint umount(const char *\fP\fItarget\fP\fB);\fP \fBint umount2(const char *\fP\fItarget\fP\fB, int \fP\fIflags\fP\fB);\fP .fi .SH DESCRIZIONE .\" Note: the kernel naming differs from the glibc naming .\" umount2 is the glibc name for what the kernel now calls umount .\" and umount is the glibc name for oldumount \fBumount\fP() e \fBumount2\fP() rimuovono il filesystem (più alto) montato su \fItarget\fP. .PP Sono necessari privilegi appropriati (Linux: capacità \fBCAP_SYS_ADMIN\fP per smontare i filesystem. .PP A partire da Linux 2.1.116 è stata aggiunta la chiamata di sistema \fBumount2\fP() che, come \fBumount\fP(), smonta un target, ma permette \fIopzioni\fP aggiuntive che controllano il comportamento dell'operazione: .TP \fBMNT_FORCE\fP (a partire da Linux 2.1.116) Chiede al filesystem di interrompere le richieste pendenti prima di tentare lo smontaggio. Ciò può consentire di completare lo smontaggio senza rimanere in attesa di un server inaccessibile, ma potrebbe causare perdita di dati. Se, dopo le richieste d'interruzione, alcuni processi hanno ancora riferimenti attivi al filesystem, lo smontaggio fallirà. Alla versione 4.12 di Linux \fBMNT_FORCE\fP è supportato solo sui seguenti filesystem: 9p (da Linux 2.6.16), ceph (da Linux 2.6.34), cifs (da Linux 2.6.12), fuse (da Linux 2.6.16), lustre (da Linux 3.11) e NFS (da Linux 2.1.116). .TP \fBMNT_DETACH\fP (a partire da Linux 2.4.11) Perform a lazy unmount: make the mount unavailable for new accesses, immediately disconnect the filesystem and all filesystems mounted below it from each other and from the mount table, and actually perform the unmount when the mount ceases to be busy. .TP \fBMNT_EXPIRE\fP (a partire da Linux 2.6.8) Mark the mount as expired. If a mount is not currently in use, then an initial call to \fBumount2\fP() with this flag fails with the error \fBEAGAIN\fP, but marks the mount as expired. The mount remains expired as long as it isn't accessed by any process. A second \fBumount2\fP() call specifying \fBMNT_EXPIRE\fP unmounts an expired mount. This flag cannot be specified with either \fBMNT_FORCE\fP or \fBMNT_DETACH\fP. .TP \fBUMOUNT_NOFOLLOW\fP (a partire da Linux 2.6.34) .\" Later added to Linux 2.6.33-stable Non elimina il riferimento a \fItarget\fP se è un collegamento simbolico. Questa opzione permette di evitare problemi di sicurezza in programmi set\-user\-ID\-\fIroot\fP che consentono a utenti senza privilegi di smontare i filesystem. .SH "VALORE RESTITUITO" In caso di successo restituisce zero. In caso di errore restituisce \-1, e \fIerrno\fP verrà impostato per indicare l'errore. .SH ERRORI I valori di errore indicati di seguito sono causati da errori indipendenti dal tipo di filesystem. Ciascun tipo di filesystem può avere i propri errori speciali e il suo comportamento speciale. Vedere il codice sorgente del kernel per dettagli. .TP \fBEAGAIN\fP Una chiamata a \fBumount2\fP() che specifica \fBMNT_EXPIRE\fP ha marcato con successo un filesystem non occupato come scaduto. .TP \fBEBUSY\fP \fItarget\fP non può essere smontato in quanto occupato. .TP \fBEFAULT\fP \fItarget\fP punta fuori dallo spazio di indirizzamento dell'utente. .TP \fBEINVAL\fP \fItarget\fP non è un punto di mount. .TP \fBEINVAL\fP \fItarget\fP is locked; see \fBmount_namespaces\fP(7). .TP \fBEINVAL\fP \fBumount2\fP() è stato chiamato con \fBMNT_EXPIRE\fP e con uno fra \fBMNT_DETACH\fP o \fBMNT_FORCE\fP. .TP \fBEINVAL\fP (a partire da Linux 2.6.34) \fBumount2\fP() è stato cchiamato con un valore di opzione non valido in \fIflags\fP. .TP \fBENAMETOOLONG\fP Un nome di percorso è più lungo di \fBMAXPATHLEN\fP. .TP \fBENOENT\fP Un nome di percorso era vuoto o aveva un componente inesistente. .TP \fBENOMEM\fP Il kernel non può allocare una pagina libera in cui copiare nomi di file o dati. .TP \fBEPERM\fP Il chiamante non ha i privilegi necessari. .SH STANDARDS Linux. .SH STORIA .\" http://sourceware.org/bugzilla/show_bug.cgi?id=10092 \fBMNT_DETACH\fP and \fBMNT_EXPIRE\fP are available since glibc 2.11. .PP La funzione originale \fBumount\fP() era chiamata come \fIumount(device)\fP e restituiva \fBENOTBLK\fP quando non veniva chiamata da un dispositivo a blocchi. In Linux 0.98p4 fu aggiunta una chiamata \fIumount(dir)\fP, per poter supportare dispositivi anonimi. In Linux 2.3.99\-pre7 la chiamata \fIumount(device)\fP fu rimossa, lasciando solo \fIumount(dir)\fP (poiché ora i dispositivi possono essere montati in più di un posto, così specificare il dispositivo non è sufficiente). .SH NOTE .SS "umount() and shared mounts" Shared mounts cause any mount activity on a mount, including \fBumount\fP() operations, to be forwarded to every shared mount in the peer group and every slave mount of that peer group. This means that \fBumount\fP() of any peer in a set of shared mounts will cause all of its peers to be unmounted and all of their slaves to be unmounted as well. .PP This propagation of unmount activity can be particularly surprising on systems where every mount is shared by default. On such systems, recursively bind mounting the root directory of the filesystem onto a subdirectory and then later unmounting that subdirectory with \fBMNT_DETACH\fP will cause every mount in the mount namespace to be lazily unmounted. .PP To ensure \fBumount\fP() does not propagate in this fashion, the mount may be remounted using a \fBmount\fP(2) call with a \fImount_flags\fP argument that includes both \fBMS_REC\fP and \fBMS_PRIVATE\fP prior to \fBumount\fP() being called. .SH "VEDERE ANCHE" \fBmount\fP(2), \fBmount_namespaces\fP(7), \fBpath_resolution\fP(7), \fBmount\fP(8), \fBumount\fP(8) .PP .SH TRADUZIONE La traduzione italiana di questa pagina di manuale è stata creata da Elisabetta Galli e Marco Curreli . .PP Questa traduzione è documentazione libera; leggere la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Versione 3 .UE o successiva per le condizioni di copyright. Non ci assumiamo alcuna responsabilità. .PP Per segnalare errori nella traduzione di questa pagina di manuale inviare un messaggio a .MT pluto-ildp@lists.pluto.it .ME .