Results 1 to 8 of 8

Thread: Partition problems... Maybe

Hybrid View

  1. #1
    Join Date
    Jun 2011
    Location
    Raleigh NC
    Beans
    90

    Partition problems... Maybe

    below is a print out of parted -l I have a 1 TB drive but i cannot find a space larger than 13 GB for storing my photos ...and it is in /root!
    I assume that also contains boot? I have no idea how this state of affairs came about.
    Do i have to mount the other logical extensions? If so How?
    As usual any help is greatly appreciated







    Model: ATA WDC WD10EADS-22M (scsi)
    Disk /dev/sda: 1000GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags
    1 1049kB 20.0GB 20.0GB primary ext4 boot
    2 20.0GB 751GB 731GB extended
    5 20.0GB 40.0GB 20.0GB logical ext4
    6 40.0GB 41.0GB 999MB logical ext4
    7 41.0GB 741GB 700GB logical ext4
    8 741GB 751GB 9999MB logical linux-swap(v1)


    Model: SanDisk Cruzer Fit (scsi)
    Disk /dev/sdh: 32.0GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags
    1 16.4kB 32.0GB 32.0GB primary fat32 lba

  2. #2
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,616
    Distro
    Ubuntu

    Re: Partition problems... Maybe

    Try something like
    Code:
    df -h
    As parted only shows the partition layout and not disk usages.

    Mind you that df only shows mount partitions.

    It seems you have five linux partitions on your system(ext4).
    One primary, and four logical.
    And they range in size from 20Gb to 700GB.

    But it's unclear what each one is.
    And what the disk usage is.
    Parted is only showing us the total capacity of the partition, but not the total in use/used.
    Nor is it telling us which is a root partition and which is not.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  3. #3
    Join Date
    Jun 2011
    Location
    Raleigh NC
    Beans
    90

    Re: Partition problems... Maybe

    Quote Originally Posted by deadflowr View Post
    Try something like
    Code:
    df -h
    As parted only shows the partition layout and not disk usages.

    Mind you that df only shows mount partitions.

    It seems you have five linux partitions on your system(ext4).
    One primary, and four logical.
    And they range in size from 20Gb to 700GB.

    But it's unclear what each one is.
    And what the disk usage is.
    Parted is only showing us the total capacity of the partition, but not the total in use/used.
    Nor is it telling us which is a root partition and which is not.

    Thanks Dead. See results of df -h below Am i going to be able to makes sense of this mess
    and fix it, or am i better off to just repartition/reformat the disk?


    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 19G 5.3G 13G 31% /
    udev 3.0G 4.0K 3.0G 1% /dev
    tmpfs 1.2G 900K 1.2G 1% /run
    none 5.0M 0 5.0M 0% /run/lock
    none 3.0G 156K 3.0G 1% /run/shm
    /dev/sda5 19G 173M 18G 1% /tmp
    /dev/sda6 938M 84M 808M 10% /boot
    /dev/sda7 642G 2.8G 607G 1% /usr
    /dev/sdg1 30G 152M 30G 1% /media/16C8-0197

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Partition problems... Maybe

    I have never made /usr a separate partition on a desktop. Some with servers or SSD may make it separate but that is huge.
    Explanation of file structure
    http://www.pathname.com/fhs/pub/fhs-2.3.html
    http://www.tuxfiles.org/linuxhelp/linuxdir.html
    http://en.wikipedia.org/wiki/Filesys...archy_Standard
    http://en.wikipedia.org/wiki/Linux_Standard_Base

    I have 25GB / (root) partition including /home but all data in other partitions. And I use about 9GB. No other system partitions are anywhere except in /.


    Splitting home directory discussion and details:
    http://ubuntuforums.org/showthread.php?t=1811198
    http://ubuntuforums.org/showthread.php?t=1901437
    http://ubuntuforums.org/showthread.p...hlight=%2Fdata
    Link is on move home but see post by bodhi.zazen on data partition #6
    http://ubuntuforums.org/showthread.php?t=325048
    Severals posts on size of / and use of linking to data partition.
    http://ubuntuforums.org/showthread.php?t=2137726
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,824
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Partition problems... Maybe

    You can move all data on your sda7 (the /usr directory) to sda1, move all data from /home to sda7 and change the mount point of /dev/sda7 from /usr to /home. This will give you 600GB of space in /home, which is the proper location to store photos. (/root should only be used for administartive purposes)

    I'll try to find the exact commands you need.

  6. #6
    Join Date
    Jun 2011
    Location
    Raleigh NC
    Beans
    90

    Re: Partition problems... Maybe

    Quote Originally Posted by Impavidus View Post
    You can move all data on your sda7 (the /usr directory) to sda1, move all data from /home to sda7 and change the mount point of /dev/sda7 from /usr to /home. This will give you 600GB of space in /home, which is the proper location to store photos. (/root should only be used for administartive purposes)

    I'll try to find the exact commands you need.
    If you can do that you will be my hero forever!

    PS: Can i recover the 232 GB unallocated also?
    Last edited by Wray; July 20th, 2013 at 08:06 PM.

  7. #7
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Partition problems... Maybe

    I can quickly partitially help as this is the standard way to move a /home. Moving other system partitions would be similiar, but you have to copy first and edit fstab as you go.

    To move /home uses rsync- Be sure to use parameters to preserve ownership & permissions
    https://help.ubuntu.com/community/Pa...ng/Home/Moving
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  8. #8
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,824
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Partition problems... Maybe

    The procedure will move most commands temporarily to a different directory, so it may not work while you are logged in as a normal user in a GUI. It will work from recovery mode. Reboot your computer, hit shift a few times to get the grub menu (if you don't get it automatically) and select recovery mode. When you get to a menu, select Drop to root shell prompt. You are now logged in as root with a minimum of software running.

    Remount the root file system as read-write
    Code:
    mount -o rw,remount /
    Next make a temporary mountpoint for your /dev/sda7 and mount it
    Code:
    mkdir /media/temp
    mount /dev/sda7 /media/temp
    You can use any name you want, as long as the directory doesn't exist yet.
    At this point most commands in your system will have moved out of your PATH so you cannot access them by simply typing them, but you need to prefix them with /media/temp/bin/. This has freed your /usr directory, to which you can copy all contents of your old /dev/sda7. This will take some time.
    Code:
    /media/temp/bin/rsync -aXS /media/temp/. /usr/.
    Now you have moved your /usr. For the moment you can keep everything on sda7 too as a backup.
    Code:
    mkdir /media/temp/old_usr
    mv /media/temp/* /media/temp/old_usr
    This may complain that it can't move old_usr to a subdir of itself. Don't worry. Next you can move your /home
    Code:
    rsync -aXS --exclude='/*/.gvfs' /home/. /media/temp/.
    This may again take some time.

    Afterwards you can change fstab to change the mountpoint of sda7. Create a backup of /etc/fstab and open it for editing
    Code:
    cp /etc/fstab /etc/fstab.old
    nano /etc/fstab
    nano is a text editor that can run in a command line interface. Find the line with /usr in the second column (ignoring any lines starting with #) and replace /usr with /home. Save the file (ctrl-x). Move the old /home directory to keep it as a backup for the time being
    Code:
    mv /home /home_old
    mkdir /home
    When you reboot and log in as ordinary user it should work
    Code:
    reboot
    If everything is OK you can delete the backups of /usr and /home
    Code:
    sudo rm -rf /home_old
    sudo rm -rf /home/usr_old
    sudo rmdir /media/temp
    Does anyone see any details I missed?

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
  •