Announcement

Collapse
No announcement yet.

How To Link /home To Other Partitions

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How To Link /home To Other Partitions

    My 250 GB hdd is partitioned thus:
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 12G 11G 962M 92% /
    /dev/sda2 swap
    /dev/sda3 35G 1.9G 32G 6% /home
    /dev/sda5 77G 14G 60G 19% /mnt/sda5
    /dev/sda6 39G 177M 37G 1% /mnt/sda6
    /dev/sda7 39G 3.7G 33G 11% /mnt/sda7
    /dev/sda8 39G spare
    I can't work out how come the / partition is so full, nor can I understand why I can't see dirs/files on /sda6 or /sda7 when I know they are there. I have linked (symlink) /sda5 to /home/roodog/Datafiles, /sda6 to /home/roodog/MP3 and /sda7 to /home/roodog/Photos. My fstab is currently:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/sda1
    UUID=6be78fc2-86bf-4730-bfb5-a052151987f3 / ext3 nouser,relatime,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
    # /dev/sda3
    UUID=dd63be2d-0147-4a27-902a-8084b305fc66 /home ext3 nouser,relatime,atime,auto,rw,dev,exec,suid 0 2
    # /dev/sda2
    UUID=23b68617-d614-47b4-a73d-248a05ae2422 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,utf8,atime,noauto,rw,dev,exec,suid 0 0

    UUID=fa7bda63-61c7-4a12-87a2-3cd3d60c1848 /mnt/sda5 ext3 users,async,atime,auto,rw,exec,dev,suid 0 2
    # /dev/sda5

    UUID=6eb433be-1e1e-467e-9184-2c2e6cb16113 /mnt/sda6 ext3 users,async,atime,auto,rw,exec,dev,suid 0 2
    # /dev/sda6

    UUID=01067033-6751-450d-964e-b70957adbabd /mnt/sda7 ext3 users,async,atime,auto,rw,exec,dev,suid 0 2
    # /dev/sda7

    This setup was OK until I started swapping some files around.
    Any help appreciated.
    David

    #2
    Re: How To Link /home To Other Partitions

    As to / being full, that is where everything is stored. One common place is /var being full as loads of stuff gets chucked in there, usual is /var/cache/apt/archives This is when you download a package it stores it locally and they need to be deleted or they just stay there, go into konsole and issue

    Code:
    sudo apt-get clean
    this will get rid of them all.

    Another thing to check, are you running some indexer like htdig, that will take up lots of space. It may be worth running a visual file size app to see where the space is used and then post back and someone will tell you how to free it up.

    On my system I have 10gb each for /, /var, /usr and /usr/local plus another few partition that I make symlinks to for data heavy applications such as flightgear.

    Comment


      #3
      Re: How To Link /home To Other Partitions

      OK, I figured out where I went wrong re the partitions /sda6 & /sda7. Once I unmounted them and removed from fstab, things were back to normal. I'm no closer to sorting / tho - I ran apt-get clean, du -h, df -h, du -kx, du -bc and whatever else I could find in various forums, but still can't pin down why / is full.

      Comment


        #4
        Re: How To Link /home To Other Partitions

        You're root is 12G which is more than ample, but something is taking up huge amounts of that space. How many kernel versions are installed on your system? Did you at any time, have your /home directory on the same partition as root?
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: How To Link /home To Other Partitions

          I installed the OS from the Kubuntu 8.04 LiveCD, having firstly set up my partition structure using GParted. I make it a point to keep /home on a separate partition from /, but I basically just have the three ie Root, Swap & Home, plus some extra data partitions. When my problem arose I was transferring some largish files between /Datafiles (symlinked to /mnt/sda6) and /Photos (symlinked to /mnt/sda7) but I can see no evidence that these have somehow found their way to Root. I scanned / in Filelight, but the biggest slice of the pie I could see was /usr. Looks like I'll have to restore / from an earlier PartImage copy I have.

          Comment


            #6
            Re: How To Link /home To Other Partitions

            Hi,

            This may help. I found it on the web and it has proved useful (wish I could remember authors name to give credit).

            make a script with the following I call mine "find_large":
            #!/bin/bash
            # if nothing is passed to the script, show usage and exit
            [[ -n "$1" ]] || { echo "Usage: findlarge [PATHNAME]"; exit 0 ; }
            # simple using find, $1 is the first variable passed to the script
            find $1 -type f -size +20000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

            the only thing you need to pass to it is the directory you want to check. ex:
            find_large /home/xxx or .. / or .. /var

            Hope this helps......

            Comment


              #7
              Re: How To Link /home To Other Partitions

              You aren't by chance, running Strigi? It 'consumes' HD space very quickly.
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                [SOLVED]Re: How To Link /home To Other Partitions

                Right, got this all nutted out, thanks to Trial & Error. Because I had Root as the owner of /sda6 & /sda7, everything I put into those partitions was treated as going into / - now that I have done a chown to my user, and replaced the partitions on fstab, things are hunky-dory ie
                Filesystem Size Used Avail Use% Mounted on
                /dev/sda1 12G 2.8G 8.3G 25% /
                varrun 505M 272K 505M 1% /var/run
                varlock 505M 0 505M 0% /var/lock
                udev 505M 64K 505M 1% /dev
                devshm 505M 0 505M 0% /dev/shm
                lrm 505M 39M 467M 8% /lib/modules/2.6.24-19-generic/volatile
                /dev/sda3 35G 416M 33G 2% /home
                /dev/sda5 77G 13G 61G 18% /mnt/sda5
                /dev/sda6 39G 4.4G 33G 13% /mnt/sda6
                /dev/sda7 39G 525M 36G 2% /mnt/sda7

                Experience is the best teacher, eh. Thanks for the help stealthbanana, snowhog & ppberns.

                Comment


                  #9
                  Re: How To Link /home To Other Partitions

                  Good job! Always a good feeling when one figures out a problem on their own - I know!

                  Looking over your posts again, I believe I know where you went wrong initially.

                  I have linked (symlink) /sda5 to /home/roodog/Datafiles, /sda6 to /home/roodog/MP3 and /sda7 to /home/roodog/Photos.
                  /dev/sda5 77G 14G 60G 19% /mnt/sda5
                  /dev/sda6 39G 177M 37G 1% /mnt/sda6
                  /dev/sda7 39G 3.7G 33G 11% /mnt/sda7
                  The 'problem' was in your original entries in fstab that I've put in red above. /mnt is located under / so by mounting your three partitions there, you in fact, mounted them within the root partition.

                  The symlink only made it possible to 'see' them as directories in your designated /home/roodog specified directories - the data was not actually there.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment

                  Working...
                  X