LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-22-2012, 05:03 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Insufficient space to run the OS


Hi all,

Fedora 17, 64bit
Ubuntu 12.04 desktop 64bit
HD 160G

Ubuntu 12.04 has been already installed on the HD first, several days ago, taking up the whole disc. Later I added/installed Fedora 17 selecting the "Shrink" option and saved the bootloader on /dev/sda1 to make them dualboot. Installation is successful with dulaboot option. Unfortunately by mistake I retained insufficient space for Ubuntu 12.04, now only about 100M left when it is up.

Ubuntu 12.04
$ df -h
Code:
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       4.0G  3.7G  107M  98% /
udev            3.8G  4.0K  3.8G   1% /dev
tmpfs           1.6G  880K  1.6G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.8G  156K  3.8G   1% /run/shm

Fedora 17
$ df -h
Code:
Filesystem                       Size  Used Avail Use% Mounted on
rootfs                            50G  4.0G   46G   9% /
devtmpfs                         3.8G     0  3.8G   0% /dev
tmpfs                            3.8G  100K  3.8G   1% /dev/shm
tmpfs                            3.8G  1.9M  3.8G   1% /run
/dev/mapper/vg_fedora17-lv_root   50G  4.0G   46G   9% /
tmpfs                            3.8G     0  3.8G   0% /sys/fs/cgroup
tmpfs                            3.8G     0  3.8G   0% /media
/dev/sda3                        497M   60M  413M  13% /boot
/dev/mapper/vg_fedora17-lv_home   78G  1.4G   72G   2% /home

There is plenty of space on /home of Fedora 17. Is there any easy way to shrink /home of Fedora 17 and then adding the spare space to / (/dev/sda1) of Ubuntu 12.04? TIA

B.R.
satimis
 
Old 08-22-2012, 05:20 AM   #2
sKaar
Member
 
Registered: Jun 2006
Location: dartmouth, nova scotia
Distribution: slackware 12.1
Posts: 74

Rep: Reputation: 2
well, ubuntu works, it's just got a lot of stuff in /home?

if so, copy your current stuff from ubuntu's /home to fedora's /home, maybe to a temp location. after you make the copy, you delete what's in ubuntu's /home(from fedora) BEFORE mounting fedora's /home as /home for both of them.

with the stuff in ubuntu's /home cut and moved, it'd be... enough space?
 
Old 08-22-2012, 05:22 AM   #3
anon04
LQ Newbie
 
Registered: May 2012
Location: Earth
Posts: 4

Rep: Reputation: Disabled
symbolic links

just an idea, take what you will. / does need to be very big, usually. while in a live distro, not while ubuntu is running.
$ mount /dev/ubuntu-partition /mnt/ubuntu
$ mount /dev/fedora-partion /mnt/fedora
$ mkdir /mnt/fedora/xtra
$ mv /mnt/ubuntu/usr /mnt/fedora/xtra
$ mv /mnt/ubuntu/home /mnt/fedora/xtra

do this for all the large folders.
then on the ubuntu mount make symbolic links to /mnt/fedora/xtra. of course you'll need a fstab entry.

that's the general idea. off-load all large folders to another partion. then create symbolic links. / doesn't ever have to be very "big".

-unimatrixdoc
 
Old 08-22-2012, 05:28 AM   #4
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by sKaar View Post
well, ubuntu works, it's just got a lot of stuff in /home?

if so, copy your current stuff from ubuntu's /home to fedora's /home, maybe to a temp location. after you make the copy, you delete what's in ubuntu's /home(from fedora) BEFORE mounting fedora's /home as /home for both of them.

with the stuff in ubuntu's /home cut and moved, it'd be... enough space?
No, there is almost nothing on both /home
 
Old 08-22-2012, 07:52 AM   #5
sKaar
Member
 
Registered: Jun 2006
Location: dartmouth, nova scotia
Distribution: slackware 12.1
Posts: 74

Rep: Reputation: 2
then you can mount the fedora /home on ubuntu, it'd mean nothing would be written to ubuntu home, taking up more space, you'd have a bit more time to work, to gather a new hard disk to back stuff up to.
 
Old 08-22-2012, 09:38 AM   #6
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi all,

Thanks for your advice.

This is a spare HD NOT for production. I'll use it testing Cloud running on Fedora 17 and Ubuntu 12.04 respectively. There is not much data nor much work done on both OS. The only work I did several day before was installing rotation desktop on Ubuntu 12.04. It is now working.

Today I installed Fedora 17 on the freed space by shrinking Ubuntu 12.04 which was taking up the entire HD. Installation went through w/o much problem. Unfortunately I made a mistake on calculating the shrinked space to be retained by Ubuntu 12.04.

The target on this rectification is mainly for me to learn. I think I have to split the job into 2 sections

1)
Shrinking Fedora lv_home

2)
Adding the freed space to Ubuntu /


Would following document be relevant to 1) above?

9.5. Using the LVM utility system-config-lvm
http://www.centos.org/docs/5/html/De...onfig-lvm.html


I'm still hunting around for documents to be used for 2) above.

Thanks.

Edit:

I also found;

Linux LVM: Resizing partitions.
http://www.microdevsys.com/WordPress...ng-partitions/


B.R.
satimis

Last edited by satimis; 08-22-2012 at 09:49 AM.
 
Old 08-22-2012, 06:49 PM   #7
sKaar
Member
 
Registered: Jun 2006
Location: dartmouth, nova scotia
Distribution: slackware 12.1
Posts: 74

Rep: Reputation: 2
if the drives are already part of lvm volumes, it'd be VERY relevant. if not...
 
Old 08-23-2012, 06:50 AM   #8
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi all,

I followed;
How to Shrink an LVM Volume Safely
http://blog.shadypixel.com/how-to-sh...volume-safely/

to shrink /home of Fedora 17 from 78G to 10G to free 68G space with following steps:-

Booted up the PC with Fedora 17 live USB

# vgchange -a y
Code:
  3 logical volume(s) in volume group "vg_fedora17" now active
# resize2fs -f /dev/mapper/vg_fedora17-lv_home
Code:
resize2fs 1.42 (29-Nov-2011)
The filesystem is already 20258816 blocks long.  Nothing to do!
# e2fsck -f /dev/mapper/vg_fedora17-lv_home
Code:
e2fsck 1.42 (29-Nov-2011)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/vg_fedora17-lv_home: 477/5070848 files (5.9% non-contiguous), 383520/20258816 blocks
# resize2fs /dev/mapper/vg_fedora17-lv_home 9G
Code:
resize2fs 1.42 (29-Nov-2011)
Resizing the filesystem on /dev/mapper/vg_fedora17-lv_home to 2359296 (4k) blocks.
The filesystem on /dev/mapper/vg_fedora17-lv_home is now 2359296 blocks long.
# lvreduce -L 10G /dev/vg_fedora17/lv_home
Code:
  WARNING: Reducing active logical volume to 10.00 GiB
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce lv_home? [y/n]: y
  Reducing logical volume lv_home to 10.00 GiB
  Logical volume lv_home successfully resized

# fdisk -l
Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0x0000d52d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     8263679     4130816   83  Linux
/dev/sda2       296333310   312580095     8123393    5  Extended
/dev/sda3         8263680     9287679      512000   83  Linux
/dev/sda4         9287680   296331263   143521792   8e  Linux LVM
/dev/sda5       296333312   312580095     8123392   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/mapper/vg_fedora17-lv_swap: 10.3 GB, 10267656192 bytes
255 heads, 63 sectors/track, 1248 cylinders, total 20054016 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/vg_fedora17-lv_home: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 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/vg_fedora17-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 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


WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 4111 MB, 4111466496 bytes
255 heads, 63 sectors/track, 499 cylinders, total 8030208 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: 0x1d459011

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           0     1320959      660480    0  Empty
/dev/sdb2             164        1299         568   ef  EFI (FAT-12/16/32)
/dev/sdb3            1348        3587        1120    0  Empty

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb1'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb1: 676 MB, 676331520 bytes
255 heads, 63 sectors/track, 82 cylinders, total 1320960 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: 0x1d459011

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   *           0     1320959      660480    0  Empty
/dev/sdb1p2             164        1299         568   ef  EFI (FAT-12/16/32)
/dev/sdb1p3            1348        3587        1120    0  Empty

Disk /dev/mapper/live-rw: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 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/live-osimg-min: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 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

Rebooted PC to start Fedora 17

# fdisk -l
Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0x0000d52d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     8263679     4130816   83  Linux
/dev/sda2       296333310   312580095     8123393    5  Extended
/dev/sda3         8263680     9287679      512000   83  Linux
/dev/sda4         9287680   296331263   143521792   8e  Linux LVM
/dev/sda5       296333312   312580095     8123392   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/mapper/vg_fedora17-lv_swap: 10.3 GB, 10267656192 bytes
255 heads, 63 sectors/track, 1248 cylinders, total 20054016 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/vg_fedora17-lv_home: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 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/vg_fedora17-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 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


WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdb: 4111 MB, 4111466496 bytes

255 heads, 63 sectors/track, 499 cylinders, total 8030208 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: 0x1d459011

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           0     1320959      660480    0  Empty
/dev/sdb2             164        1299         568   ef  EFI (FAT-12/16/32)
/dev/sdb3            1348        3587        1120    0  Empty

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb1'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb1: 676 MB, 676331520 bytes
255 heads, 63 sectors/track, 82 cylinders, total 1320960 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: 0x1d459011

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   *           0     1320959      660480    0  Empty
/dev/sdb1p2             164        1299         568   ef  EFI (FAT-12/16/32)
/dev/sdb1p3            1348        3587        1120    0  Empty

Disk /dev/mapper/live-rw: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 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/live-osimg-min: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 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

$ df -h
Code:
Filesystem                       Size  Used Avail Use% Mounted on
rootfs                            50G  2.8G   46G   6% /
devtmpfs                         3.8G     0  3.8G   0% /dev
tmpfs                            3.8G   96K  3.8G   1% /dev/shm
tmpfs                            3.8G  1.1M  3.8G   1% /run
/dev/mapper/vg_fedora17-lv_root   50G  2.8G   46G   6% /
tmpfs                            3.8G     0  3.8G   0% /sys/fs/cgroup
tmpfs                            3.8G     0  3.8G   0% /media
/dev/sda3                        485M   72M  389M  16% /boot
/dev/mapper/vg_fedora17-lv_home  8.9G  235M  8.2G   3% /home
Gparted is NOT running on Fedora 17 live USB.

I have no solution to resize Ubuntu 12.04 / adding the free space. Neither I found a thread relevant.

Any advice. TIA

B.R.
satimis
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
insufficient disk space? Cultist Slackware 10 10-26-2020 06:28 PM
[SOLVED] Installing F8, perceived insufficient space northernswag Linux - Newbie 7 12-19-2007 12:35 AM
Installing F8, perceived insufficient space northernswag Fedora 1 12-17-2007 02:30 AM
Insufficient disk space ecastedo Linux - Newbie 3 09-10-2004 08:12 AM
Insufficient swap space shaz Linux - Newbie 1 03-19-2001 10:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration