• /mnt usage

    From David Christensen@21:1/5 to David Wright on Tue Jan 16 06:50:01 2024
    On 1/15/24 20:05, David Wright wrote:
    And I've never created any mount point under /mnt. For a one time
    copy, /mnt is handy; always there, I don't have to mkdir at all.


    What about when you need multiple temporary mount points?


    What about when you have an portable backup drive that you connect once
    a week? And the drive is encrypted? And your backup system wants to
    know where?


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tomas@tuxteam.de@21:1/5 to David Christensen on Tue Jan 16 07:10:01 2024
    On Mon, Jan 15, 2024 at 09:41:15PM -0800, David Christensen wrote:
    On 1/15/24 20:05, David Wright wrote:
    And I've never created any mount point under /mnt. For a one time
    copy, /mnt is handy; always there, I don't have to mkdir at all.


    What about when you need multiple temporary mount points?

    I have /mnt1, /mnt2.

    What about when you have an portable backup drive that you connect once a week? And the drive is encrypted? And your backup system wants to know where?

    Ah, for specific mounts I have specific points. Encrypted backup goes
    to /media/backup (yes, I "inherited" that from somewhere) and the decrypted device gets named backup (thus /dev/mapper/backup).

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZaYcKQAKCRAFyCz1etHa Rnr6AJsFYlQev2zSADeeApD40hBX6g0INwCdEa/dZu6rCTSExe0ym2TvmmJx1X8=
    =/NlT
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From hw@21:1/5 to David Christensen on Tue Jan 16 15:00:01 2024
    On Mon, 2024-01-15 at 21:41 -0800, David Christensen wrote:
    On 1/15/24 20:05, David Wright wrote:
    And I've never created any mount point under /mnt. For a one time
    copy, /mnt is handy; always there, I don't have to mkdir at all.


    What about when you need multiple temporary mount points?

    I create subdirectories under /mnt as needed.

    What about when you have an portable backup drive that you connect once
    a week? And the drive is encrypted? And your backup system wants to
    know where?

    See above :)

    Also, see https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.pdf

    It's left to the administrator to decide how temporary stuff is with
    /mnt. I use /srv for stuff that is being served by the particular
    system.

    /tmp is volatile nowadays and not temporary. That's particularly
    braindead when you want Libreoffice to be able to recover files after
    a crash, which, by default, autosaves in /tmp.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tom Furie@21:1/5 to hw@adminart.net on Tue Jan 16 16:20:02 2024
    hw <hw@adminart.net> writes:

    /tmp is volatile nowadays and not temporary. That's particularly

    Volatile storage is, by definition, temporary.

    braindead when you want Libreoffice to be able to recover files after
    a crash, which, by default, autosaves in /tmp.

    /tmp is a terrible place to store recovery data, it's supposed to be
    used for transient data, not stuff you might be concerned about getting
    back later. Perhaps somewhere under ~/.local would be more appropriate
    on a modern system.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to David Christensen on Wed Jan 17 02:00:01 2024
    On Mon 15 Jan 2024 at 21:41:15 (-0800), David Christensen wrote:
    On 1/15/24 20:05, David Wright wrote:
    And I've never created any mount point under /mnt. For a one time
    copy, /mnt is handy; always there, I don't have to mkdir at all.

    What about when you have an portable backup drive that you connect
    once a week? And the drive is encrypted? And your backup system
    wants to know where?

    I plug it in, udev springs into action, and mount points for all
    the partitions are created under /media with appropriate names.

    The lookup "table" is a set of files under /etc/udev/rules.d/my-mountpoints where each filename is any string that will only be seen from the new
    device or partition, and its content is the name for the mountpoint.
    For a partition, the string can be any of:

    # ID_FS_LABEL for my conventional drives, USB sticks, SD cards, etc
    # ID_FS_UUID for FAT and encrypted partitions, but try to make this a legacy option
    # ID_SERIAL_SHORT for DVD drives, NTFS, and certain other formats
    # ID_PART_ENTRY_NAME for encrypted partitions on GPT
    # (basename of) DEVNAME for unrecognised sticks, cards, etc
    # ID_SERIAL for DVD drives, NTFS, and certain other formats
    # quit after any success.¹

    When udev sees a device, a string matching:

    # properties are, in order:
    # ID_SERIAL_SHORT
    # ID_SERIAL
    # quit after any success.

    will create a device (typically cdromN, where N depends on which
    device) if inserting a data CD or DVD, but also create a symlink
    (by stripping off N).

    There are currently 59 entries to select from, and the setup is
    very flexible. For example, I have a dead USB stick with the
    serial number A400000000000215 that creates a "mountpoint" called
    "/media/. PLAY CD". If you place a Red Book CD into one particular
    PC and insert that stick, the CD drawer closes and the CD plays.
    The player has a 3.5mm socket connected to a HiFi system.
    The PC just has to be running for this trick to work, because
    a @reboot root cron job is watching /media with inotifywait.
    No one has to be logged in, or /home even unlocked.
    Pull the stick out and the CD drawer opens again.

    What about when you need multiple temporary mount points?

    I can only think of one or two occasions when I use /mnt at all:
    the obvious case, a "foreign"/brand-new stick; but also when
    I install a new system, I use /mnt for a USB stick that runs
    a huge initial install/configure script, which includes
    bootstrapping the setup I've just described above.

    In your parlance, my accessories are all pets, not cattle.

    ¹ comments from the rules script.

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)