LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-24-2010, 01:59 AM   #1
sunandwavs
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Rep: Reputation: 0
/ filesystem out of space


hi,

i just installed Fedora 12 (via vbox 3.1.4). stupidly i started with 8G and, of course, ran out of space on the / filesystem. i added 8G to the drive which now shows as 17G.
based on the below outputs, it looks like i have 8G more space available on the drive. based on reading other posts it looks like i need to use parted to increase the size but not sure how to do that. any help appreciated.


Code:
[root@fedora12 ~]# fdisk -l

Disk /dev/sda: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00096fdc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26        1044     8181098+  8e  Linux LVM

Disk /dev/dm-0: 6262 MB, 6262095872 bytes
255 heads, 63 sectors/track, 761 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table
Code:
[root@fedora12 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_fedora12-lv_root
                      5.8G  5.0G  481M  92% /
tmpfs                1008M  420K 1007M   1% /dev/shm
/dev/sda1             194M   54M  131M  30% /boot
[root@fedora12 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_fedora12-lv_root
                      5.8G  5.0G  481M  92% /
tmpfs                1008M  420K 1007M   1% /dev/shm
/dev/sda1             194M   54M  131M  30% /boot
Code:
[root@fedora12 ~]# df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/mapper/vg_fedora12-lv_root
                      382768  206746  176022   55% /
tmpfs                 218155      10  218145    1% /dev/shm
/dev/sda1              51200      44   51156    1% /boot
Code:
[root@fedora12 ~]# mount
/dev/mapper/vg_fedora12-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/steve/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=steve)
Code:
[root@fedora12 ~]# parted
GNU Parted 1.9.0
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print all                                                        
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 17.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  210MB   210MB   primary  ext4         boot
 2      210MB   8587MB  8377MB  primary               lvm


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/vg_fedora12-lv_swap: 2114MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system     Flags
 1      0.00B  2114MB  2114MB  linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/vg_fedora12-lv_root: 6262MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  6262MB  6262MB  ext4

(parted) q    
 
Old 02-24-2010, 02:10 AM   #2
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
You are using LVM for your partition. The physical partition already occupies the whole disk. You have to use lvextend to increase the partition size:
Code:
lvextend -L 14G vg_fedora12/lv_root
Will change the size of your logical volume vg_fedora12/lv_root to 14GiB.
Then call 'resize2fs /dev/mapper/vg_fedora12-lv_root' and have a look at 'df -h' again.
 
Old 02-24-2010, 03:03 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
It's an lvm issue as pointed above. I will only add that gparted (nor even parted itself) has not any lvm capabilities, other than recognizing the volumes. Besides that, note that once the lvm volume has grown you will probably need to grow the file system inside of it. lvm has nothing to do with the fs. For ext2/3 you'd use resize2fs. There are similar tools for other fs's.

EDITED: random link illustrating the thing.
http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html
 
Old 02-24-2010, 11:06 PM   #4
sunandwavs
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Original Poster
Rep: Reputation: 0
lvextend errors

Thanks for the quick response. I ran lvextend and received this error. My guess is the additional 8G added needs to be initialized perhaps??

Code:
[root@fedora12 steve]# lvextend -v -L 14G vg_fedora12/lv_root
    Finding volume group vg_fedora12
    Archiving volume group "vg_fedora12" metadata (seqno 3).
  Extending logical volume lv_root to 14.00 GB
  Insufficient free space: 2091 extents needed, but only 0 available
[root@fedora12 steve]#
 
Old 02-24-2010, 11:51 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Well, what those quotes seem to say is (approx nums):

1. the disk is 17GB of which
2. 200MB is /boot
3. 8GB is LVM split 2 ways:
3a. 2 GB swap
3b. 6 GB usable Linux ie '/'
4. 8.x GB unpartitioned

You'll need to use fdisk or parted to assign the rest of the disk (sda3) to a partition; type 8e (lvm).
Use the pvcreate to make it avail to lvm system.

pvcreate /dev/sda3
vgextend vg_fedora12 /dev/sda3
lvextend -L +8G /dev/vg_fedora12/lv_root
resize2fs -p /dev/vg_fedora12/lv_root


NB: in order to avoid wasted space, use a much larger num in the lvextend cmd eg 10. This will tell you you don't have 10GB avail,but it will tell you how many extents avail. To avoid cvt extents to bytes, use the -l (lower L) switch with the num of extents from the error msg eg

lvextend -l <num-extents-avail> /dev/vg_fedora12/lv_root


See also http://tldp.org/HOWTO/LVM-HOWTO/ (NB: you have V2 of LVM).
 
Old 02-25-2010, 12:23 AM   #6
sunandwavs
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Original Poster
Rep: Reputation: 0
pvcreate error

i ran pvcreate and received the below error. how do i define sda3?

Code:
[root@fedora12 steve]# pvcreate /dev/sda3
  Device /dev/sda3 not found (or ignored by filtering).

Last edited by sunandwavs; 02-25-2010 at 11:30 AM.
 
Old 02-25-2010, 05:01 PM   #7
sunandwavs
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Solved. I found the solution at the Fedora forums.

Fedora has a Palimpsest Disk Utility GUI (Applications>SystemTools>DiskUtility) under which the new space can be partitioned. Then you invoke the LVM GUI (System>Administration>LogicalVolumeManagement) where you initialize and then convert to LVM and then add to the existing LVM group.

Thanks for the help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to repair filesystem (it is appearing as free space) ? wearetheborg Linux - General 4 02-16-2010 05:04 PM
Ext3 Filesystem Missing Some Space, Where Did It Go? milkyspit Linux - Newbie 2 12-23-2009 08:12 PM
installation problem: need space on / filesystem felac Linux - Newbie 3 08-12-2008 06:27 PM
where has my disk space gone? corrupt filesystem? matticus Suse/Novell 3 09-19-2006 10:06 PM
Filesystem out of disk space humanrig Linux - Hardware 2 03-15-2004 07:21 AM


All times are GMT -5. The time now is 02:25 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration