Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was confused why I was getting out of space errors so I ran df and saw this:

[me@fedlap /]$ df -h
Filesystem                     Size  Used Avail Use% Mounted on
rootfs                          43G  9.4G   34G  23% /
...
/dev/mapper/vg_fedlap-lv_root   43G  9.4G   34G  23% /
...
/dev/mapper/vg_fedlap-lv_home   22G   21G   12M 100% /home

The partition is about 69GB so the sum of everything is correct, but I have no idea why /home is allocated this way. Gparted shows one 500MB ext4 partition and one lvm2 69Gb partition. What exactly is /dev/mapper and is there a way to remove it?

I have no idea what the ratio of installed programs to user data will be in the future so I have no need to separate these on a single user system. This is on Fedora 16 with one physical disk.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

/dev/mapper is used by LVM. You cannot remove it unless you remove LVM, but this is not a trivial task; if you insist, it is easiest to just back up your data, reinstall, and restore your data.

share|improve this answer
    
Is there a way to resize? If it needs a reinstall I'd rather wait until F17 is released. –  Pete Mar 7 '12 at 22:35
2  
Enlarging a volume can be done while the system is running, but you'll need to take it offline in order to reduce. See the LVM how-to for details. –  Ignacio Vazquez-Abrams Mar 7 '12 at 22:38
add comment

Your system is using the Logical Volume Manager to manage the disk space.

One advantage of using LVM is that, without reinstalling your system, you can do things as changing the size of logical partitions or as adding new disks.

In any case, backup your data. To resize partitions with LVM is quite easy but this is the first time you do such a thing, so be careful.

Next time you install a system using LVM, you should keep the partitions as smaller as you can. Keep as much free space as you can in the volume group. This way you can easily increase the partition when you need more space.

There are many ways you can proceed according to your installation details:

  1. Do you have some un-partitioned disk space on your system? If yes, you can:
    • create a new lvm partition (a physical volume in LVM jargon).
    • add it to your volume group vg_fedlap (using vgextend command).
    • fall back to point 2 of this list.
  2. Do you have some free space in your volume group vg_fedlap?
    • run vgdisplay vg_fedlap and check for Free PE / Size. If zero, go to point 2 of this list.
    • use lvextend to extend your logical volume lv_home
    • extend your file system to the new logical volume size by resize2fs or resize_reiserfs according to your file system type.
  3. If you have no free space, You need to shrink your root filesystem.
    • start your system by a fedora installation disk in rescue mode.
    • shrink your file system to the new desidered size by resize2fs or resize_reiserfs according to your file system type.
    • use lvreduce to reduce the lv-root size.
    • reboot your system.
    • now you have free space, go to point 2 of this list.
share|improve this answer
    
+1 for backing data up. –  Sardathrion Mar 8 '12 at 12:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.