Find the answer to your Linux question:
Results 1 to 9 of 9
In case /tmp is lost due to disk error, is it possible to replace device that is faulty with a new device on another disk (in /etc/fstab) and how to ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    18

    Exclamation Lost /tmp replacement

    In case /tmp is lost due to disk error, is it possible to replace device that is faulty with a new device on another disk (in /etc/fstab) and how to create a replacement disk device on a new disk?
    Thanks for your time

  2. #2
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    I'm not sure what you are asking.

    /tmp
    is a temporary directory. It's typically safe (some people even have a script for it) to clear that directory on shutdown so it's clean on reboot.

    /etc/fstab is where persistant mount points are defined for additional hard drives or removable media. This is not where drivers are found.

    Drivers (or kernel modules as known in Linux) have other locations and are kernel specific, and typically are installed by default along with any major distro.

    The control over which modules are loaded is mostly automatic, though in the case of potentially conflicting modules, configurations are made in the files in the /etc/modprobe.d directory.

    If you want to back up your system configuration, the directory to back up is /etc (including all sub-directories). If you have third party drivers (like windows network drivers via ndiswrapper), then you should keep a backup of those as well.

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Posts
    18
    Quote Originally Posted by D-cat View Post
    I'm not sure what you are asking.

    /tmp
    is a temporary directory. It's typically safe (some people even have a script for it) to clear that directory on shutdown so it's clean on reboot.

    /etc/fstab is where persistant mount points are defined for additional hard drives or removable media. This is not where drivers are found.

    Drivers (or kernel modules as known in Linux) have other locations and are kernel specific, and typically are installed by default along with any major distro.

    The control over which modules are loaded is mostly automatic, though in the case of potentially conflicting modules, configurations are made in the files in the /etc/modprobe.d directory.

    If you want to back up your system configuration, the directory to back up is /etc (including all sub-directories). If you have third party drivers (like windows network drivers via ndiswrapper), then you should keep a backup of those as well.
    Suppose that disk partition where /tmp is mounted is gone - but all ese is fine. How to "replace" that with new disk partition so that Suse can boot? ( root and else is fine).

  4. #4
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Do you have temp mounted on a separate partition?? It normally is just on the same partition as root.

  5. #5
    Just Joined!
    Join Date
    Apr 2009
    Posts
    18
    Quote Originally Posted by gogalthorp View Post
    Do you have temp mounted on a separate partition?? It normally is just on the same partition as root.
    Thanks for reply.
    I have two disks, so I want to put /tmp on a separate disk( to get better performance). So my question is - would I be able to replace that /tmp somehow if my second disk fails? It would be a separate partition on the second disk, root and /home would be on the first disk.

  6. #6
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Yes but you would need to boot from a cd distro if it failed because the tmp is required for normal operation. But then you could repair the damage because the even though the directory is required the contents are not.

  7. #7
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    You can simply define a separate drive to mount at /tmp in the fstab. It'll take over the current /tmp off the root dir transparently (making as if it never existed until the drive is unmounted).

    Then, if the new drive fails or is removed, it'll simply fail to mount and the system will use the current /tmp off the root dir as if there never was another driver there.

    I'd only suggest that you do not perform a mount or umount on a system dir while any users are logged in, it can cause the system to do unpredictable and undesirable things.

  8. #8
    Just Joined!
    Join Date
    Apr 2009
    Posts
    18
    Thans D-cat it looks as a working solution.
    Thank you everyone for your answers!

  9. #9
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,071
    Quote Originally Posted by D-cat View Post
    You can simply define a separate drive to mount at /tmp in the fstab. It'll take over the current /tmp off the root dir transparently (making as if it never existed until the drive is unmounted).

    Then, if the new drive fails or is removed, it'll simply fail to mount and the system will use the current /tmp off the root dir as if there never was another driver there.
    I would like to throw a to D-cat!
    That's a great tip!
    Thanks, man!
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...