Operating System - HP-UX
1836380 Members
2599 Online
110100 Solutions
New Discussion

Re: Take space from lvol to another

 
SOLVED
Go to solution
Mousa55
Super Advisor

Take space from lvol to another

Hi
I have to filesystem in the same volume group,
/dev/vg01/lvol9 92176384 9400472 82129280 10% /u09
/dev/vg01/lvol8 71696384 60367720 11240200 84% /u08
I want to take 30GB from available size in lvol9 to set in lvol8
Is this possible or no.


Thanks & kind Regards
21 REPLIES 21
Davis Paul
Valued Contributor

Re: Take space from lvol to another

Hi Nejad,
Take the back up of /u09 and reduce the lvol9 for reduce the size. Then do exendfs to lvol9. Now you can increase the space in /u08.

Regsrds,
Davis Paul
Mousa55
Super Advisor

Re: Take space from lvol to another

Hi
You can give me more details
And what you mean In "" exendfs" to lvol9 ""

thanks a lot
Shrikant Lavhate
Esteemed Contributor

Re: Take space from lvol to another

Hi,

Yes devis is right.

Backup lvol09

#umount /dev/vg01/lvol9

#lvreduce -L /dev/vg01/lvol9
Enter size in MB which is reduced size of lvol9

#umount /dev/vg01/lvol8

#lvextend -L /dev/vg01/lvol8
Enter size in MB which is increased size.

#extendfs -F vxfs /dev/vg01/rlvol8
Assuming FS is vxfs type.

#mount /dev/vg01/lvol8

#mount /dev/vg01/lvol9

Done.

-=ShRi=-
Will it remain a personal, if I broadcast it here!
Shrikant Lavhate
Esteemed Contributor

Re: Take space from lvol to another

Hi again,

I forgot to mention before you mount lvol9, you have to restore data from backup on it,if necessary.

lvol8 new size will be current size + extra space taken i.e. increased size.

-=ShRi=-
Will it remain a personal, if I broadcast it here!
Davis Paul
Valued Contributor
Solution

Re: Take space from lvol to another

Steps:
1) #take the backup of /u09.
2) #umount /u09
3) #lvreduce -L 60710M /dev/vg01/lvol9
4) #extendfs -F vxfs /dev/vg01/rlvol9
5) #umount /u08
6) #lvextend -L 103154M /dev/vg01/lvol8
7) #extendfs -F vxfs /dev/vg01/rlvol8
8) #mount /dev/vg01/lvol9 /u09
9) #mount /dev/vg01/lvol8 /u08
Shrikant Lavhate
Esteemed Contributor

Re: Take space from lvol to another

If you have online JFS installed then you can use fsadm commands.

You can check it by using:

#swlist -l pakage| grep -i JFS

If online JFS is installed then slight difference in procedure. Resizing will be done by-

#fsadm -b /u09
size is decresed size of lvol9

#fsadm -b /u08
size is increased size of lvol8
Will it remain a personal, if I broadcast it here!
Mousa55
Super Advisor

Re: Take space from lvol to another

Hi
thanks for all replay
but i have a last Questions, Is there any impact of lvreduce command on my data
i need yes or no answer?
i have vxfs filesystem
thanks
Davis Paul
Valued Contributor

Re: Take space from lvol to another

Nejad,
It may damage your data. So backup is very important.
Davis Paul
Shrikant Lavhate
Esteemed Contributor

Re: Take space from lvol to another

Hi,

If lvreduce is reducing your disk size to X which is greater than data lvol holds then their are very rare chances of loosing data. But if you are reducing to size which is lesser than data it hold then you are surely going to mess up with your data.

Anyways, why to take chance.. Be ready with backup!

-=ShRi=-
Will it remain a personal, if I broadcast it here!
Mousa55
Super Advisor

Re: Take space from lvol to another

Hi
after applay lvreduce command thes message appeared
Warning: rounding up logical volume size to extent boundary at size "49728" MB.
Warning: The Logical Volume has a file system larger than the reduced size.
Reducing the Logical Volume will cause filesystem corruption.
When a logical volume is reduced useful data might get lost;
Shrikant Lavhate
Esteemed Contributor

Re: Take space from lvol to another

That means you are reducing down the size of data inside... That menas you need a backup of data cause you are going to loose all your data on that lvol.

So take backup and proceed.
Will it remain a personal, if I broadcast it here!
Sajjad Sahir
Honored Contributor

