HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Decrease the size of a logical volume without ...
Operating System - Linux
1832009
Members
2932
Online
110034
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 10:50 AM
02-04-2002 10:50 AM
Decrease the size of a logical volume without data loss
Hi everyone
I have a HP workstation running on HP-UX 10.x. I have a problem with reducing
the size of logical volumes. I created a volume group using one of the hard
disks . I got a new hard disk and assigned it to the same volume group as that
of the former. I increased the size of my logical volumes mounted on /home and
/usr to use the new hard disk. I want to revert back these changes i.e I want
to remove the physical extents of the new physical volume(new hard disk)
alloted to the logical volumes mounted on /home and /usr. In short I want
/home and /usr to be confined to my old hard disk. Is it possible to do it
without any data loss as this is a big requirement for me. Could you please
explain the steps in detail on how to go about doing this?
regards
chandrasekar
I have a HP workstation running on HP-UX 10.x. I have a problem with reducing
the size of logical volumes. I created a volume group using one of the hard
disks . I got a new hard disk and assigned it to the same volume group as that
of the former. I increased the size of my logical volumes mounted on /home and
/usr to use the new hard disk. I want to revert back these changes i.e I want
to remove the physical extents of the new physical volume(new hard disk)
alloted to the logical volumes mounted on /home and /usr. In short I want
/home and /usr to be confined to my old hard disk. Is it possible to do it
without any data loss as this is a big requirement for me. Could you please
explain the steps in detail on how to go about doing this?
regards
chandrasekar
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 06:24 AM
02-07-2002 06:24 AM
Re: Decrease the size of a logical volume without data loss
Two options,
(1) make a "make_recovery -Avi" tape - this only backs up vg00, so for other vg's you need to use another type of backup!
(2) see 1 - when doing the recovery, interactively change the sizes and locations of the filesystems.
live free or die
harry
(1) make a "make_recovery -Avi" tape - this only backs up vg00, so for other vg's you need to use another type of backup!
(2) see 1 - when doing the recovery, interactively change the sizes and locations of the filesystems.
live free or die
harry
Live Free or Die
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 06:24 AM
02-07-2002 06:24 AM
Re: Decrease the size of a logical volume without data loss
Two options,
(1) make a "make_recovery -Avi" tape - this only backs up vg00, so for other vg's you need to use another type of backup!
(2) see 1 - when doing the recovery, interactively change the sizes and locations of the filesystems.
live free or die
harry
PS: Don't forget to assign points to your posts!
(1) make a "make_recovery -Avi" tape - this only backs up vg00, so for other vg's you need to use another type of backup!
(2) see 1 - when doing the recovery, interactively change the sizes and locations of the filesystems.
live free or die
harry
PS: Don't forget to assign points to your posts!
Live Free or Die
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2002 02:03 PM
02-08-2002 02:03 PM
Re: Decrease the size of a logical volume without data loss
Hello,
Don't forget that this discussion forum is dedicated to Linux.
Let's talk about your problem. If you are not at ease with LVM, I would recommend the "make_recovery", as it seems to be the safest method.
However, I would personnally do it another way :
* Boot single-user mode.
* mount -a
* lvcreate -L "desired_home_size" vg00
(let's suppose the automagically assigned name is lvol9)
* lvcreate -L "desired_usr_size" vg00
(let's suppose the automagically assigned name is lvol10)
* newfs /dev/vg00/rlvol9
* newfs /dev/vg00/rlvol10
* mkdir /newhome
* mkdir /newusr
* mount /dev/vg00/lvol9 /newhome
* mount /dev/vg00/lvol10 /newusr
* mount -oremount,ro /home
* mount -oremount,ro /usr
* cd /home
* find . -print | cpio -pdvmux /newhome
* cd /usr
* find . -print | cpio -pdvmux /newusr
* umount /newusr
* umount /newhome
* Edit /etc/fstab to make /home mounted as /dev/vg00/lvol9 and /usr mounted as /dev/vg00/lvol10
* umount /home
* umount /usr
* mount /home
* mount /usr
AT THIS POINT, it would probably be a good idea to reboot the system in normal mode, to make sure that everything is OK.
* Reboot again in single-user mode
* mount -a
* lvremove /dev/vg00/lvolX (lvolX is the lvol that corresponds to the old /home)
* lvremote /dev/vg00/lvolY (lvolY is the lvol that corresponds to the old /usr)
* pvmove source_physical_vol dest_physical_vol (source is the disk you want to get rid of, destination is the disk you want to keep !)
* vgreduce vg00
* Reboot
OF COURSE, DO THIS AT YOUR OWN RISK !
Read and re-read and re-re-read this procedure to make sure you agree with all the steps suggested, before doing anything.
Good luck :-)
Kodjo
Don't forget that this discussion forum is dedicated to Linux.
Let's talk about your problem. If you are not at ease with LVM, I would recommend the "make_recovery", as it seems to be the safest method.
However, I would personnally do it another way :
* Boot single-user mode.
* mount -a
* lvcreate -L "desired_home_size" vg00
(let's suppose the automagically assigned name is lvol9)
* lvcreate -L "desired_usr_size" vg00
(let's suppose the automagically assigned name is lvol10)
* newfs /dev/vg00/rlvol9
* newfs /dev/vg00/rlvol10
* mkdir /newhome
* mkdir /newusr
* mount /dev/vg00/lvol9 /newhome
* mount /dev/vg00/lvol10 /newusr
* mount -oremount,ro /home
* mount -oremount,ro /usr
* cd /home
* find . -print | cpio -pdvmux /newhome
* cd /usr
* find . -print | cpio -pdvmux /newusr
* umount /newusr
* umount /newhome
* Edit /etc/fstab to make /home mounted as /dev/vg00/lvol9 and /usr mounted as /dev/vg00/lvol10
* umount /home
* umount /usr
* mount /home
* mount /usr
AT THIS POINT, it would probably be a good idea to reboot the system in normal mode, to make sure that everything is OK.
* Reboot again in single-user mode
* mount -a
* lvremove /dev/vg00/lvolX (lvolX is the lvol that corresponds to the old /home)
* lvremote /dev/vg00/lvolY (lvolY is the lvol that corresponds to the old /usr)
* pvmove source_physical_vol dest_physical_vol (source is the disk you want to get rid of, destination is the disk you want to keep !)
* vgreduce vg00
* Reboot
OF COURSE, DO THIS AT YOUR OWN RISK !
Read and re-read and re-re-read this procedure to make sure you agree with all the steps suggested, before doing anything.
Good luck :-)
Kodjo
Learn and explain...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP