Can /usr be split onto 2 partitions? - Suse

This is a discussion on Can /usr be split onto 2 partitions? - Suse ; I'd like to keep partition sizes below 4gb and /usr is already around 5gb. TIA...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 25

Thread: Can /usr be split onto 2 partitions?

  1. Can /usr be split onto 2 partitions?


    I'd like to keep partition sizes below 4gb and
    /usr is already around 5gb.

    TIA

  2. Re: Can /usr be split onto 2 partitions?

    over.here.from@over.there wrote:
    >
    > I'd like to keep partition sizes below 4gb and /usr is already around 5gb.


    A mount point must be one partition. However, a partition can be
    "logical" too. That means you could combine two 4GB partitions into an
    8GB one with LVM, and mount it as /usr.

  3. Re: Can /usr be split onto 2 partitions?

    Nikos Chantziaras wrote:
    > over.here.from@over.there wrote:
    >>
    >> I'd like to keep partition sizes below 4gb and /usr is already around
    >> 5gb.

    >
    > A mount point must be one partition. However, a partition can be
    > "logical" too. That means you could combine two 4GB partitions into an
    > 8GB one with LVM, and mount it as /usr.


    Thanks,

    I've never used LVM yet, am a bit reluctant/scared of it. How about
    a /usr on a separate partition but with a /share link in it for that
    subfolder on a another partition?




  4. Re: Can /usr be split onto 2 partitions?

    over.here.from@over.there wrote:
    > Nikos Chantziaras wrote:
    >> over.here.from@over.there wrote:
    >>>
    >>> I'd like to keep partition sizes below 4gb and /usr is already around
    >>> 5gb.

    >>
    >> A mount point must be one partition. However, a partition can be
    >> "logical" too. That means you could combine two 4GB partitions into
    >> an 8GB one with LVM, and mount it as /usr.

    >
    > Thanks,
    >
    > I've never used LVM yet, am a bit reluctant/scared of it. How about
    > a /usr on a separate partition but with a /share link in it for that
    > subfolder on a another partition?


    That's possible too, for example:

    /dev/sda1 -> /usr
    /dev/sda2 -> /usr/share

    But how much data does /usr/share contain? It's just about 800MB here.

    LVM is actually pretty easy to use. It has the advantage that you can
    resize partitions without having to modify the partition table of the
    hard disk and without even having to remount; it's pretty much
    "on-the-fly". However, the easiest way to use LVM is to enable it
    during the initial installation of openSUSE; if you want to switch to
    LVM in a running system that does not use LVM, well, I'm not sure what
    exactly must be done :P

  5. Re: Can /usr be split onto 2 partitions?

    Nikos Chantziaras wrote:
    > over.here.from@over.there wrote:
    >> Nikos Chantziaras wrote:
    >>> over.here.from@over.there wrote:
    >>>>
    >>>> I'd like to keep partition sizes below 4gb and /usr is already
    >>>> around 5gb.
    >>>
    >>> A mount point must be one partition. However, a partition can be
    >>> "logical" too. That means you could combine two 4GB partitions into
    >>> an 8GB one with LVM, and mount it as /usr.

    >>
    >> Thanks,
    >>
    >> I've never used LVM yet, am a bit reluctant/scared of it. How about
    >> a /usr on a separate partition but with a /share link in it for that
    >> subfolder on a another partition?

    >
    > That's possible too, for example:
    >
    > /dev/sda1 -> /usr
    > /dev/sda2 -> /usr/share


    I prefer /usr and /usr/lib (/usr/lib64) to be separate myself. Increases program
    load times considerably (if on separate devices).

    But you can certainly break things however you want. Be it for
    performance or any other reason.

  6. Re: Can /usr be split onto 2 partitions?

    On Sun, 03 Feb 2008 12:48:14 -0500, over.here.from@over.there wrote:

    >
    >I'd like to keep partition sizes below 4gb and
    >/usr is already around 5gb.
    >
    >TIA


    If a directory name points to two different locations, do you not see
    where that might cause a problem?

  7. Re: Can /usr be split onto 2 partitions?

    over.here.from@over.there wrote:
    >
    > I'd like to keep partition sizes below 4gb and
    > /usr is already around 5gb.


    Just curious, why would you want to keep it below 4GB?

    houghi
    --
    Quote correct (NL) http://www.briachons.org/art/quote/
    Zitiere richtig (DE) http://www.afaik.de/usenet/faq/zitieren
    Quote correctly (EN) http://www.netmeister.org/news/learn2quote.html

  8. Re: Can /usr be split onto 2 partitions?

    Nikos Chantziaras wrote:
    > That's possible too, for example:
    >
    > /dev/sda1 -> /usr
    > /dev/sda2 -> /usr/share


    You can mount each and every directory and there is no need to have the
    directory above it ponting somewhere else.

    Better look at it from the other side. Each partition can point to any
    directory. Only do this for directories that are needed after the system
    has mounted them.

    > But how much data does /usr/share contain? It's just about 800MB here.


    Mine is 2GB, /usr/lib is 1.6GB
    For the others: To see how much you use in each directory:
    sudo du -h --max-depth=1 /usr/

    > LVM is actually pretty easy to use. It has the advantage that you can
    > resize partitions without having to modify the partition table of the
    > hard disk and without even having to remount; it's pretty much
    > "on-the-fly". However, the easiest way to use LVM is to enable it
    > during the initial installation of openSUSE; if you want to switch to
    > LVM in a running system that does not use LVM, well, I'm not sure what
    > exactly must be done :P


    Disadvantage is that if one partition breaks, everything is lost.

    houghi
    --
    Quote correct (NL) http://www.briachons.org/art/quote/
    Zitiere richtig (DE) http://www.afaik.de/usenet/faq/zitieren
    Quote correctly (EN) http://www.netmeister.org/news/learn2quote.html

  9. Re: Can /usr be split onto 2 partitions?

    Nikos Chantziaras wrote:
    > over.here.from@over.there wrote:
    >> Nikos Chantziaras wrote:
    >>> over.here.from@over.there wrote:
    >>>>
    >>>> I'd like to keep partition sizes below 4gb and /usr is already
    >>>> around 5gb.
    >>>
    >>> A mount point must be one partition. However, a partition can be
    >>> "logical" too. That means you could combine two 4GB partitions into
    >>> an 8GB one with LVM, and mount it as /usr.

    >>
    >> Thanks,
    >>
    >> I've never used LVM yet, am a bit reluctant/scared of it. How about
    >> a /usr on a separate partition but with a /share link in it for that
    >> subfolder on a another partition?

    >
    > That's possible too, for example:
    >
    > /dev/sda1 -> /usr
    > /dev/sda2 -> /usr/share


    I like this one, so you just drop a link to say /dev/sda2 into
    /usr on /dev/sda1?



    > But how much data does /usr/share contain? It's just about 800MB here.


    Mine's 1.9 gb I think it's the biggest folder under /usr


    > LVM is actually pretty easy to use. It has the advantage that you can
    > resize partitions without having to modify the partition table of the
    > hard disk and without even having to remount; it's pretty much
    > "on-the-fly". However, the easiest way to use LVM is to enable it
    > during the initial installation of openSUSE; if you want to switch to
    > LVM in a running system that does not use LVM, well, I'm not sure what
    > exactly must be done :P


    It's beacuse i've got 3 sytems in the family on 2 laptops and a desktop.
    I'm goingto work with a single master system and just mirror it to
    the laptops instead of reinstalling and tweaking in three's. Plus the
    updates are getting so large that I will also backlevel the desktop to
    32 bit for commonality with the 32 bit laptops. It's the copying over
    on DVD's that's limiting to 4 gb's.



  10. Re: Can /usr be split onto 2 partitions?

    over.here.from@over.there writes:


    >I'd like to keep partition sizes below 4gb and
    >/usr is already around 5gb.


    /usr is not a partition.Thus you can put /usr on one partition and
    /usr/lib, or /usr/local/ or wahtever subdirectory on another and mount them
    appropriately.



    >TIA


  11. Re: Can /usr be split onto 2 partitions?

    over.here.from@over.there wrote:

    > It's beacuse i've got 3 sytems in the family on 2 laptops and a desktop.
    > I'm goingto work with a single master system and just mirror it to
    > the laptops instead of reinstalling and tweaking in three's. Plus the
    > updates are getting so large that I will also backlevel the desktop to
    > 32 bit for commonality with the 32 bit laptops. It's the copying over
    > on DVD's that's limiting to 4 gb's.


    It seems that compressed copy can help you here.
    You will be surprised how much compression can help.
    For instance 650 MB CD expands to 1.8 GB system.

    I don't see reason not to create list of directories sorted by size and then
    copy directories to separate DVDs. It seems to be more flexible than
    managing partitions, and it can be automated with script.

    Considering that libata supports up to 16 devices that would mean you will
    run out of partitions after 64 GB.

    --
    Regards, Rajko.
    See http://en.opensuse.org/Portal

  12. Re: Can /usr be split onto 2 partitions?

    Unruh wrote:
    > over.here.from@over.there writes:
    >
    >
    >> I'd like to keep partition sizes below 4gb and
    >> /usr is already around 5gb.

    >
    > /usr is not a partition.Thus you can put /usr on one partition and
    > /usr/lib, or /usr/local/ or wahtever subdirectory on another and mount them
    > appropriately.


    I know it's not a partition and I was thinking of making it one
    when I noticed that (in my case) /usr alone is 4.4gb. That still
    mirrors to a single DVD file, but who knows for how long?






  13. Re: Can /usr be split onto 2 partitions?

    Rajko M. wrote:
    > over.here.from@over.there wrote:
    >
    >> It's beacuse i've got 3 sytems in the family on 2 laptops and a desktop.
    >> I'm goingto work with a single master system and just mirror it to
    >> the laptops instead of reinstalling and tweaking in three's. Plus the
    >> updates are getting so large that I will also backlevel the desktop to
    >> 32 bit for commonality with the 32 bit laptops. It's the copying over
    >> on DVD's that's limiting to 4 gb's.

    >
    > It seems that compressed copy can help you here.
    > You will be surprised how much compression can help.
    > For instance 650 MB CD expands to 1.8 GB system.


    My objectives involve off hardware migration, recovery and security.
    You're right, I could compress to move and then decompress but in
    the end all that only complicates the procedure (although it
    does save on transport overhead).

    > I don't see reason not to create list of directories sorted by size and then
    > copy directories to separate DVDs. It seems to be more flexible than
    > managing partitions, and it can be automated with script.


    Last I heard, the only safe way to move an OS around was with dd.

    > Considering that libata supports up to 16 devices that would mean you will
    > run out of partitions after 64 GB.


    That's a valid point for some industrial setups. My biggest
    OS is a large linux and can be Suse or Debian. Even if spread
    out on 2 or 3 partitions that still leaves plenty of others
    not mention other disks. Here it gets even higher over my
    head. Let's assume we do run into your partitions limit,
    can I mount /dev/sdax as /usr and then have within /usr
    link(s) pointing to subfoolder(s) on another disk or in data
    partitions on the same disk?

    My question, because I have never done it, is more technical
    than philosophical i.e. how to do it. Can one mount /dev/sdax
    as /usr and /dev/sday as /usr/whatever in fstab? I've never
    mounted a recursive mountpoint if it can be called that.



  14. Re: Can /usr be split onto 2 partitions?

    oops, wrong from header in that one :-(

  15. Re: Can /usr be split onto 2 partitions?

    nomail-nospam@no.org wrote:

    > Rajko M. wrote:
    >> over.here.from@over.there wrote:
    >>
    >>> It's beacuse i've got 3 sytems in the family on 2 laptops and a desktop.
    >>> I'm goingto work with a single master system and just mirror it to
    >>> the laptops instead of reinstalling and tweaking in three's. Plus the
    >>> updates are getting so large that I will also backlevel the desktop to
    >>> 32 bit for commonality with the 32 bit laptops. It's the copying over
    >>> on DVD's that's limiting to 4 gb's.

    >>
    >> It seems that compressed copy can help you here.
    >> You will be surprised how much compression can help.
    >> For instance 650 MB CD expands to 1.8 GB system.

    >
    > My objectives involve off hardware migration, recovery and security.
    > You're right, I could compress to move and then decompress but in
    > the end all that only complicates the procedure (although it
    > does save on transport overhead).


    Base system one disk that will recover root of file system, and that will
    alow comfortable recovery of the rest from running system. There is no
    simplicity in many partitions.

    >> I don't see reason not to create list of directories sorted by size and
    >> then copy directories to separate DVDs. It seems to be more flexible than
    >> managing partitions, and it can be automated with script.

    >
    > Last I heard, the only safe way to move an OS around was with dd.


    Not really. Linux has not much to hide.
    I moved whole root from one partition to the other using Midnight Commander
    on live CD, and single time it made a problem was when one root was ext3
    and the other reiserfs, or vice versa. I never looked in reason why it
    failed, just set the rule "format target partition with same file system as
    the source".

    If you create always the same set of partitions, which can be larger than
    original and assign same mount points than you can move/copy/recover your
    system on larger hard disk without changing any configuration file. The
    only problem that I can see is bootloader and there you may need dd or
    recovery CD.

    ....
    > My question, because I have never done it, is more technical
    > than philosophical i.e. how to do it. Can one mount /dev/sdax
    > as /usr and /dev/sday as /usr/whatever in fstab? I've never
    > mounted a recursive mountpoint if it can be called that.


    Mount is simple. If mount point directory exist than you can mount.
    I just mounted archive on my home directory which is also on separate
    partition. So I have archive mounted on home mounted on / .


    --
    Regards, Rajko.
    See http://en.opensuse.org/Portal

  16. Re: Can /usr be split onto 2 partitions?

    over.here.from@over.there wrote:

    > oops, wrong from header in that one :-(


    Yes.
    Now newsgroup knows your another fake email.

    Which can be used for .... hmm .... I have no idea ;-)

    --
    Regards, Rajko.
    See http://en.opensuse.org/Portal

  17. Re: Can /usr be split onto 2 partitions?

    nomail-nospam@no.org wrote:
    >> It seems that compressed copy can help you here.
    >> You will be surprised how much compression can help.
    >> For instance 650 MB CD expands to 1.8 GB system.

    >
    > My objectives involve off hardware migration, recovery and security.
    > You're right, I could compress to move and then decompress but in
    > the end all that only complicates the procedure (although it
    > does save on transport overhead).


    I asume you have network and the instalation CD/DVD. I have a feeling
    that you are making things harder for yourself then need be. The
    software you can re-install from the instalation CD/DVD. After exporting
    things in the YaST installer and then importing them in the new
    instalation, you need to save much, much less.

    Obviously you are in the position to decide what is best for you. For a
    home system, I think it is complete overkill, especialy if you have a
    second (desktop) machine. Put in that second machine a new HD that will
    take care of backups and do the incremential backups there.

    Doing partitions not larger then 4.2GB just because you want to burn
    them on DVD will cause problems at some point and that will come sooner
    then you will need those DVDs to restore things.

    What I would do is first look at what is the most critical in a restore
    situation and then look what is best suited for you. Speed, ease of use,
    accuracy (pick any two ;-) ).

    How often are you going to back up things and why. Also read the `man
    hier` where you can see what directories you can make 'read only'. If
    you then put those on a seperate partition, you can mount those as 'read
    only', so not even root can delete them by accident.

    Or just the (sub) directories, so you won't accidentily overwrite them.
    This can be done for dta directories that contain data that does not
    change often as well, like mp3 files or images.

    Then if you need access, you mount/chmod it read/write, do the changes
    and change it back again.

    houghi
    --



    This space left blank intentionaly

  18. Re: Can /usr be split onto 2 partitions?

    On 2008-02-03 23:15, over.here.from@over.there wrote:

    > .....
    > I like this one, so you just drop a link to say /dev/sda2 into
    > /usr on /dev/sda1?
    >
    >


    You just add a new line in /etc/fstab , with /dev/sda2 ,
    using /usr/share as a moint point, copy the line from
    something else and edit.
    Do not mount it yet.
    Make sure you made a filesystem with mkfs. /dev/sda2

    Now rename /usr/share
    mv /usr/share{,.old} ( same as mv /usr/share /usr/share.old)

    Any applications that has a file open in /usr/share will continue
    to use the same file in share.old.

    Make a new share

    mkdir /usr/share

    Set right owner and permission.

    To know the right permission of a file or directory, you must know
    what package it was includen in:

    rpm -qf /usr/share

    In this case filesystem-
    do:
    rpm -qvl filesystem | grep share$
    and you will see owner root, group root, perm 755

    chown root.root /usr/share ; chmod 755 /usr/share

    Now mount the new share

    mount /usr/share

    Now rsync the old share

    rsync -av /usr/share.old/. /usr/share/.

    (Some filesystems need -avH to preserve hard links, but /usr/share
    has only soft links, to make it easy to split over filesystems.)


    Keep /usr/share.old until your applications has restarted, or
    nothing is using it.

    you can maybe do lsof | grep /usr/share , but I don't know
    if it will show share.old or share.
    To be safe, wait until after the next reboot before you do
    rm -r /usr/share.old

    (and ,,, not rm -rf , that is a bogus option that most users think is force,
    but -f is only an option to not complain if you name a file that don't exist,
    used in scripts where you don't test first if /usr/share.old is already deleted)

    /bb

  19. Re: Can /usr be split onto 2 partitions?

    On 2008-02-03, over.here.from@over.there wrote:
    > It's beacuse i've got 3 sytems in the family on 2 laptops and a desktop.
    > I'm goingto work with a single master system and just mirror it to
    > the laptops instead of reinstalling and tweaking in three's. Plus the
    > updates are getting so large that I will also backlevel the desktop to
    > 32 bit for commonality with the 32 bit laptops. It's the copying over
    > on DVD's that's limiting to 4 gb's.


    Use a double-layer DVD. More expensive, but you setup remains simple,
    instead of going off into the definitively 'odd'.

    Must admit, I haven't seen a RW in double Layer yet. But don't see why they
    wouldn't be available, somwhere.

    Alternatively use an USB drive. Haven't you got a 40GB disk laying around,
    doing nothing? Stick it in an USB box and for format it to Ext3, if only a
    10 GB partiion..


    --
    There is an art, it says, or rather, a knack to flying.
    The knack lies in learning how to throw yourself at the ground and miss.
    Douglas Adams

  20. Re: Can /usr be split onto 2 partitions?

    birre wrote:
    > On 2008-02-03 23:15, over.here.from@over.there wrote:
    >
    >> .....
    >> I like this one, so you just drop a link to say /dev/sda2 into
    >> /usr on /dev/sda1?
    >>
    >>

    >
    > You just add a new line in /etc/fstab , with /dev/sda2 ,
    > using /usr/share as a moint point, copy the line from
    > something else and edit.
    > Do not mount it yet.
    > Make sure you made a filesystem with mkfs. /dev/sda2
    >
    > Now rename /usr/share
    > mv /usr/share{,.old} ( same as mv /usr/share /usr/share.old)
    >
    > Any applications that has a file open in /usr/share will continue
    > to use the same file in share.old.
    >
    > Make a new share
    >
    > mkdir /usr/share
    >
    > Set right owner and permission.
    >
    > To know the right permission of a file or directory, you must know
    > what package it was includen in:
    >
    > rpm -qf /usr/share
    >
    > In this case filesystem-
    > do:
    > rpm -qvl filesystem | grep share$
    > and you will see owner root, group root, perm 755
    >
    > chown root.root /usr/share ; chmod 755 /usr/share
    >
    > Now mount the new share
    >
    > mount /usr/share
    >
    > Now rsync the old share
    >
    > rsync -av /usr/share.old/. /usr/share/.
    >
    > (Some filesystems need -avH to preserve hard links, but /usr/share
    > has only soft links, to make it easy to split over filesystems.)
    >
    >
    > Keep /usr/share.old until your applications has restarted, or
    > nothing is using it.
    >
    > you can maybe do lsof | grep /usr/share , but I don't know
    > if it will show share.old or share.
    > To be safe, wait until after the next reboot before you do
    > rm -r /usr/share.old
    >
    > (and ,,, not rm -rf , that is a bogus option that most users think is
    > force,
    > but -f is only an option to not complain if you name a file that don't
    > exist, used in scripts where you don't test first if /usr/share.old is
    > already deleted)
    >
    > /bb


    Thank you very much, I know it took some time and thought to punch it
    all in and I assure you it's appreciated! I'll save it as a valuable
    tutorial.





+ Reply to Thread
Page 1 of 2 1 2 LastLast