[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Missing Disk Space or Partition

Hi Brian,
Thanks for that. Yes, you're absolutely right, I used LVM in the hope that I will be able to control the size of the partitions. So, I kind of figured the same thing as you have suggested, but after having going through various LVM settings, I am stil confused as to how I can't find the remaining space when I had consciously created these partitions. When I get into LVM, I see the following:
lvm> lvmdiskscan
  /dev/ram0  [       16.00 MB]
  /dev/sda   [       68.37 GB]
  /dev/dm-0  [      264.00 MB]
  /dev/ram1  [       16.00 MB]
  /dev/sda1  [       94.41 MB]
  /dev/dm-1  [        4.66 GB]
  /dev/ram2  [       16.00 MB]
  /dev/sda2  [       43.21 GB] LVM physical volume
  /dev/dm-2  [        2.79 GB]
  /dev/ram3  [       16.00 MB]
  /dev/sda3  [       43.30 GB]
  /dev/dm-3  [        4.66 GB]
  /dev/ram4  [       16.00 MB]
  /dev/dm-4  [      380.00 MB]
  /dev/ram5  [       16.00 MB]
  /dev/dm-5  [       30.47 GB]
  /dev/ram6  [       16.00 MB]
  /dev/ram7  [       16.00 MB]
  /dev/ram8  [       16.00 MB]
  /dev/ram9  [       16.00 MB]
  /dev/ram10 [       16.00 MB]
  /dev/ram11 [       16.00 MB]
  /dev/ram12 [       16.00 MB]
  /dev/ram13 [       16.00 MB]
  /dev/ram14 [       16.00 MB]
  /dev/ram15 [       16.00 MB]
  /dev/sdb   [       68.37 GB]
  /dev/sdb1  [       67.46 GB]
  /dev/sdb2  [      914.25 MB]
  /dev/sdb3  [       68.35 GB]
and when I do an lvextend, I get this:
lvm> lvextend
  Please specify either size or extents but not both.
even weirder is that when I try to see the physical parameters of the disk, which is clearly a 68.37GB. Further
lvm> pvs
  PV         VG           Fmt  Attr PSize  PFree
  /dev/sda2  AUASTMRCP-01 lvm2 a-   43.21G    0
shows the main partition to be 43.21GB and if /dev/sda1 is boot and /dev/sda2 is the lvm volume and /dev/sda2 is the "whole disk", then how/where do I extend this volume to?
/# fdisk -l /dev/sda
Disk /dev/sda (Sun disk label): 24 heads, 424 sectors, 8922 cylinders
Units = cylinders of 10176 * 512 bytes
   Device Flag    Start       End    Blocks   Id  System
/dev/sda1             0        19     96672    1  Boot
/dev/sda2            19      8924  45308640   8e  Linux LVM
/dev/sda3             0      8924  45405312    5  Whole disk
as per the above, /sda2 is extending from cylinder 19 to the last cylinder but it's coming u to only 43.21GB? Where did the rest of it go?
I swear I'm really not this bad with Linux/Unix admin stuff but this is really weird. Any ideas?
Thanks so much in advance,

On Thu, Jan 20, 2011 at 6:23 PM, brian m. carlson <sandals@crustytoothpaste.net> wrote:
On Thu, Jan 20, 2011 at 05:49:06PM -0500, RR wrote:
> /dev/mapper/DebSparcx64--01-root 256M   78M  166M  32% /
> tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
> udev                   10M  1.1M  9.0M  11% /dev
> tmpfs                 2.0G     0  2.0G   0% /dev/shm
> /dev/mapper/DebSparcx64--01-home  30G  177M   29G   1% /home
> /dev/mapper/DebSparcx64--01-tmp  368M   11M  339M   3% /tmp
> /dev/mapper/DebSparcx64--01-usr  4.6G  372M  4.0G   9% /usr
> /dev/mapper/DebSparcx64--01-var  2.8G  189M  2.5G   8% /var
> The question now is, if you look carefully, I only have ~37GB showing as
> partitioned. Where is the remaining (72-37 GB) space? This was easy to see
> in 'format' command in Solaris but doing all sort of cart-wheels in
> Debian/Linux, I don't know what the heck these dm-* partitions are, which
> seem to be where this missing space is, and how do I get to it to create a
> valid partition out of it and mount it and use it?

Let me guess: you used LVM.  If you did, you can use "vgdisplay -v
DebSparcx64-01" (more generically, "vgdisplay -v name-of-volume-group")
as root to see how much space is allocated and free.  The dm-* devices
are device mapper devices; LVM uses device mapper, so one of those will
be created for each logical volume.

To expand a logical volume (such as one of the /dev/mapper devices
listed above), use lvextend to increase the size of the logical volume,
and then use resize2fs to increase the size of the filesystem on that
device.  If you are simply increasing the size (and not decreasing it),
you needn't provide a size to resize2fs; it will automatically determine
the correct size itself.  If the filesystems have been created with a
recent enough version of e2fsprogs, you can perform the resizing online;
that is, while the filesystem is mounted and in use.

brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Reply to: