Partition Splitting - Mandriva

This is a discussion on Partition Splitting - Mandriva ; Mandriva 2008.0. I have separate partitions on my hard-drive for "/", /backups, /home, and /tmp. The '/' partition is now full, and I cant extend its size due to the fact that there are other partitions following it. The '/' ...

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

Thread: Partition Splitting

  1. Partition Splitting

    Mandriva 2008.0.

    I have separate partitions on my hard-drive for "/", /backups, /home,
    and /tmp. The '/' partition is now full, and I cant extend its size
    due to the fact that there are other partitions following it. The '/'
    sub-directory that seems to be the biggest is /usr, and I have plenty of
    unused space on the drive after the Linux directories.

    What is the procedure for removing /usr from the '/' partition, and
    putting the content in a separate (new, 10GB) partition? I have Googled
    without success ...

    Should I use a live CD (Knoppix?) to create the new partition, and then
    the live CD command line to cp the old /usr to the new and then delete
    the old? If so, how do I edit the fstab? Or can the whole exercise be
    done under mcc?

    --
    John Williams
    Nelson, New Zealand

  2. Re: Partition Splitting

    John Williams wrote:
    > Mandriva 2008.0.
    > I have separate partitions on my hard-drive for "/", /backups, /home,
    > and /tmp. The '/' partition is now full, and I cant extend its size
    > due to the fact that there are other partitions following it. The '/'
    > sub-directory that seems to be the biggest is /usr, and I have plenty of
    > unused space on the drive after the Linux directories.
    >
    > What is the procedure for removing /usr from the '/' partition, and
    > putting the content in a separate (new, 10GB) partition? I have Googled
    > without success ...
    >
    > Should I use a live CD (Knoppix?) to create the new partition, and then
    > the live CD command line to cp the old /usr to the new and then delete
    > the old? If so, how do I edit the fstab? Or can the whole exercise be
    > done under mcc?


    I would suggest first backing up the system.
    Make sure you have a copy of tar at /bin/tar.
    mv /usr /oldusr (as root, of course)

    Launch mcc (you may have to use full path name /oldusr/bin/mcc), to
    local disks, to manage local disks. Create a new partition and name
    it usr, mount it on /usr. Quit mcc and cd /usr. Make sure you are
    in an empty directory of correct size, i.e. that your changes took
    effect. cd /usr ; df -k . (period is part of the command)
    Then, as root (to keep ownership/group/permissions/etc)

    (cd /oldusr ; tar -cf - . ) | (cd /usr ; tar -xf - )
    dd and rsync should also be usable for this,
    as is cp -pR /oldusr/* /usr. I am not sure if cp with -pR
    handles symbolic links correctly, so man cp. Note that rsync
    is normally /usr/bin/rsync, so you may need to use the complete
    pathname /oldusr/bin/rsync if you go that route.

    Do an ls -laR /usr |less to examine owner/group/permissions of
    at least some of the executables in /usr/bin, to make sure all
    transferred properly.

    cd /etc and using vi or any other ASCII editor create a line
    in fstab that matches the way in which you created/named the
    partition. It might look something like one of the three
    lines here:

    /dev/sda6 /usr ext3 defaults,noatime 1 2
    LABEL=usr /usr ext3 defaults,noatime 1 2
    UUID=f3ca97a8-cbd9-4599-bf65-041b209b7ba7 /usr ext3 noatime 1 2

    blkid /dev/sda6
    will show you the attributes of /dev/sda6 above, to make sure the
    system thinks you have named things as you intended to name them.

    As an alternative on naming the partition, you could name the
    new partition nusr and mount it as /nusr. Then, after moving all
    the stuff under /usr under /nusr, rm =rf /usr followed by
    ln -s /nusr /usr.

    In closing, I would watch for better directions from BitTwister,
    Dave Hodgins, or some of the other sysadmin folk who actually do
    this sort of thing now and then. I do it so rarely that I might
    overlook or leave out something. But, the above says what you want
    to do is possible, and offers a few ways to do it.

    Cheers!

    jim b.


    --
    UNIX is not user unfriendly; it merely
    expects users to be computer-friendly.

  3. Re: Partition Splitting

    On Sat, 23 Aug 2008 22:11:10 -0400, John Williams wrote:

    > Should I use a live CD (Knoppix?) to create the new partition, and then
    > the live CD command line to cp the old /usr to the new and then delete
    > the old? If so, how do I edit the fstab? Or can the whole exercise be
    > done under mcc?


    Use mcc/diskdrake to create the new partition, assign a label, format it,
    set the mountpoint as /newusr, mount it, and update fstab.

    Make a copy of /etc/fstab and edit the copy to change /newusr to /usr.

    Then, as root switch to run level 1, to ensure no files are being updated,
    or are locked. Copy the data from /usr to /newusr. Verify the copy looks ok.
    Rename /usr to /oldusr. Unmount /newusr. Rename the directory /newusr to /usr.
    Copy the edited /etc/fstab over the regular one. mount /usr. Switch back to
    run level 3.

    In more detail ...

    Use "telinit 1" (as root), to switch to run level 1.

    For copying the data, I'd use "rsync -avx /usr/ /newusr". Don't forget the
    trailing slash on the source directory.

    I'd verify the copy had worked by browsing a few of the directories with mc,
    and by comparing the output of "du -cs /usr" with "du -cs /newusr"

    Note that once you rename /usr, you will not have any utilities like mc, which
    are normally in /usr/bin available.

    Rename /usr using "mv /usr /oldusr".

    "umount /newusr".
    Rename /newusr to /usr use "mv /newusr /usr".

    Copy the edited fstab over top of the regular fstab, mount the /usr, and then
    use "telinit 3", to get back to run level 3.

    Once you've confirmed everything is ok, remove /oldusr with "rm -rm /oldusr".

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  4. Re: Partition Splitting

    On Sun, 24 Aug 2008 00:04:27 -0400, Jim Beard wrote:

    > I would suggest first backing up the system.
    > Make sure you have a copy of tar at /bin/tar.
    > mv /usr /oldusr (as root, of course)
    >
    > Launch mcc (you may have to use full path name /oldusr/bin/mcc), to


    That would fail as diskdrake and other things called by mcc must be in
    /usr/bin, /usr/lib/libDrakx, etc.

    > In closing, I would watch for better directions from BitTwister,
    > Dave Hodgins, or some of the other sysadmin folk who actually do


    Heh, heh. Thanks

    Basically, my advice boils down to, create the new partition, copy the
    data, change the system to use the new data, make sure it works, then
    delete the old data.

    Best to keep the old data around until you know the new copy is good.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  5. Re: Partition Splitting

    On Sun, 24 Aug 2008 00:36:18 -0400, David W. Hodgins wrote:

    > Once you've confirmed everything is ok, remove /oldusr with "rm -rm /oldusr".


    Of course I'd make a typo here. Should be "rm -rf /oldusr".

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  6. Re: Partition Splitting

    On Sunday 24 August 2008 04:11, someone identifying as *John Williams* wrote
    in /alt.os.linux.mandriva:/

    > Mandriva 2008.0.
    >
    > I have separate partitions on my hard-drive for "/", /backups, /home,
    > and /tmp. The '/' partition is now full, and I cant extend its size
    > due to the fact that there are other partitions following it. The '/'
    > sub-directory that seems to be the biggest is /usr, and I have plenty of
    > unused space on the drive after the Linux directories.
    >
    > What is the procedure for removing /usr from the '/' partition, and
    > putting the content in a separate (new, 10GB) partition? I have Googled
    > without success ...
    >
    > Should I use a live CD (Knoppix?) to create the new partition, and then
    > the live CD command line to cp the old /usr to the new and then delete
    > the old? If so, how do I edit the fstab? Or can the whole exercise be
    > done under mcc?


    Forget about the Mandrive Control Center or anything GUI-related under those
    conditions. The job you're about to undertake is so incisive that it can't
    even be done from normal multiuser mode, since libraries in */usr/lib*
    might then be in use. The first step can however be performed
    using /DiskDrake/ from the GUI environment - read on.

    Considering that you've got */home* and */tmp* split off already, I would
    rather think that */var* is the culprit for the root filesystem filling up
    as */usr* is normally static, and so it would be better in my opinion to
    split that off than to split off */usr.*

    Either way, if you have plenty of free space behind the other GNU/Linux
    partitions, I would recommend that you first use /Diskdrake/ to create a
    partition in the available space and have a filesystem created on it, but
    leave it unmounted, save the changes and then drop to single user mode
    using the command...

    init 1

    .... as root - save all your open files first because this will kill the GUI.

    Next, you must mount the newly created partition somewhere. I'm going to
    assign a randomly chosen device special file to this partition because I
    don't know how your partitions are organized on your hard disk, and whether
    it's an IDE/SATA/USB/SCSI/SAS device. I'm also going to assume that you'll
    use /ext3/ as the filesystem - not that this is necessarily the best
    choice, but you are of course advised to substitute both the filesystem
    type and the device special file for what applies to your choices and
    system. So let's say you've chosen */dev/sda8* as the partition's device
    special file and that you're using /ext3/ on it.

    mount -t ext3 /dev/sda8 /mnt

    Now, you must copy the contents of */var* - let's assume you'll move that
    one instead of */usr* but what applies to */var* will also apply to */usr*
    should you choose to split off that one as well.

    cd /var
    cp -pPR * /mnt

    The above copy command will copy files, directories and symbolic links
    without following the symbolic links - which is what you want - and while
    preserving timestamps, ownerships and permissions.

    Next, verify that everything is there...

    ls -lr /mnt | less

    .... and then remove the contents of */var* on the root filesystem...

    rm -rf
    ls -l
    cd /

    Now, you must mount the new filesystem to */var* and make sure that the
    system will recognize this new set-up automatically from here on...

    umount /mnt
    mount -t ext3 /dev/sda8 /var

    As an editor, I will use /mcedit/ - part of the Midnight Commander package -
    but you can use /nano,/ /pico,/ /vi/ or whatever other editor you've
    installed and that you are comfortable with.

    mcedit /etc/fstab

    Add a line for your new filesystem, like so...

    /dev/sda8 /var/ ext3 auto,defaults,nodev,noatime 0 0

    If you want to use the partition label or UUID, you'll have to check for
    those using /blkid/ command before using the editor to retrieve that
    information. Having a pen and paper handy is recommended. ;-)

    Next, edit the editor and you're done...

    init 5

    .... will take you back to your GUI login screen. Substitute "5" by "3" if
    you normally use /startx/ to bring up the GUI.

    --
    *Aragorn*
    (registered GNU/Linux user #223157)

  7. Re: Partition Splitting

    John Williams jw_karori@paradise.net.nz wrote previously in
    alt.os.linux.mandriva:

    > Mandriva 2008.0.
    >
    > I have separate partitions on my hard-drive for "/", /backups, /home,
    > and /tmp. The '/' partition is now full, and I cant extend its size


    There are ways around this, read on.

    > due to the fact that there are other partitions following it. The '/'
    > sub-directory that seems to be the biggest is /usr, and I have plenty of
    > unused space on the drive after the Linux directories.
    >
    > What is the procedure for removing /usr from the '/' partition, and
    > putting the content in a separate (new, 10GB) partition? I have Googled
    > without success ...


    Steps:
    1.- Make a partition, let's asume it's /dev/sda8.
    2.- Format it: mkfs.ext3 /dev/sda8
    3.- Mount it: mount /dev/sda8 /mnt/newusr ( crete newusr before)
    4.- copy: rsync -axH /usr/ /mnt/newusr/
    5.- edit fstab to reflect the change
    6.- reboot

    Others have provided details on blkid and using "init 1" etc so you don't
    have to reboot. Feel free to ask if unsure!!!

    > Should I use a live CD (Knoppix?) to create the new partition, and then
    > the live CD command line to cp the old /usr to the new and then delete
    > the old? If so, how do I edit the fstab? Or can the whole exercise be
    > done under mcc?


    A Live CD would be the best/simpler way as a partition should not be copied
    while in use. The Mandriva CD could well serve the purpouse. If you so
    choose to use this path there are two possible scenarios:

    1.- Use gparted to move partitions around and make "/" bigger. Quite long
    (time wise) process.

    2.- Do the procedure stated above while working from the Live CD. It is a
    lot safer.


  8. Re: Partition Splitting

    On Mon, 25 Aug 2008 13:59:46 +1200, John Williams wrote:
    > I intend to use a live CD to create the extra partition(s) - /usr *AND*
    > /var - using Aragorn's recent posting re optimal sizes as a guide as well.


    If me, I would go ahead and create the partitions and format them.
    That would automagically put them in your current fstab.

    I would then copy fstab to fstab_new.
    I would then change the mount point label to what it will be
    upon completion of the task.

    Example for /usr: you would /create/new_usr, and format it.
    In fstab_new, you change /new_usr to /usr.
    You could then boot your rescue cd, copy over files from /usr to /new_usr.
    then copy current fstab to fstab_old.
    then copy fstab_new fstab

    reboot and you should have no problems.

    If everything feels good, and you know all is good,
    boot rescue cd
    mount your / partition
    and /bin/rm -r /usr/*

    For myself, I would write every instruction into a file just like you
    were writing a script to do all the work.
    I would then print hard copy, and hand check every command.
    I would sleep on it, then go over the hard copy again.

    Once I was satisfied, I would boot the rescue cd
    bring up the script, and cut/paste each command.
    before hitting the carriage return, be really satisfied I know I know
    what I am doing.

    Would not hurt to have a separate backup of data, know it is readable,
    contains all the backed up data, and have the tested restore procedure
    on hand.


  9. Re: Partition Splitting

    Bit Twister wrote:
    > On Mon, 25 Aug 2008 13:59:46 +1200, John Williams wrote:
    >> I intend to use a live CD to create the extra partition(s) - /usr *AND*
    >> /var - using Aragorn's recent posting re optimal sizes as a guide as well.

    >
    > If me, I would go ahead and create the partitions and format them.
    > That would automagically put them in your current fstab.
    >
    > I would then copy fstab to fstab_new.
    > I would then change the mount point label to what it will be
    > upon completion of the task.
    >
    > Example for /usr: you would /create/new_usr, and format it.
    > In fstab_new, you change /new_usr to /usr.
    > You could then boot your rescue cd, copy over files from /usr to /new_usr.
    > then copy current fstab to fstab_old.
    > then copy fstab_new fstab
    >
    > reboot and you should have no problems.
    >
    > If everything feels good, and you know all is good,
    > boot rescue cd
    > mount your / partition
    > and /bin/rm -r /usr/*
    >
    > For myself, I would write every instruction into a file just like you
    > were writing a script to do all the work.
    > I would then print hard copy, and hand check every command.
    > I would sleep on it, then go over the hard copy again.
    >
    > Once I was satisfied, I would boot the rescue cd
    > bring up the script, and cut/paste each command.
    > before hitting the carriage return, be really satisfied I know I know
    > what I am doing.
    >
    > Would not hurt to have a separate backup of data, know it is readable,
    > contains all the backed up data, and have the tested restore procedure
    > on hand.
    >


    Bit Twister:

    Thanks! Excellent advice.

    --
    John Williams
    Nelson, New Zealand

  10. Re: Partition Splitting

    On Sun, 24 Aug 2008 21:59:46 -0400, John Williams wrote:

    > I still a bit confused w.r.t. fstab, though. My current one reads:


    It's important that you understand the entries, before you change anything.
    Let's go through each one

    > dev/hde5 / ext3 relatime 1 1


    First, if this wasn't a copy paste error, fix the device name, in fstab. It
    should be /dev/hde5, not dev/hde5. I've seen this before, and it can mess up
    diskdrake later. It still mounts the root filesystem ok using the device name
    from the boot manager, but should be fixed

    The device name starting with hde tells me that you have two ide controllers.
    The first would use device names hda to hdd. As you don't have any devices
    (shown, at least), I gather you're only using the second ide controller.
    The second ide controller uses hde to hdh.

    hde = Second ide controller, First channel, Master device.

    The partition numbers 1 to 4 are reserved for the partitions described in
    the master boot record, of the device. At least one of those 4 must be
    an extended partiton, or the device will be limited to 4 partitions.

    hde5 is the first logical partition, in the extended partition. The / is
    the mountpoint, in this case, the root filesystem (not to be confused with
    the /root directory).

    ext3 is the filesystem type. relatime is a mount option. For details, run
    "man mount", press the / key, type in relatime, and press enter. The first
    number after the mount options has to to with the dump command. It's generally
    not used anymore. The second number has to do with the order file systems
    will be checked (using fsck) at boot time. 1 should be used for root. 0 for
    file systems that you don't want checked at root. 2, for everything that
    should be checked, but not until after the root has passed it's check.

    I've changed the order below, to make it easier to read.

    > /dev/hde1 /mnt/win_c vfat umask=0022,iocharset=utf8 0 0

    This is your legacy windows partition. I would change the mount opitons to be
    as follows
    defaults,users,umask=0,iocharset=iso8859-15,codepage=850,noauto 0 0
    to avoid mounting it at boot time, allow any user to mount and write to it,
    and to use the proper charset for an msdos filesystem.

    > /dev/hde6 swap swap defaults 0 0

    Your swap partition. Since swap doesn't really contain a filesystem, it
    doesn't get checked at boot time.

    > /dev/hde7 /home ext3 relatime 1 2
    > /dev/hde8 /tmp ext3 relatime 1 2


    Similar to the root, except the mountpoints are directories on the root
    filesystem, and the filesystems are only checked, after the root has passed.

    > /dev/hde9 /backups ext3 user,relatime,exec 1 2
    > /dev/hde10 /freevo ext3 user,relatime 1 2


    Both user mountable filesystems. The user option, by default also adds
    "noexec,nodev,nosuid", and you've chosen to allow programs to be run
    from the /backups.

    > /dev/hde11 /shared vfat umask=0 0 0

    Another msdos filesystem. I would change the mount options, as above.

    > /dev/cdrom /media/cdrom auto
    > umask=0022,users,iocharset=utf8,noauto,ro,exec 0 0
    > /dev/cdrom2 /media/cdrom2 auto
    > umask=0022,users,iocharset=utf8,noauto,ro,exec 0 0
    > /dev/fd0 /media/floppy auto
    > umask=0022,users,iocharset=utf8,noauto,exec,flush 0 0


    Two cdrom or dvd devices, and a floppy drive, that only get mounted when you
    explicitly ask for them.

    > /dev/hdf1 /mnt/win_c2 ntfs umask=0022,nls=utf8,ro 0 0


    A second hard drive, with one ntfs filesystem. hdf indicates the drive is
    on the second ide controller, first channel, slave device.

    > none /proc proc defaults 0 0


    A pseudo filesystem. Doesn't exist on disk. Is only used to get/send
    data from/to the kernel.

    > Anything I need to change? 'relatime' doesn't appear to be documented
    > in the man.


    It is documented. See above for how to search the man page.

    > A thought. Could I use /usr/bin/drakupdate_fstab to rebuild fstab
    > (assuming it works in the same way as during a new install ...)?


    Chicken & egg problem. /usr/bin/drakupdate uses files from /usr/lib/libDrakx,
    which works with existing filesystems, and the /etc/fstab file. Can be done,
    but is more work then learning how to edit fstab yourself.

    I think it's easier to use telinit 1, rather then a boot cd, as it keeps the
    directory names clearer. If you do decide to use a boot cd, I'd still use
    diskdrake on the running system, to create the new partitions/filesystems,
    as it will create the fstab entries for you, and all you have to do is change
    the mountpoints, after moving the data.

    If you want to use a boot cd, try the following ...

    On the running system, use diskdrake to create a partition, with a mount point
    of /newusr, specify whichever filesystem type you want, use the options to
    specify a label (otherwise diskdrake will use the uuid in the fstab entries),
    Format the filesystem. Do the same for /newvar. Exist diskdrake, and let it
    update fstab.

    Boot the bootcd. The details on how you mount the devices varies, depending
    on whether this is an install cd, Knoppix, Mandriva Live, etc. Basically
    you have to mount /dev/hde5, and the two new filesystems, move the contents
    of /usr and /var to the appropriate filesystems. Edit the /etc/fstab on
    /dev/hde5, and change the mount points /newusr and /newvar to /usr and /var
    respectively.

    Any questions, please ask, before you try it.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  11. Re: Partition Splitting

    On Monday 25 August 2008 03:59, someone identifying as *John Williams* wrote
    in /alt.os.linux.mandriva:/

    > I still a bit confused w.r.t. fstab, though. My current one reads:
    >
    > dev/hde5 / ext3 relatime 1 1
    > /dev/hde9 /backups ext3 user,relatime,exec 1 2
    > /dev/hde10 /freevo ext3 user,relatime 1 2
    > /dev/hde7 /home ext3 relatime 1 2
    > /dev/cdrom /media/cdrom auto
    > umask=0022,users,iocharset=utf8,noauto,ro,exec 0 0
    > /dev/cdrom2 /media/cdrom2 auto
    > umask=0022,users,iocharset=utf8,noauto,ro,exec 0 0
    > /dev/fd0 /media/floppy auto
    > umask=0022,users,iocharset=utf8,noauto,exec,flush 0 0
    > /dev/hde1 /mnt/win_c vfat umask=0022,iocharset=utf8 0 0
    > /dev/hdf1 /mnt/win_c2 ntfs umask=0022,nls=utf8,ro 0 0
    > none /proc proc defaults 0 0
    > /dev/hde11 /shared vfat umask=0 0 0
    > /dev/hde8 /tmp ext3 relatime 1 2
    > /dev/hde6 swap swap defaults 0 0
    >
    > - but I confess I don't understand what each entry means (ignore the
    > hde1, hd11 and hdf entries, they're for a heritage Window$ system!).
    > Anything I need to change? 'relatime' doesn't appear to be documented
    > in the man.


    The /relatime/ mount options is a kind of compromise between /atime/
    and /noatime./ The default - if nothing else is specified - is /atime./

    The /atime/ field in the inode is a timestamp field that tells you when the
    file was last accessed. With /atime/ set at a mount option, the field is
    thus updated whenever you access a file, i.e. for reading and executing as
    well as for writing.

    The /noatime/ mount option ignores this field and therefore /noatime/ makes
    the filesystem a (slight) bit faster as it doesn't have to update
    the /atime/ field with everything you do. This is why most users would
    prefer /noatime,/ but it is actually most useful on filesystems that hold a
    lot of files (and directories).

    The /relatime/ mount option is still quite new and so it may be that
    your /man/ pages do not cover this yet - mine certainly don't, but then
    again I'm still running a dinosaur on this box here. The /relatime/
    mount option only updates the /atime/ field in the inode if the
    previous /atime/ entry is older than the /mtime/ or /ctime/ fields - i.e.
    the time the inode was respectively modified or created.

    As for the other entries, a quick Google search tells me that /flush/
    appears to be a /vfat/ mounting option that causes writes to the physical
    filesystem to be carried out more regularly than otherwise, so I believe it
    must be some setting in between the /async/ and /sync/ mount
    options. /async/ will normally flush the virtual filesystem buffers to the
    physical filesystem in a delayed fashion, for performance reasons. /sync/
    makes all writes to the virtual filesystem automatically write through to
    the physical filesystems.

    The /iocharset/ and /nls/ mount options pertains to the interpretation of
    respectively the characters in the file, and in the file- and
    directorynames on that filesystem. This is usually needed because
    Crimosoft uses both archaic standards and their own standards - well, we
    know how they think that everything that comes out of their minds is
    automatically a standard. :-)

    /umask/ tells the kernel with what default permissions the filesystem will
    be mounted into the virtual filesystem layer, because the virtual
    filesystem layer naturally uses UNIX permissions while a /vfat/ or other
    Crimosoft filesystem does not have those. The numeric value of a /umask/
    represents the permissions that will be *deducted* from the maximum octal
    number for a permission set.

    For instance, setting /umask/ to 0022 - as in your /fstab/ example above -
    will *not* deduct anything from special bits - e.g. the sticky bit - and
    will *not* deduct anything from the permissions of the owner of the file;
    the latter in the virtual filesystem layer, of course, since /vfat/ does
    not support UNIX ownerships. The "22" however means that 2 will be
    deducted from the "group" and "others" set of permissions, and so if a file
    has permission 777 set by default - in fact, this is how /vfat/ is always
    seen if nothing else is specified, then while the filesystem is mounted
    into the Linux virtual filesystem layer, the "group" and "others" will have
    permissions level 5, i.e. read and execute, but not write.

    The last thing I will clarify here - as the rest is quite clearly explained
    in the /man/ pages ;-) - is the difference between the /user/ and /users/
    mount option.

    By default, a filesystem is mounted with the /nouser/ mount option, which
    means that only the root user can mount or unmount the filesystem. Now,
    with /user/ and /users,/ an unprivileged user can mount or unmount the
    filesystem, but the difference between them is that with /user,/ the
    unprivileged user who mounts the filesystem must also be the same one to
    unmount it again - well, except for the root account of course, because
    root can do anything - while with /users/ as a mount option, the
    unprivileged user trying to unmount the filesystem need not be the same
    person as the unprivileged user who mounted it.

    > A thought. Could I use /usr/bin/drakupdate_fstab to rebuild fstab
    > (assuming it works in the same way as during a new install ...)?


    I have no idea because my stone-age distro here doesn't even have that
    utility - I think. And if it did, then I wouldn't use it anyway. :-)

    */etc/fstab* is a plain text file and can be edited with any plain text
    editor, e.g. /kwrite/ if you have KDE, /gedit/ if you prefer Gnome, or
    something like /vi/ or /nano/ from the commandline.

    I definitely recommend that you'd install the Midnight Commander, even if
    only for its very easy editor /mcedit./ The Midnight Commander is a
    non-GUI filemanager application based upon the look and feel of the old
    Norton Commander for DOS.

    I know that most people want point and click stuff - if you have mouse
    support in character mode, you can use Midnight Commander with a mouse as
    well - but really guys, GNU/Linux is in essence still a character mode
    operating system - like all UNIX systems, except for OS-X of course - and
    you should *not* be afraid of the commandline.

    /bash/ is an excellent shell with lots of features that DOS or Windows
    couldn't even dream of, and you really don't have to be a shell scripting
    guru in order to make use of it. UNIX is by design a huge toolbox from
    which you simply take the tool to your liking. Some tools do many things,
    others do only one thing but do it extremely efficiently.

    There really is no reason to panic when seeing a shell prompt appear.

    --
    *Aragorn*
    (registered GNU/Linux user #223157)

  12. Re: Partition Splitting

    Jim Beard wrote:

    > Launch mcc (you may have to use full path name /oldusr/bin/mcc), to
    > local disks, to manage local disks. *Create a new partition and name
    > it usr, mount it on /usr. *Quit mcc and cd /usr.


    As a perpetual newbie I have no argument about this. But when I get short
    of space on a partition I do as Jim suggest but I don't quit mcc at this
    point. When I mount the new partition at the same point (as the original
    one), mcc pops up a warning-window saying this point already contains data
    and asks if to keep/'hide' them or move them to the new partition. I chose
    the latter and that's it. fstab is then rewritten automatically and no
    command line stuff is needed. Maybe not the best/safest way of doing it
    but very easy.

    GIU-guy

  13. Re: Partition Splitting

    On Mon, 25 Aug 2008 11:58:57 -0400, Iordani wrote:

    > As a perpetual newbie I have no argument about this. But when I get short
    > of space on a partition I do as Jim suggest but I don't quit mcc at this
    > point. When I mount the new partition at the same point (as the original
    > one), mcc pops up a warning-window saying this point already contains data
    > and asks if to keep/'hide' them or move them to the new partition. I chose
    > the latter and that's it. fstab is then rewritten automatically and no
    > command line stuff is needed. Maybe not the best/safest way of doing it
    > but very easy.


    Thanks for the reminder. I'm so used to doing it manually, ensuring that
    the copy is valid before removing the original, that I forgot diskdrake
    has this functionality built in.

    In this case though, because the directories being moved include /usr and
    /var, both of which have files that are in use by diskdrake and other running
    programs, I don't think it would work.

    It may produce working filesystems for /var and /usr, but would definitely
    leave, at least some, stuff in those directories on the root filesystem,
    which would then be truly hidden, once the new filesystems get mounted. I
    would expect some running software to crash, once those existing files become
    inaccesible, but haven't tested this.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  14. Re: Partition Splitting

    Jim Beard wrote:
    > /dev/sda6 /usr ext3 defaults,noatime 1 2
    > LABEL=usr /usr ext3 defaults,noatime 1 2
    > UUID=f3ca97a8-cbd9-4599-bf65-041b209b7ba7 /usr ext3 noatime 1 2


    I think everything I mentioned has been covered in detailed fashion,
    except the above.

    The first line is the traditional Linux syntax for identifying
    the partition and its mount point and permissions.

    Mandriva 2008.0 had the option of identifying the partitions
    with a LABEL=somename label. It can be set using the command
    e2label or tune2fs with the -L option. It can also be set in
    MCC, when toggled to advanced in the manage local disk drives
    area, and this implies diskdrake should also be able to handle
    the task. (Both mcc and diskdrake are frontends for the
    programs that actually do the work.)

    The third line shows the partition identified by UUID, which
    is created and assigned to the file system when it is formatted.
    This is the current default for 2008.1. The purpose is to
    assign a unique ID to each partition which will stay constant
    even if the disk is moved around on controllers, but it loses
    the correlation with the specific disk/controller.

    Currently, all three forms of syntax will work. The command
    blkid will show ID data for all devices which appear in
    /proc/partitions and are recognized.

    If you play with partition names/identification, I suggest you
    make changes with the partition umounted (if possible) and
    always use blkid to verify the system thinks you have done what
    you think you have done, before doing anything unreversable.

    Cheers!

    jim b.
    --
    UNIX is not user unfriendly; it merely
    expects users to be computer-friendly.

  15. Re: Partition Splitting

    On Mon, 25 Aug 2008 20:28:44 -0400, Jim Beard wrote:
    >
    > If you play with partition names/identification, I suggest you
    > make changes with the partition umounted (if possible) and
    > always use blkid to verify the system thinks you have done what
    > you think you have done, before doing anything unreversable.


    And do check your boot loader config file, /etc/lilo.conf or
    /boot/grub/menu.lst

  16. Re: Partition Splitting

    Bit Twister BitTwister@mouse-potato.com wrote previously in
    alt.os.linux.mandriva:

    > On Mon, 25 Aug 2008 20:28:44 -0400, Jim Beard wrote:
    >>
    >> If you play with partition names/identification, I suggest you
    >> make changes with the partition umounted (if possible) and
    >> always use blkid to verify the system thinks you have done what
    >> you think you have done, before doing anything unreversable.

    >
    > And do check your boot loader config file, /etc/lilo.conf or
    > /boot/grub/menu.lst



    And remember that stale blkid maintained in /etc/blkid.tab could be erased
    with

    blkid -g

    command

  17. Re: Partition Splitting

    Bit Twister wrote (in part) :

    --snip --

    > boot rescue cd
    > mount your / partition
    > and /bin/rm -r /usr/*


    -- snip --

    As suggested, I evaluated the process before proceeding. I went further
    and "dry-ran" some of it, coming unstuck on the second part of the final
    part (removal of the old root sub-directories).

    Using "SystemRescueCD" v1.0.4 [SRCD] as my "rescue CD", I can't mount
    the / partition - console 'mount' command fails with a message that the
    partition concerned in "not in fstab". Noting that gparted redefines the
    hde partitions as sda, I tried:
    mount -t /dev/sda5 /diskroot
    and
    mount -t /dev/hde5 /diskroot
    with same result - not in fstab.

    Equally, the gparted gui included in SRCD does not have an option to
    mount a selected partition.

    Is there a mount parm that tells it not to refer to fstab (can't see
    such a one) ?? Or is there some other way ??? Alternatively, can I
    just delete the sub-directory as root under Mandriva (ie, not use the
    SRCD) ??

    TIA

    --
    John Williams
    Nelson, New Zealand


  18. Re: Partition Splitting

    On Wed, 27 Aug 2008 12:49:09 +1200, John Williams wrote:
    >
    > Using "SystemRescueCD" v1.0.4 [SRCD] as my "rescue CD", I can't mount
    > the / partition - console 'mount' command fails with a message that the
    > partition concerned in "not in fstab".


    Guessing that would be / for SystemRescueCD

    You usually can mount any file system supported by the booted os.
    Assuming it is not corrupt. Commands would something like

    mkdir /old
    mount -t auto /dev/XdYZ (u solve for X [h,s], Y [a,b,c...] & Z [1,2,3..])

    cd /old
    ls
    and you would be in the XdYZ partition seeing the directories.


    When I first did something like you are doing, I made sure I knew
    where I was by doing a
    touch /new_usr/new_partition
    touch /usr/old_partition

    Then boot the rescue cd.
    That way when I did a
    cd /old/src
    and saw the file, old_partition, I knew I was in the correct partition.

  19. Re: Partition Splitting

    On Wed, 27 Aug 2008 00:58:54 +0000 (UTC), Bit Twister wrote:
    > On Wed, 27 Aug 2008 12:49:09 +1200, John Williams wrote:
    >>
    >> Using "SystemRescueCD" v1.0.4 [SRCD] as my "rescue CD", I can't mount
    >> the / partition - console 'mount' command fails with a message that the
    >> partition concerned in "not in fstab".

    >
    > Guessing that would be / for SystemRescueCD
    >
    > You usually can mount any file system supported by the booted os.
    > Assuming it is not corrupt. Commands would something like
    >
    > mkdir /old
    > mount -t auto /dev/XdYZ (u solve for X [h,s], Y [a,b,c...] & Z [1,2,3..])


    Opps
    mount -t auto /dev/XdYZ /old (u solve for X [h,s], Y [a,b,c...] & Z [1,2,3..])


  20. Re: Partition Splitting

    John Williams jw_karori@paradise.net.nz wrote previously in
    alt.os.linux.mandriva:

    > Bit Twister wrote (in part) :
    >
    > --snip --
    >
    >> boot rescue cd
    >> mount your / partition
    >> and /bin/rm -r /usr/*

    >
    > -- snip --
    >
    > As suggested, I evaluated the process before proceeding. I went further
    > and "dry-ran" some of it, coming unstuck on the second part of the final
    > part (removal of the old root sub-directories).


    Great idea

    > Using "SystemRescueCD" v1.0.4 [SRCD] as my "rescue CD", I can't mount
    > the / partition - console 'mount' command fails with a message that the
    > partition concerned in "not in fstab". Noting that gparted redefines the
    > hde partitions as sda, I tried:
    > mount -t /dev/sda5 /diskroot
    > and
    > mount -t /dev/hde5 /diskroot
    > with same result - not in fstab.


    Using mount as an user normally is limited to what is in fstab, that's the
    reason for the response of mount. Try to change to root, you should see a #
    symbol at the beggining of the line and do

    # mount /dev/sda5 /diskroot

    root has no limits in what it can do, so be careful.

    Also, the -t option you put in your command is intended to be used as a
    means to tell the system what kind of partition (type) should be mounted.
    The command should read: "mount -t ext3 /dev/sda5 /diskroot" if you really
    want to use the type option. It is normally not needed as the system can
    detect what type of filesystem it is and act accordingly.

    > Is there a mount parm that tells it not to refer to fstab (can't see
    > such a one) ?? Or is there some other way ??? Alternatively, can I
    > just delete the sub-directory as root under Mandriva (ie, not use the
    > SRCD) ??


    Yes, as root you could do whatever you want, but please DON'T. Messing with
    a mounted partition is always a very _very_ bad idea.

    HTH

+ Reply to Thread
Page 1 of 2 1 2 LastLast