Announcement

Collapse
No announcement yet.

Ok - question about partition schemes...

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

    Ok - question about partition schemes...

    Ok - I'm not exactly a newbie to linux, and I'd always thought it was better to have multiple partitions rather than dumping everything but swap in /.

    My problem is, after reading some guides online, it seemed like it was a good idea to create seperate /usr and /usr/local partitions...well, now it seems that my /usr/local has BARELY been used, and everything is still going into /usr

    Is it possible to merge those back together, or even ge /usr/local back in the /usr partition and use the current /usr/local for something else? perhaps a mount point within my /home Also my /var is already 30% full - what's that REALLY used for, and should I have made it bigger? I REALLY don't want to re-setup my system - I hope I haven't fubar'ed it too badly.

    Just curious...here's a dump of my partition layout...

    Code:
              Size Used Avail Use% Mounted on
    /dev/hda1       471M  44M 403M 10% /boot
    /dev/hdb5       191G 888M 190G  1% /home
    /dev/hdb6       35G 544K  35G  1% /home/backup
    /dev/hda6       66G 3.2G  63G  5% /home/downloads
    /dev/hdb3       968M 712K 968M  1% /tmp
    /dev/hda3       20G 3.6G  16G 19% /usr
    /dev/hda5       20G 421M  19G  3% /usr/local
    /dev/hdb2       3.9G 1.2G 2.8G 30% /var

    #2
    Re: Ok - question about partition schemes...

    I'm not exactly a Linux newbie either, but I take precisely the opposite approach to you. Personally, I still use one humongous partition for everything except swap. That's because I'm too lazy to do what I'm going to suggest to you below.

    First, /usr/local is designated for custom software and resources. To quote the Debian Policy "Software and resources independent of the Debian (for Debian, read Ubuntu) distribution may be put into /usr/local and will never be touched by Debian." What you have there is an empty directory tree that you can fill up with things that you probably shouldn't. If there's anything in there, you put it there. If you didn't put anything there, what you see is just the overhead for an empty directory tree (4kB per directory).

    Again from the policy, "The /var hierarchy is the system's workspace. Files here are used for control, logging, caching and other administrative functions. No additional files or directories may be placed at the top level." Your /var partition is probably filling up with downloaded packages that you could clear out, because you no longer use them, and ancient log files. If you insist on running a zillion partitions you have to manage them! You can clean out the packages with "apt-get clean" or "apt-get autoclean". Just read the apt-get manpage. Unless there's some command I don't know (which is quite possible) you will have to clear out your obsolete /var/log archives by hand. The good news is they're usually small. If not, just cd to /var/log and go wild.

    Based on your opening sentence, I have suggested CLI techniques for cleaning. You are, of course, free to use the GUI, if you prefer.

    Comment


      #3
      Re: Ok - question about partition schemes...

      Though there can be uses for advanced partitioning schemes, it's easy to overdo it. One should carefully weigh the benefits and drawbacks of a particular scheme on your system and your uses.

      As a general rule, you're much more likely to benefit from an advanced scheme on servers than desktop systems.

      You should also have (at least a rough) an idea of how much space you need for partitions if you wish to set up an advanced scheme (on your setup, /usr and /usr/local are the same size, which feels like overkill on /usr/local)

      About separate /usr (and /usr/local), there are a few reasons why they could be beneficial, firstly, one could mount /usr as read-only for added file security (in this case, there is usually no need for separate /usr/local), secondly, one could use the same /usr filesystem on a number of networked machines (in which case it's often a good idea to have a separate /usr/local for locally installed files). Of course on a lone desktop system, the benefits are not likely to overcome the drawbacks of wasting or running out of room on those filesystems.

      As askrieger pointed out, /usr/local doesn't contain anything you don't specifically put there, it's a good place for locally installed/created scripts or software one installs outside the package management system etc.

      About /var, it's usually set up as a separate partition on servers because you can set it up as a read-write partition when most of the system is mounted read-only for security reasons, or to prevent /var to clog up the system by filling up the disk space on / (because on servers /var is often used to store email and www data, for example)...on a desktop system, just about the only thing that can eat up the disk space is the package cache (as askrieger mentioned)...logs usually don't take up much space and log rotation should tidy things up on the most active logs on a regular basis.

      To conclude, I'd recommend keeping the partitioning simple, unless there are clear reasons for something different (it's often easily justifiable to create a separate /home, for example).

      Comment


        #4
        Re: Ok - question about partition schemes...

        Thanks for the replies...

        I'll just leave it this way (unless I run out of room somewhere) until the next Kubuntu release, and then format everything except my /home, /home/backup, and /home/downloads and I should be ok

        And I should add, while I'm not a newbie (I messed w/ slackware back in the 9.0 days and the first 2 "Cores" of Fedora) - I'm not an expert, and I've never used a Debian based distro before...

        I have, however thanks to (K)ubuntu (I love kde) finally made the switch to Linux full time - I have everything set up perfectly - I'm running the x86_64 version, and I have flash, wine (for Counter-Strike) and everything else working PERFECTLY for me - that's why I'm apprehensive about just blowing it away and doing it over


        Anyway - is there a way to move what's in the /usr/local partition into a /usr/local folder and either mount that extra space as a subfolder of /home, or grow my /usr partition to take up the space?

        I'm using XFS as my filesystem except for boot, / and swap...Boot and / are ext3 and swap is, well of course swap

        Thanks again - this community is what makes Kubuntu rock!

        Comment


          #5
          Re: Ok - question about partition schemes...

          Originally posted by jayson.rowe
          Anyway - is there a way to move what's in the /usr/local partition into a /usr/local folder and either mount that extra space as a subfolder of /home, or grow my /usr partition to take up the space?
          Well, you can remount your /usr/local partition to a different mountpoint (like /home/data) and then copy the files to /usr/local directory (on your /usr partition)
          1. create a mountpoint directory (/home/data)
          2. unmount /usr/local
          3. edit /etc/fstab, changing the mountpoint from /usr/local to /home/data
          4. remount the partition
          5. move the contents of /home/data to /usr/local
          (If you need the actual commands to perform these, post again)

          Theoretically you should be able to resize your /usr partition to take up the space (provided the partitions are next to each other), but this can be a bit tricky depending on your setup (and I have very little experience on XFS, so I don't know how it behaves)...however, I'd definitely recommend making full backups before you attempting it, and as 20 GBs should be quite enough for /usr, I'd suggest you make better use of the disk space (under /home), at least for now (since you're planning to reinstall and repartition eventually anyway) .

          Comment


            #6
            Re: Ok - question about partition schemes...

            could you...

            Use GParted to modify the size of the partitions so you aren't wasting as much space?

            Originally posted by Ant2ne
            GParted is a great program. One of Vista's great claims is that it can now resize partitions without formatting or loosing data on the partition. So, this free program can do that too. And it can format partitions into almost any known file structure, including ntfs, fatXX and ext. When installing Fiesty, gparted will load and help you to modify partitions. You can't, obviously change the partition that you booted from, so you should get the live bootable cd iso for gparted, or the one called System Rescue CD which has gparted in it.
            Registered Linux User: 450747<br />Registered Ubuntu User: 16269

            Comment


              #7
              Re: Ok - question about partition schemes...

              Gee whiz! I didn't know that Ubuntu had XFS. I thought that it had gone the way of the 2.4.x kernel. As you're probably aware, XFS has enormous THEORETICAL advantages over either ext3 or RFS. Some people think that it was the second best thing (after the C++ STL) to come out of SGI. But, it has some practical disadvantages. Most notably, an XFS cannot be shrunk because everything is distributed. Also, I've heard random chatter that when an XFS file system fills up it, you get a lot of disk thrashing. I can't talk from personal experience, though, because the last time I used XFS was when I had a dialup account on an IRIX system years ago.

              Comment


                #8
                Re: Ok - question about partition schemes...

                I have no idea what you were just talking about. I just wrote down some of the options that gparted can format to.
                Registered Linux User: 450747<br />Registered Ubuntu User: 16269

                Comment


                  #9
                  Re: Ok - question about partition schemes...

                  The O.P. is using XFS.

                  Comment


                    #10
                    Re: Ok - question about partition schemes...

                    OP?
                    Registered Linux User: 450747<br />Registered Ubuntu User: 16269

                    Comment


                      #11
                      Re: Ok - question about partition schemes...

                      O.P. = Original Poster.

                      Comment


                        #12
                        Re: Ok - question about partition schemes...

                        Thanks for the responses guys - now that I know what /usr/local is being used for (I knew it was for user added software, but I didn't know the package manager wouldn't use it), I'm making better use of it - loading my games (Enemy Territoty, UT 2004, Quake 4, Nexuiz) there.

                        I think it's under control now.

                        As for the XFS thing - my last foray into linux was with Slackware and Fedora back in the kernel 2.4.x days - I noticed a HUGE difference with ReiserFS vs. ext3 - in fact, I think ext3 sucks, I won't use it at all. I don't really like ReiserFS - it had caused problems for me in the past (lost data).

                        When I finally decided about a month ago to fully switch to Linux, I started researching filesystems, and I loaded both Ubuntu and Kubuntu a few times w/ different filesystems - I remembered how much I hated GNOME when I loaded Ubuntu, but soon found out about Kubuntu, and was in heaven.

                        wow - sorry for the ramble - - anyway the point of all this is, I found XFS to be by far the fastest filesystem that I tried, which included ReiserFS, JFS, and of course, ext3.

                        Comment


                          #13
                          Re: Ok - question about partition schemes...

                          I'd be interested in learning what happens when some of your numerous small partitions start filling up. Then again, since they're small you won't thrash very far so you may not even notice it.

                          Comment


                            #14
                            Re: Ok - question about partition schemes...

                            I'll let you know - everythings a learning experience for me

                            Here's where I'm at so far (after installing my games, and probably everything else I will install - can't think of anything else I need, but you never know) I did change one of my mountpoints - /backup to /vmware for my XP and Debian virtual machines to share...

                            Code:
                            Filesystem      Size Used Avail Use% Mounted on
                            /dev/hda1      471M 44M 403M 10% /boot
                            /dev/hdb5      191G 4.9G 186G 3% /home
                            /dev/hdb6       35G 9.9G 25G 29% /home/vmware
                            /dev/hda6       66G 11G 56G 16% /home/downloads
                            /dev/hdb3      968M 2.4M 966M 1% /tmp
                            /dev/hda3       20G 3.5G 16G 18% /usr
                            /dev/hda5       20G 6.9G 13G 36% /usr/local
                            /dev/hdb2      3.9G 792M 3.2G 20% /var

                            Comment

                            Working...
                            X