Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Installing Windows along with fedora 18 problem with lvm

I want to install windows along with fedora in my system, and for the same I resized me 750 GB /home to 500GB and mounted it back. Whenever I try to run lvm pvresize i get the following error

[root@localhost ~]# lvm pvresize /dev/sda3 --setphysicalvolumesize 232G
  /dev/sda3: cannot resize to 59391 extents as 178789 are allocated.
  0 physical volume(s) resized / 1 physical volume(s) not resized

I think the problem is that the /root and swap are still linearly mounted after the unused space.

[root@localhost ~]# df
Filesystem              1K-blocks    Used Available Use% Mounted on
rootfs                   51606140  992812  47991888   3% /
devtmpfs                  2739528       0   2739528   0% /dev
tmpfs                     2751188     236   2750952   1% /dev/shm
tmpfs                     2751188    5028   2746160   1% /run
tmpfs                     2751188       0   2751188   0% /sys/fs/cgroup
/dev/mapper/fedora-root  51606140  992812  47991888   3% /
/dev/mapper/fedora-usr  146149952 4177604 134548348   4% /usr
/dev/sda2                  495844   41975    428269   9% /boot
/dev/sda1                  204580    7996    196584   4% /boot/efi
/dev/mapper/fedora-tmp    1592444   36352   1475196   3% /tmp
/dev/sr0                  4465968 4465968         0 100% /run/media/root/Fedora 18 x86_64
/dev/mapper/fedora-home 516061624  788080 489059144   1% /home

