Professional Web Applications Themes

"over-mounting" /var and /home - Linux Setup, Configuration & Administration

Hi All, Please help me that how can I solve the following problem on an appropiate way. When I installed the Debian GNU/ Linux system I created a separate partion for /boot. After installation I also would like to create separate partitions for /home and /var but I don't know how can I do it regularly. I made two partitions for them and I set the fstab in this way: # <file system> <mount point> <type> <options> <dump> <pass> /dev/md1 / ext3 errors=remount-ro 0 1 /dev/md2 none swap sw 0 0 proc /proc proc defaults 0 0 /dev/fd0 /floppy auto ...

  1. #1

    Default "over-mounting" /var and /home

    Hi All,

    Please help me that how can I solve the following problem on an
    appropiate way. When I installed the Debian GNU/ Linux system I created a
    separate partion for /boot. After installation I also would like to create
    separate partitions for /home and /var but I don't know how can I do it
    regularly. I made two partitions for them and I set the fstab in this way:

    # <file system> <mount point> <type> <options> <dump>
    <pass>
    /dev/md1 / ext3 errors=remount-ro 0 1
    /dev/md2 none swap sw 0 0
    proc /proc proc defaults 0 0
    /dev/fd0 /floppy auto user,noauto 0 0
    /dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
    /dev/md0 /boot ext2 defaults 0 2
    /dev/md3 /home ext3 errors=remount-ro 0 1
    /dev/md4 /var ext3 errors=remount-ro 0 1

    It works correctly but what was happen with the datas under the /home and
    /var on /root partition. Maybe I should delete these directory's contents,
    if yes, the /home is ok, but what will be happen if I delete the /var
    directory on a running system?

    Thanks: R. Bela



    Roboz Béla Guest

  2. #2

    Default Re: "over-mounting" /var and /home

    Roboz Béla <robozinterware.hu> wrote:
    > Hi All,
    >
    > Please help me that how can I solve the following problem on an
    > appropiate way. When I installed the Debian GNU/ Linux system I created a
    > separate partion for /boot. After installation I also would like to create
    > separate partitions for /home and /var but I don't know how can I do it
    > regularly. I made two partitions for them and I set the fstab in this way:
    >
    > # <file system> <mount point> <type> <options> <dump>
    ><pass>
    > /dev/md1 / ext3 errors=remount-ro 0 1
    > /dev/md2 none swap sw 0 0
    > proc /proc proc defaults 0 0
    > /dev/fd0 /floppy auto user,noauto 0 0
    > /dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
    > /dev/md0 /boot ext2 defaults 0 2
    > /dev/md3 /home ext3 errors=remount-ro 0 1
    > /dev/md4 /var ext3 errors=remount-ro 0 1
    >
    > It works correctly but what was happen with the datas under the /home and
    > /var on /root partition. Maybe I should delete these directory's contents,
    > if yes, the /home is ok, but what will be happen if I delete the /var
    > directory on a running system?
    the solution is much easier than you might think:

    for home:

    umount /home
    mkdir /tmp/x
    mount /dev/md3 /tmp/x
    mv /home/* /tmp/x
    umount /tmp/x
    mount /home


    same goes for var. ocnce you mount a filesystem in a directory, the
    previous content of that directory remains invisible (covered by the
    filesystem) until you unmount it from there.


    --

    life, the universe and everything
    [url]http://www.dtch.org[/url]

    armin walland Guest

  3. #3

    Default Re: "over-mounting" /var and /home

    "Roboz Béla" <robozinterware.hu> writes:

    ]Hi All,

    ] Please help me that how can I solve the following problem on an
    ]appropiate way. When I installed the Debian GNU/ Linux system I created a
    ]separate partion for /boot. After installation I also would like to create
    ]separate partitions for /home and /var but I don't know how can I do it
    ]regularly. I made two partitions for them and I set the fstab in this way:

    ]# <file system> <mount point> <type> <options> <dump>
    ]<pass>
    ]/dev/md1 / ext3 errors=remount-ro 0 1
    ]/dev/md2 none swap sw 0 0
    ]proc /proc proc defaults 0 0
    ]/dev/fd0 /floppy auto user,noauto 0 0
    ]/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
    ]/dev/md0 /boot ext2 defaults 0 2
    ]/dev/md3 /home ext3 errors=remount-ro 0 1
    ]/dev/md4 /var ext3 errors=remount-ro 0 1

    ]It works correctly but what was happen with the datas under the /home and
    ]/var on /root partition. Maybe I should delete these directory's contents,

    The data is hidden and unaccessible as long as the otehr file is mounted
    on top of them. No worry, except that they take up disk space.

    ]if yes, the /home is ok, but what will be happen if I delete the /var
    ]directory on a running system?
    What will happen is that the stuff will not delete-- the directory name
    will disappear, but the files won't until the next reboot, becasue
    programs still have the files open.
    So, reboot as single user. (linux 1 at LILO: prompt) and
    umount /var
    mv /var /var.old
    mkdir /var
    chmod a+rx /var
    reboot

    Now you can look into /var/old, see if there is stuff you want to save,
    and if not erase it.



    ]Thanks: R. Bela



    Bill Unruh Guest

Similar Threads

  1. CFINPUT type="radio" w/ "value" requires "label"
    By Iceborer in forum Macromedia ColdFusion
    Replies: 2
    Last Post: February 21st, 06:16 PM
  2. How do I use Flash to "open doors" to a home page?
    By David195701 webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 0
    Last Post: October 27th, 02:03 AM
  3. Cant open "Internet Options" in Windows XP Home Edition
    By Ben in forum Windows Setup, Administration & Security
    Replies: 2
    Last Post: July 23rd, 05:31 PM
  4. "Start" "Program" "Menu" list is empty
    By Pete in forum Windows XP/2000/ME
    Replies: 2
    Last Post: July 10th, 10:42 PM
  5. XP Home Edition "Messenger Service" pop-ups
    By Jupiter Jones [MVP] in forum Windows Setup, Administration & Security
    Replies: 3
    Last Post: July 6th, 04:04 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139