1824939 Members
4064 Online
109678 Solutions
New Discussion юеВ

lvextend error

 
SOLVED
Go to solution
Zean Wilmot
Occasional Advisor

lvextend error

Hi

I have an existing Mirror whch i have added another disk to. which i can see but when i issue the following command :
lvextend -m 2 /dev/vg01/lvol12 /dev/dsk/c5t10d0

I get a message back :

lvextend: Not enough free physical extents available.
Logical volume "/dev/vg01/lvol12" could not be extended.

How can i fix this as the disk is added ok.

thanks

Zean
14 REPLIES 14
KapilRaj
Honored Contributor
Solution

Re: lvextend error

Check the size of the logical volume and check the size of disk on which u are extending the mirror copy..

I trust u r extending the lvol to have a second mirror copy!!

If you can give me the size of the logical volume , the size of the disk (diskinfo) i would be in a position to give a better suggession.

Kaps ......
Nothing is impossible
K.C. Chan
Trusted Contributor

Re: lvextend error

do a vgdisplay on that volume group to make sure you have enough extent available; I am assuming the mirror have equal amount of disks (space). Attachmed of vdisplay -v on that volume group would be nice.
Reputation of a thousand years can be determined by the conduct of an hour
Zean Wilmot
Occasional Advisor

Re: lvextend error

Hi

Thanks for getting back to me the output from diskinfo is as followed :

New Disk
SCSI describe of /dev/rdsk/c5t10d0:
vendor: SEAGATE
product id: ST336704LC
type: direct access
size: 35566480 Kbytes
bytes per sector: 512

Orignal

is two 18Gig disks

diskinfo /dev/rdsk/c5t9d0
SCSI describe of /dev/rdsk/c5t9d0:
vendor: SEAGATE
product id: ST318404LC
type: direct access
size: 17783240 Kbytes
bytes per sector: 512

diskinfo /dev/rdsk/c7t9d0

I believe this should work.

Thanks
Zean
Zigor Buruaga
Esteemed Contributor

Re: lvextend error

Hi,

Could you please post the output of "vgdisplay -v /dev/vg01"

Kind regards,
Zigor
grace white
Advisor

Re: lvextend error

Hi

Output from vgdisplay :

vgdisplay -v /dev/vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 4341
VGDA 6
PE Size (Mbytes) 4
Total PE 13021
Alloc PE 8680
Free PE 4341
Total PVG 2
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol12
LV Status available/syncd
LV Size (Mbytes) 17360
Current LE 4340
Allocated PE 8680
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c5t9d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c7t9d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c5t10d0
PV Status available
Total PE 4341
Free PE 4341
Autoswitch On


--- Physical volume groups ---
PVG Name pv0
PV Name /dev/dsk/c5t9d0

PVG Name pv1
PV Name /dev/dsk/c7t9d0
UNIX/ORACLE DBA
Zigor Buruaga
Esteemed Contributor

Re: lvextend error

Hi,

Try with "lvextend -m 2 /dev/vg01/lvol12"

Kind regards,
Zigor
grace white
Advisor

Re: lvextend error

Hi Zigor

Thats worked great.

Thanks
Zean
UNIX/ORACLE DBA
KapilRaj
Honored Contributor

Re: lvextend error

Have u noticed this ?....He is using PE size 4 MB and Max PE 43?? this will allow him to utilise 16 GB out of his 18/36 GB disks .... Am i correct ?.

I think he should go for a bigger PE size (That needs a VG re-creation !! ;))

Kaps ....
Nothing is impossible
Zigor Buruaga
Esteemed Contributor

Re: lvextend error

Hi,

Yes, they could use 4340 x 4 MB
I guess today is very difficult to buy a new 18 GB disk ( so short ...).

Kind regards,
Zigor
Zean Wilmot
Occasional Advisor

Re: lvextend error

Hi

Guys this is fine as the system is being rebuilt in January so it is just a temp fix.

Just one question when i extend the volume group because my head has gone blank.

Bdf o/p

Filesystem kbytes used avail %used Mounted on
/dev/vg01/lvol12 17776640 16400861 1290609 93% /home3

I want to increase by 3 Gig so do i add the avail size + 3Gig

Cheers
Zean
KapilRaj
Honored Contributor

Re: lvextend error

For extending 3 gigs u need 9 gigs free space as u have 2 mirror copies... and if u have strict PVG policy then u need 3 gb free on each disk !

Kaps
Nothing is impossible
Zigor Buruaga
Esteemed Contributor

Re: lvextend error

Hi,

I'm afraid I don't understand your problem. Do you want to increase the size of your file system, but now you don't have free disk space?

Kind regards,
Zigor
Zigor Buruaga
Esteemed Contributor

Re: lvextend error

Hi,

Or perhaps you didn't want to increase the mirror copies, but the file system space?

Kind regards,
Zigor
Zigor Buruaga
Esteemed Contributor

Re: lvextend error

Hi again,

Assuming you want to increase your file system, as far as I know, it would be hard.
Your file system and its mirror ( only one copy ) fills two 18 GB disks. You have added one disk of 36 GB, but only 18 GB are usable, so you can extend your file system ( deleting first all your mirror copies ), but when you create the mirror, one disk would contain "real" data and mirrored data, so if that disk crash ...
So the only way I can think to increase your file system would be not mirror your lvol, or rebuild your VG ( to increase the Max PE per PV ), so you can put your lvol in the 36 GB disk, and mirror it against the other two 18 GB disks.

Anyway, I'm sure that some expert here could give you a better advise.

Kind regards,
Zigor