:![logical volume management] (http://dl.dropbox.com/u/113616505/Screenshot%20from%202013-02-12%2000%3A20%3A09.png "logical volume management")

Is it it the problem why pvresize fails? Is possible to move /root and swap? How can I make a new fat/ntfs partion to install windows?

Installing Windows along with fedora 18 problem with lvm

I want to install windows along with fedora in my system, and for the same I resized me 750 GB /home to 500GB and mounted it back. Whenever I try to run lvm pvresize i get the following error

[root@localhost ~]# lvm pvresize /dev/sda3 --setphysicalvolumesize 232G
  /dev/sda3: cannot resize to 59391 extents as 178789 are allocated.
  0 physical volume(s) resized / 1 physical volume(s) not resized

I think the problem is that the /root and swap are still linearly mounted after the unused space.

[root@localhost ~]# df
Filesystem              1K-blocks    Used Available Use% Mounted on
rootfs                   51606140  992812  47991888   3% /
devtmpfs                  2739528       0   2739528   0% /dev
tmpfs                     2751188     236   2750952   1% /dev/shm
tmpfs                     2751188    5028   2746160   1% /run
tmpfs                     2751188       0   2751188   0% /sys/fs/cgroup
/dev/mapper/fedora-root  51606140  992812  47991888   3% /
/dev/mapper/fedora-usr  146149952 4177604 134548348   4% /usr
/dev/sda2                  495844   41975    428269   9% /boot
/dev/sda1                  204580    7996    196584   4% /boot/efi
/dev/mapper/fedora-tmp    1592444   36352   1475196   3% /tmp
/dev/sr0                  4465968 4465968         0 100% /run/media/root/Fedora 18 x86_64
/dev/mapper/fedora-home 516061624  788080 489059144   1% /home

:![logical image:![logical volume management] (http://dl.dropbox.com/u/113616505/Screenshot%20from%202013-02-12%2000%3A20%3A09.png "logical volume management")

Is it it the problem why pvresize fails? Is possible to move /root and swap? How can I make a new fat/ntfs partion to install windows?

Output of fdisk -l

[root@localhost ~]# fdisk -l

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


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/mapper/fedora-usr: 152.0 GB, 152043520000 bytes, 296960000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/fedora-swap: 5637 MB, 5637144576 bytes, 11010048 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/fedora-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/fedora-tmp: 1656 MB, 1656750080 bytes, 3235840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/fedora-home: 536.9 GB, 536870912000 bytes, 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

click to hide/show revision 3
Some more information (vgdisplay lvdisplay lvm)

Installing Windows along with fedora 18 problem with lvm

I want to install windows along with fedora in my system, and for the same I resized me 750 GB /home to 500GB and mounted it back. Whenever I try to run lvm pvresize i get the following error

[root@localhost ~]# lvm pvresize /dev/sda3 --setphysicalvolumesize 232G
  /dev/sda3: cannot resize to 59391 extents as 178789 are allocated.
  0 physical volume(s) resized / 1 physical volume(s) not resized

I think the problem is that the /root and swap are still linearly mounted after the unused space.

[root@localhost ~]# df
Filesystem              1K-blocks    Used Available Use% Mounted on
rootfs                   51606140  992812  47991888   3% /
devtmpfs                  2739528       0   2739528   0% /dev
tmpfs                     2751188     236   2750952   1% /dev/shm
tmpfs                     2751188    5028   2746160   1% /run
tmpfs                     2751188       0   2751188   0% /sys/fs/cgroup
/dev/mapper/fedora-root  51606140  992812  47991888   3% /
/dev/mapper/fedora-usr  146149952 4177604 134548348   4% /usr
/dev/sda2                  495844   41975    428269   9% /boot
/dev/sda1                  204580    7996    196584   4% /boot/efi
/dev/mapper/fedora-tmp    1592444   36352   1475196   3% /tmp
/dev/sr0                  4465968 4465968         0 100% /run/media/root/Fedora 18 x86_64
/dev/mapper/fedora-home 516061624  788080 489059144   1% /home

image:![logical volume management] (http://dl.dropbox.com/u/113616505/Screenshot%20from%202013-02-12%2000%3A20%3A09.png "logical volume management")

Is it it the problem why pvresize fails? Is possible to move /root and swap? How can I make a new fat/ntfs partion to install windows?

Output of fdisk -l

[root@localhost ~]# fdisk -l

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


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/mapper/fedora-usr: 152.0 GB, 152043520000 bytes, 296960000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/fedora-swap: 5637 MB, 5637144576 bytes, 11010048 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/fedora-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/fedora-tmp: 1656 MB, 1656750080 bytes, 3235840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/fedora-home: 536.9 GB, 536870912000 bytes, 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


[root@localhost ~]# vgdisplay
  --- Volume group ---
  VG Name               fedora
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                5
  Open LV               5
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               930.82 GiB
  PE Size               4.00 MiB
  Total PE              238290
  Alloc PE / Size       178789 / 698.39 GiB
  Free  PE / Size       59501 / 232.43 GiB
  VG UUID               n1dHoq-RcMl-N23s-vOva-415R-OXQd-QUZf03

[root@localhost ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/fedora/tmp
  LV Name                tmp
  VG Name                fedora
  LV UUID                28dMTo-T10E-hvSG-SxP8-TfaG-SKdL-TZmknj
  LV Write Access        read/write
  LV Creation host, time localhost, 2013-02-07 18:15:01 +0530
  LV Status              available
  # open                 1
  LV Size                1.54 GiB
  Current LE             395
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3

  --- Logical volume ---
  LV Path                /dev/fedora/usr
  LV Name                usr
  VG Name                fedora
  LV UUID                04q98a-dMgO-arp8-t6iP-XoXR-dgxI-rFd19l
  LV Write Access        read/write
  LV Creation host, time localhost, 2013-02-07 18:15:02 +0530
  LV Status              available
  # open                 1
  LV Size                141.60 GiB
  Current LE             36250
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/fedora/home
  LV Name                home
  VG Name                fedora
  LV UUID                RR1f9H-vKqw-zbBP-piXS-ORtT-mdn8-PHgRQO
  LV Write Access        read/write
  LV Creation host, time localhost, 2013-02-07 18:15:06 +0530
  LV Status              available
  # open                 1
  LV Size                500.00 GiB
  Current LE             128000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4

  --- Logical volume ---
  LV Path                /dev/fedora/swap
  LV Name                swap
  VG Name                fedora
  LV UUID                n1hyQp-slDu-Kjz2-aL8J-tLMf-0u3W-Nd45vo
  LV Write Access        read/write
  LV Creation host, time localhost, 2013-02-07 18:15:12 +0530
  LV Status              available
  # open                 2
  LV Size                5.25 GiB
  Current LE             1344
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                root
  VG Name                fedora
  LV UUID                f5qkBC-Zc8N-bNeN-uAAp-AutD-o2hj-adLdFb
  LV Write Access        read/write
  LV Creation host, time localhost, 2013-02-07 18:15:13 +0530
  LV Status              available
  # open                 1
  LV Size                50.00 GiB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

[root@localhost ~]# lvs
  LV   VG     Attr      LSize   Pool Origin Data%  Move Log Copy%  Convert
  home fedora -wi-ao--- 500.00g                                           
  root fedora -wi-ao---  50.00g                                           
  swap fedora -wi-ao---   5.25g                                           
  tmp  fedora -wi-ao---   1.54g                                           
  usr  fedora -wi-ao--- 141.60g