Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all, Fedora 18 desktop 64bit, newly installed The capacity of the HD is 2TB $ df -h Code: Filesystem Size Used Avail Use% Mounted on devtmpfs 16G 0 16G ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,787

    Re treatment on spare space - HD


    Hi all,

    Fedora 18 desktop 64bit, newly installed

    The capacity of the HD is 2TB

    $ df -h
    Code:
    Filesystem                 Size  Used Avail Use% Mounted on
    devtmpfs                    16G     0   16G   0% /dev
    tmpfs                       16G  4.7M   16G   1% /dev/shm
    tmpfs                       16G  9.4M   16G   1% /run
    tmpfs                       16G     0   16G   0% /sys/fs/cgroup
    /dev/mapper/fedora-root00   97G  4.3G   87G   5% /
    tmpfs                       16G   20K   16G   1% /tmp
    /dev/sda1                  236M  138M   86M  62% /boot
    /dev/mapper/fedora-data    1.5T  470G  900G  35% /data
    $ sudo fdisk -l
    Code:
    Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00064d3a
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048      499711      248832   83  Linux
    /dev/sda2          499712  3279364095  1639432192   8e  Linux LVM
    
    Disk /dev/sdb: 120.0 GB, 120034123776 bytes, 234441648 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000cde8a
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *        2048      499711      248832   83  Linux
    /dev/sdb2          501758   234440703   116969473    5  Extended
    /dev/sdb5          501760   234440703   116969472   8e  Linux LVM
    
    Disk /dev/mapper/fedora-swap: 1048 MB, 1048576000 bytes, 2048000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/fedora-root00: 104.9 GB, 104857600000 bytes, 204800000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/localhost-root: 85.5 GB, 85513469952 bytes, 167018496 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/localhost-swap_1: 34.3 GB, 34259075072 bytes, 66912256 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/fedora-data: 1572.9 GB, 1572864000000 bytes, 3072000000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    I shall use this PC for virtualization running Oracle VirtualBox.

    There are some spare space on the HD not used/installed. Pls advise;

    1)
    How to expand /dev/mapper/fedora-data taking up the rest unused space instead of reinstalling the complete system?

    OR

    2)
    At the present moment I don't need such a big space on /dev/mapper/fedora-data. What/How shall I use the spare/uninstalled space, now or in future?

    TIA

    B.R.
    satimis

  2. #2
    Linux Newbie
    Join Date
    Jan 2013
    Posts
    116
    try parted or live image of gparted (GParted -- Live CD/USB/PXE/HD)

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,508
    Since fedora-data is a logical volume, you need to do 3 things:

    1. Expand the LVM partition on /dev/sda
    2. Use the LVM tool to resize the volume
    3. Use resize2fs to resize the file system


    Note that is is dangerous to shrink a logical volume. To do that safely, save the data to an external drive, re-partition the drive, reducing the space used for LVM, reconfigure LVM, rebuild the file system, and then restore your data.

    That said, NixSavy has a good idea to check out parted/gparted. I haven't worked with them, but they may do all that for you...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,787
    Hi all,

    Tks for your advice.

    My original setup on the HD was making it dualboot leaving some space for testing clouds. Because some of them need bare metal to run. Now I'm prepared abandoning such an arrangement. Because I found several spare old HDs, 180G, 500G and 600G. I can use them testing cloud.

    Frankly speaking 1.5T space on /dev/mapper/fedora-data is more than sufficient for my use including in the foreseeable future.

    Leave the unalloted space there?

    To resize /dev/mapper/fedora-data won't take me lot of work nor any risk. Because this is a new box without data on it. In the worst case if something goes wrong on resizing I just reinstall Fedora. But if there are VMs running on it, there will be lot of work to do in resizing /dev/mapper/fedora-data.

    Oh, I almost forgot. Fedora installer has a wonderful tool resizing LVs on the fly. Several months back I ran it resizing HD making the latter dualboot. Ubuntu 12.04 was running on the HD occupying the entire HD capacity. I ran Fedora installer resizing the HD to install Fedora on the space obtained. Wonderful, it was very easy without failure. I did it at least 3~4 times.

    B.R.
    satimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •