SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-01-22 15:44:09

asportking
Member
Registered: 2013-10-24
Posts: 23

Managing logical partitions?

I'm currently trying to resize some of my partitions. Here's how I currently have my drive partitioned:

NAME                    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                       8:0    0 149.1G  0 disk 
├─sda1                    8:1    0   243M  0 part /boot
├─sda2                    8:2    0     1K  0 part 
└─sda5                    8:5    0 148.8G  0 part 
  ├─henry-root (dm-0)   254:0    0   332M  0 lvm  /
  ├─henry-usr (dm-1)    254:1    0   8.4G  0 lvm  /usr
  ├─henry-var (dm-2)    254:2    0   2.8G  0 lvm  /var
  ├─henry-swap_1 (dm-3) 254:3    0     2G  0 lvm  [SWAP]
  ├─henry-tmp (dm-4)    254:4    0   380M  0 lvm  /tmp
  └─henry-home (dm-5)   254:5    0   135G  0 lvm  /home

Sort of sloppy, I know, which is why I'm trying to fix it. I'm trying to figure out how to enlarge the root partition, but when I try to manage my partitons with cfdisk, gparted, or any other programs, all I see are sda1, sda2, and sda5. How do I manage these subpartitions?

Offline

Help fund CrunchBang, donate to the project!

#2 2014-01-22 16:04:59

iann
#! Die Hard
Registered: 2010-09-10
Posts: 714

Re: Managing logical partitions?

The dm-* are not partitions at all, they are logical volumes.  gparted is only interested in actual partitions, which appear to be /dev/sda1, /dev/sda2, and /dev/sda5.

You can use dmsetup or pvs to look at them and see what they actually are.  It appears that you probably have them mapped to directories within the actual dev/sda5 partition.

Offline

#3 2014-01-22 16:30:29

retf
#! CrunchBanger
From: On top of spaghetti
Registered: 2013-12-25
Posts: 200

Re: Managing logical partitions?

sudo lvdisplay

Should show your logical volumes.
Use:

lvresize

To first debit a volume.  And then again to add the newly created free space to a different volume.

All your logical volumes are located at:

/dev/volume-group/logical-volume

Of course 'volume-group' and 'logical-volume' are place holders - in your situation 'logical-volume' would be dm-0 or dm-1 or ...
Look at the 'LV Path' line of the lvdisplay command to find each volume's location.

Here's a how-to written much better than I could do...
http://www.microhowto.info/howto/increa … olume.html

Offline

#4 2014-01-22 17:47:44

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2012-03-22
Posts: 956
Website

Re: Managing logical partitions?

Also GUI:

$ sudo system-config-lvm

(maybe not installed by default).


Postpone all your duties; if you die, you won't have to do them ..

Offline

#5 2014-01-23 16:15:35

asportking
Member
Registered: 2013-10-24
Posts: 23

Re: Managing logical partitions?

retf wrote:
sudo lvdisplay

Should show your logical volumes.
Use:

lvresize

To first debit a volume.  And then again to add the newly created free space to a different volume.

All your logical volumes are located at:

/dev/volume-group/logical-volume

Of course 'volume-group' and 'logical-volume' are place holders - in your situation 'logical-volume' would be dm-0 or dm-1 or ...
Look at the 'LV Path' line of the lvdisplay command to find each volume's location.

Here's a how-to written much better than I could do...
http://www.microhowto.info/howto/increa … olume.html

Thanks! It took me a bit of messing around to shrink one of my other volumes, but I got it to work.

Offline

#6 2014-01-23 16:43:10

VDP76
#! Bean Roaster
Registered: 2012-04-12
Posts: 839

Re: Managing logical partitions?

asportking, I don't know whether you have already read it or not, but check mi signature for el_koraco's monumental LVM guide...


#!#!#! Forum etiquette #!#!#!
Are you a new member!? Have you introduced yourself?!
CLI basics | LVM | smxi | chrooting | multiarch

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo