decrease the size of an lvm

 
SOLVED
Go to solution
RobertCarback
Frequent Advisor

decrease the size of an lvm

HP-UX 11.23 IA64

I have 3 lvms mounted ---

lvmA has filesystem - /fsA
lvmAa has filesystem - /fsA/a
lvmAb has filesystem - /fsA/b

If I remove lvmA and /fsA (not the directory, just the fs) will it affect lvmAa(/fsA/a) and/or lvmAb(/fsA/b) ?
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: decrease the size of an lvm

No, not if I understand you correctly.


Pete

Pete
Solution

Re: decrease the size of an lvm

Robert,

You would have to :

a) Run a backup (I hope before doing this sort of thing!)
b) Use umount to unmount all 3 filesystems
c) use lvremove to get rid of lvmA
d) Use mkdir to create the mount points /fsA/a and fsA/b, which won't be there any more (they were in the filesystem you've gotten rid of)
e) Use mount to mount up the 2 remaining filesystems.

So it will affect the filesystems in the you'll need to unmount/mount them, but their contents will be unchanged.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Geoff Wild
Honored Contributor

Re: decrease the size of an lvm

Sort of...

You will have to unmount /fsA/a and /fsA/b, then /fsA

lvremove lvmA and update fstab.

Then mkdir /fsA/a and /fsA/b, then remount those 2 file systems....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Tim Nelson
Honored Contributor

Re: decrease the size of an lvm

If I understand this correctly.

/fsA is a parent of /fsA/a and /fsA/b

They all have to be unmounted in order to unmount /fsA

If you want to remove filesystem lvmA then you will have to create the mount points of /fsA/a and /fsA/b in order to remount those. The data in lvmAa and lvmBb will not be effected as you are only removing lvmA.

Filesystems are independant of each other but the mount points in your case are not. They are dependant and the parent.

RobertCarback
Frequent Advisor

Re: decrease the size of an lvm

thanks