reynierpm at gmail.com
2014-Oct-27 19:56 UTC
[CentOS] "No free sectors available" while try to extend logical volumen in a virtual machine running CentOS 6.5
I'm trying to extend a logical volume and I'm doing as follow:
1- Run `fdisk -l` command and this is the output:
Disk /dev/sda: 85.9 GB, 85899345920 bytes 255 heads, 63 sectors/track,
10443 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes I/O size
(minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00054fc6
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 10444 83371008 8e Linux LVM
Disk /dev/mapper/vg_devserver-lv_swap: 4194 MB, 4194304000 bytes 255
heads, 63 sectors/track, 509 cylinders Units = cylinders of 16065 *
512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512
bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk
identifier: 0x00000000
Disk /dev/mapper/vg_devserver-lv_root: 27.5 GB, 27523022848 bytes 255
heads, 63 sectors/track, 3346 cylinders Units = cylinders of 16065 *
512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512
bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk
identifier: 0x00000000
2- Run `fdisk /dev/sda`and print partition using `p`:
Disk /dev/sda: 85.9 GB, 85899345920 bytes 255 heads, 63 sectors/track,
10443 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes I/O size
(minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00054fc6
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 10444 83371008 8e Linux LVM
Try to create the partition by running:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
No free sectors available
I also check the free available space using vgdisplay and watching the Free
PE / Size part near the end and seems like I've free space available (Free
PE / Size 7670 / 29.96 GiB) so I tried to extend the LV by using the
command:lvextend -L+29G /dev/vg_devserver/lv_root but I got some errors and
don't know where to go from here. The first error I see at console is
this /dev/root:
read failed after 0 of 4096 at 27522957312: Input/output error /dev/root:
read failed after 0 of 4096 at 27523014656: Input/output error Couldn't
find device with uuid vSbuSJ-o1Kh-N3ur-JYkM-Ktr4-WEO2-JWe2wS. Cannot change
VG vg_devserver while PVs are missing. Consider vgreduce --removemissing.
Then following the suggestion from the previous command results I run this
other command vgreduce --removemissing vg_devserver but again got this
error: WARNING: Partial LV lv_root needs to be repaired or removed. There
are still partial LVs in VG vg_devserver. To remove them unconditionally
use: vgreduce --removemissing --force. Proceeding to remove empty missing
PVs. so I change the command to the one suggested but once again another
message Removing partial LV lv_root. Logical volume vg_devserver/lv_root
contains a filesystem in use. so at this point I don't know what else to
do,can any give me some ideas or help?
Don't kill me if is something basic I'm not a Linux Admin or a Linux
Advanced User just a developer trying to setup their development
environment. How I can get this done? What I'm doing wrong?
I'm following [this][1] guide because my filesytem is Ext4. Also [this][2]
is helpful too but applies to Ext3 only
[1]:
http://www.uptimemadeeasy.com/vmware/grow-an-ext4-filesystem-on-a-vmware-esxi-virtual-machine/
[2]:
http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1006371
Zhang, Jonathan
2014-Oct-27 20:24 UTC
[CentOS] "No free sectors available" while try to extend logical volumen in a virtual machine running CentOS 6.5
Rebooting your system, then run fdisk /dev/sda
Then run
P
N
P
3
8e
......so on
-----Original Message-----
From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On
Behalf Of reynierpm at gmail.com
Sent: Monday, October 27, 2014 12:57 PM
To: centos at centos.org
Subject: [CentOS] "No free sectors available" while try to extend
logical volumen in a virtual machine running CentOS 6.5
I'm trying to extend a logical volume and I'm doing as follow:
1- Run `fdisk -l` command and this is the output:
Disk /dev/sda: 85.9 GB, 85899345920 bytes 255 heads, 63 sectors/track,
10443 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes I/O size
(minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00054fc6
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 10444 83371008 8e Linux LVM
Disk /dev/mapper/vg_devserver-lv_swap: 4194 MB, 4194304000 bytes 255
heads, 63 sectors/track, 509 cylinders Units = cylinders of 16065 *
512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512
bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk
identifier: 0x00000000
Disk /dev/mapper/vg_devserver-lv_root: 27.5 GB, 27523022848 bytes 255
heads, 63 sectors/track, 3346 cylinders Units = cylinders of 16065 *
512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512
bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk
identifier: 0x00000000
2- Run `fdisk /dev/sda`and print partition using `p`:
Disk /dev/sda: 85.9 GB, 85899345920 bytes 255 heads, 63 sectors/track,
10443 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes I/O size
(minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00054fc6
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 10444 83371008 8e Linux LVM
Try to create the partition by running:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
No free sectors available
I also check the free available space using vgdisplay and watching the Free PE /
Size part near the end and seems like I've free space available (Free PE /
Size 7670 / 29.96 GiB) so I tried to extend the LV by using the command:lvextend
-L+29G /dev/vg_devserver/lv_root but I got some errors and don't know where
to go from here. The first error I see at console is this /dev/root:
read failed after 0 of 4096 at 27522957312: Input/output error /dev/root:
read failed after 0 of 4096 at 27523014656: Input/output error Couldn't find
device with uuid vSbuSJ-o1Kh-N3ur-JYkM-Ktr4-WEO2-JWe2wS. Cannot change VG
vg_devserver while PVs are missing. Consider vgreduce --removemissing.
Then following the suggestion from the previous command results I run this other
command vgreduce --removemissing vg_devserver but again got this
error: WARNING: Partial LV lv_root needs to be repaired or removed. There are
still partial LVs in VG vg_devserver. To remove them unconditionally
use: vgreduce --removemissing --force. Proceeding to remove empty missing PVs.
so I change the command to the one suggested but once again another message
Removing partial LV lv_root. Logical volume vg_devserver/lv_root contains a
filesystem in use. so at this point I don't know what else to do,can any
give me some ideas or help?
Don't kill me if is something basic I'm not a Linux Admin or a Linux
Advanced User just a developer trying to setup their development environment.
How I can get this done? What I'm doing wrong?
I'm following [this][1] guide because my filesytem is Ext4. Also [this][2]
is helpful too but applies to Ext3 only
[1]:
http://www.uptimemadeeasy.com/vmware/grow-an-ext4-filesystem-on-a-vmware-esxi-virtual-machine/
[2]:
http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1006371
_______________________________________________
CentOS mailing list
CentOS at centos.org
http://lists.centos.org/mailman/listinfo/centos
SilverTip257
2014-Oct-27 23:23 UTC
[CentOS] "No free sectors available" while try to extend logical volumen in a virtual machine running CentOS 6.5
On Mon, Oct 27, 2014 at 3:56 PM, reynierpm at gmail.com <reynierpm at gmail.com> wrote:> I'm trying to extend a logical volume and I'm doing as follow:> 1- Run `fdisk -l` command and this is the output: >This is for actual partitions, not LVM which seems to be what you want per the rest of your message.> > 2- Run `fdisk /dev/sda`and print partition using `p`: > >> Partition number (1-4): 3 > No free sectors available >It's telling you the truth. Sounds like you want another Logical Volume (LV) not partition.> > I also check the free available space using vgdisplay and watching the Free > PE / Size part near the end and seems like I've free space available (Free > PE / Size 7670 / 29.96 GiB) so I tried to extend the LV by using the > command:lvextend -L+29G /dev/vg_devserver/lv_root but I got some errors and >Unless you know what you're doing, you _really_ shouldn't do this in anything but a VM where you won't lose your data. First rule of LVM resizing is to adjust the size (grow or shrink depending on your goal) of the file system before resizing the LV "container". Remember there are a few "layers" here you have to keep in mind. disk --> partition --> LVM Phys Volume --> LVM Vol Group --> LVM Logical Vol --> File System (ext4, xfs, etc) If there are free extents in the VG, then you can probably create a LV. Depends on the extent size (defaults can vary between releases and/or an admin's configuration).> don't know where to go from here. The first error I see at console is > this /dev/root: > read failed after 0 of 4096 at 27522957312: Input/output error /dev/root: > read failed after 0 of 4096 at 27523014656: Input/output error Couldn't > find device with uuid vSbuSJ-o1Kh-N3ur-JYkM-Ktr4-WEO2-JWe2wS. Cannot change > VG vg_devserver while PVs are missing. Consider vgreduce --removemissing. > > Then following the suggestion from the previous command results I run this > other command vgreduce --removemissing vg_devserver but again got this > error: WARNING: Partial LV lv_root needs to be repaired or removed. There > are still partial LVs in VG vg_devserver. To remove them unconditionally > use: vgreduce --removemissing --force. Proceeding to remove empty missing > PVs. so I change the command to the one suggested but once again another > message Removing partial LV lv_root. Logical volume vg_devserver/lv_root > contains a filesystem in use. so at this point I don't know what else to > do,can any give me some ideas or help? >Sounds like you destroyed one or more of your LVs through all this. Please read the following documentation before forging further ahead. And you might spin up a VM or live CD to experiment with LVM operations before going any further as well. - speaks about extents [0] - read the entire Chapter 2 on LVM [1] as it applies to your scenario (ex: snapshots probably don't) - dated/older, but it may prove helpful [2] [0] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/lv_overview.html [1] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/LVM_components.html [2] http://www.tldp.org/HOWTO/html_single/LVM-HOWTO/ -- ---~~.~~--- Mike // SilverTip257 //
Robert Nichols
2014-Oct-28 03:51 UTC
[CentOS] "No free sectors available" while try to extend logical volumen in a virtual machine running CentOS 6.5
On 10/27/2014 02:56 PM, reynierpm at gmail.com wrote:> I also check the free available space using vgdisplay and watching the Free > PE / Size part near the end and seems like I've free space available (Free > PE / Size 7670 / 29.96 GiB) so I tried to extend the LV by using the > command:lvextend -L+29G /dev/vg_devserver/lv_root but I got some errors and > don't know where to go from here. The first error I see at console is > this /dev/root: > read failed after 0 of 4096 at 27522957312: Input/output error /dev/root: > read failed after 0 of 4096 at 27523014656: Input/output error Couldn't > find device with uuid vSbuSJ-o1Kh-N3ur-JYkM-Ktr4-WEO2-JWe2wS. Cannot change > VG vg_devserver while PVs are missing. Consider vgreduce --removemissing.Those I/O errors are alarming. They suggest that you have a disk that is failing. Does anything about disk sda appear in /var/log/messages when you do that? You should indeed have 29GB available for growing lv_root, but perhaps the disk error is what is preventing the tool from finding the LV's UUID. -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.