Re: Take space from lvol to another

Nejad follow up the above step
.back up is very important
and if online jfs installed u can use fsadm
command
otherwise u can use extendfs command for extending filesytem ok
Sajjad Sahir
Honored Contributor

Re: Take space from lvol to another

data1# swlist -l product | grep -i jfs
JFS B.11.23 The Base VxFS File System
OnlineJFS B.11.23.0609 Online features of the VxFS File System

see if u are getting result like these then it means online jfs is isntalled then u can use fsadm command otherwise u have to use
extendfs command
Davis Paul
Valued Contributor

Re: Take space from lvol to another

Nejad,
You may need to do newfs for reducing /u09.
Mousa55
Super Advisor

Re: Take space from lvol to another

Hi
i am reducing the lvol9, all step applaying is Successfully
except
#extendfs -F vxfs /dev/vg01/lvol9 after this command appeared this message
vxfs extendfs: Only expansion allowed #mount /dev/vg01/lvol9 /u09 and after applay this command appearing this message
vxfs mount: /dev/vg01/lvol9 is corrupted. needs checking
how to solve this problem and if i need to do new filesystem i don't need to remove the last
thanks

Mousa55
Super Advisor

Re: Take space from lvol to another

Hi
i am using this command but the problem is still
#fsck -F vxfs -o full /dev/vg01/lvol9
file system is larger than device
vxfs fsck: cannot initialize aggregate
file system check failure, aborting ...
Aashique
Honored Contributor

Re: Take space from lvol to another

Hi,
if you have onlile JFS installed then use the command:

reduce /u09..prev size 92GB.. reduced to 62 GB
============================================================

fsadm -F vxfs -e /u09
fsadm -F vxfs -b 65011712 /u09
lvreduce -L 63488 /dev/vg01/lvol9


Increase /u08 to 30GB--prev 70GB so new 100GB
=============================================

lvextend -L 10000 /dev/vg01/lvol8

fsadm -b 104857600 /u08


Thanks & Regards

Aashique
Mousa55
Super Advisor

Re: Take space from lvol to another

Hi
I am reducing the lvol9 and extend the lvol8 successfully except the filesystem
Of lvol9 is corrupted and I canâ t mount the /u09.
see the output of this command
#mount /dev/vg01/lvol9 /u09
vxfs mount: /dev/vg01/lvol9 is corrupted. needs checking
#extendfs -F vxfs /dev/vg01/lvol9
vxfs extendfs: Only expansion allowed.
#fsck -F vxfs -o full /dev/vg01/lvol9
file system is larger than device
vxfs fsck: cannot initialize aggregate
file system check failure, aborting ...

thanks
Shrikant Lavhate
Esteemed Contributor

Re: Take space from lvol to another

Hi Nejad,

>>#mount /dev/vg01/lvol9 /u09
vxfs mount: /dev/vg01/lvol9 is corrupted. needs checking

For this you need to create new FS on lvol9. As you have already backed up data of lvol during lvreduce so you can go ahead with newfs on it. Use :
#newfs -F vxfs /dev/vg01/rlol9



>>#extendfs -F vxfs /dev/vg01/lvol9
vxfs extendfs: Only expansion allowed.

Reference to my command list given above there is no need of extendfs for lvol9 as you have reduced lvol. So this command totally irrelevant in this context and should not be runned. Anyways as you are creating new FS suggested as above so no need to worry about this thing now.

-=ShRi=-
Will it remain a personal, if I broadcast it here!
Aashique
Honored Contributor

Re: Take space from lvol to another

Hi,
If you want to large files support use this:

#newfs -F vxfs -o largefiles /dev/vg01/rlol9


Thanks & Regards

Aashique
Mousa55
Super Advisor

Re: Take space from lvol to another

Hi
i am applay this command and then it the filesystem is working
#newfs -F vxfs -o largefiles /dev/vg01/rlvol9
version 4 layout
41189376 sectors, 5148672 blocks of size 8192, log size 256 blocks
unlimited inodes, largefiles supported
5148672 data blocks, 5148192 free data blocks
158 allocation units of 32768 blocks, 32768 data blocks
last allocation unit has 4096 data blocks
#mount /dev/vg01/lvol9 /u09
#bdf
/dev/vg01/lvol9 41189376 3536 40864088 0% /u09
but i am lost all data
thanks for all