Optionen für nachträgliches Einhängen

Bewertung: 5 von 5.

Möchte man verhindern, dass eine Partition automatisch eingehängt wird, verwendet man die Einhängeoption noauto. Damit ist es möglich, die Partition später zum gewünschten Zeitpunkt mit definierten Optionen an einem festen Einhängepunkt temporär einzubinden.

Sinnvoll ist das z.B., wenn man eine externe Festplatte nur zur Datensicherung anschließt. Verwendet man ein Backup-Skript, dann ist es wichtig, dass die Partition auf der externen Platte jedes mal am selben Ort im Dateisystem erscheint.

Ein solcher Eintrag könnte so aussehen:

UUID=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx   /media/Backup   ext4   noauto,user,defaults   0   2

Schließt man nun die USB-Backup-Platte an, wird diese jedes mal unter /media/Backup eingehängt. Interessant ist in diesem Zusammenhang auch die Option user. Sie sorgt dafür, dass man keine Root-Rechte benötigt um die Partition ein- bzw. auszuhängen.

Anmerkung: unter „Einhängen“ oder „abhängen“ einer Partition oder eines Lauffwerks bei LINUX / UNIX / UBUNTU etc ist das „mounten“ oder „unmounten“ gemeint.

MAN-Pages LINUX MINT Textauszug

NAME
mount – mount a filesystem

SYNOPSIS
mount [-l|-h|-V]

   mount -a [-fFnrsvw] [-t fstype] [-O optlist]

   mount [-fnrsvw] [-o options] device|dir

   mount [-fnrsvw] [-t fstype] [-o options] device dir

DESCRIPTION
All files accessible in a Unix system are arranged in one big tree, the
file hierarchy, rooted at /. These files can be spread out over sev‐
eral devices. The mount command serves to attach the filesystem found
on some device to the big file tree. Conversely, the umount(8) command
will detach it again.

   The standard form of the mount command is:

          mount -t type device dir

   This  tells  the kernel to attach the filesystem found on device (which
   is of type type) at the directory dir.  The previous contents (if  any)
   and  owner  and  mode  of  dir  become  invisible,  and as long as this
   filesystem remains mounted, the pathname dir refers to the root of  the
   filesystem on device.

   If only the directory or the device is given, for example:

          mount /dir

then  mount looks for a mountpoint (and if not found then for a device)
       in the /etc/fstab file.  It's possible to use the --target or  --source
       options  to avoid ambivalent interpretation of the given argument.  For
       example:

              mount --target /mountpoint

       The listing.
              The listing mode is maintained for backward compatibility only.

              For more robust and customizable output  use  findmnt(8),  espe‐
              cially  in  your  scripts.   Note that control characters in the
              mountpoint name are replaced with '?'.

              The following command lists all  mounted  filesystems  (of  type
              type):

                     mount [-l] [-t type]

              The option -l adds labels to this listing.  See below.

       The device indication.
              Most  devices  are  indicated  by a filename (of a block special
              device), like /dev/sda1, but there are other possibilities.  For
              example,  in  the  case  of  an  NFS mount, device may look like
              knuth.cwi.nl:/dir.  It is also possible to indicate a block spe‐
              cial  device  using its filesystem label or UUID (see the -L and
              -U options below), or its partition label or  UUID.   (Partition
              identifiers  are supported for example for GUID Partition Tables
              (GPT).)

              Don't forget that there is no guarantee that  UUIDs  and  labels
              are  really  unique,  especially  if you move, share or copy the
              device.  Use lsblk -o +UUID,PARTUUID to verify  that  the  UUIDs
              are really unique in your system.
Passender Artikel zum Thema
Print Friendly, PDF & Email

Schreibe einen Kommentar

Cookie Consent mit Real Cookie Banner
%d Bloggern gefällt das: