- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Reducing size of logical volume
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
04-26-2002 07:42 AM
04-26-2002 07:42 AM
Here is the output of the bdf:
/dev/vg06/lv_u18 10240000 2362464 7631398 24% /mss
/dev/vg06/lv_u17 10240000 1050932 8901964 11% /home
This is what I am going to do:
1. Ensure no-one is using the filesystem (fuser or lsof)
2. backup data
3. vgcfgbackup /dev/vg06
4. umount /dev/vg06/lv_u17
5. umount /dev/vg06/lv_u18
6. lvreduce -L size /dev/vg06/lv_u17
7. lvreduce -L size /dev/vg06/lv_u18
8. newfs -F vxfs /dev/vg_06/rlv_u17
9. newfs -F vxfs /dev/vg_06/rlv_u18
10. fsck /dev/vg_06/lv_u17
11. fsck /dev/vg_06/lv_u18
12. mount /dev/vg_06/lv_u17 /home
13. mount /dev/vg_06/lv_u18 /mss
14. vgchange -a n vg06
15. vgcfgrestore ???n /dev/vg06 ???l /dev/rdsk/c9t1d0
Did I miss anything? Thank you for any comments.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 07:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 07:53 AM
04-26-2002 07:53 AM
Re: Reducing size of logical volume
No, you haven't missed anything. In fact you've got a few extra steps:
3. Will get done anyway when you do lvreduce.
10 and 11 aren't required.
14. Isn't required and won't work anyway as the VG is in use.
15. Definitely isn't required.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 07:53 AM
04-26-2002 07:53 AM
Re: Reducing size of logical volume
I see some problems here:
1) why using vg_06 with newfs ?
2) what is vg_06 ? is it another VG ?
3) why using vgcfgrestore ?
4) As you are recreating the file systems, why don't you consider lvremove and then lvcreate ?
I would do the following:
1) Backup data of both file systems
2) Unmount both (umount)
3) lvremove both file systems
4) Create new filesystems with same name and new(reduced) size - lvcreate
5) newfs both file systems
6) mount both
7) restore data from backup
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 07:53 AM
04-26-2002 07:53 AM
Re: Reducing size of logical volume
Aside from specifying size parameter (which I assume you skipped for brevity), you do not need to 'fsck' your new filesystems (steps 10-11) nor do you need to make the volume unavailable (step-14) and you do *not* want to restore the old LVM information (step-15).
You probably meant step-15 to be 'vgcfgbackup', but this is automatically the default during LVM maintenance, so it is probably superflous. See the man pages for 'lvreduce', for instance.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 07:54 AM
04-26-2002 07:54 AM
Re: Reducing size of logical volume
Sandip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 07:55 AM
04-26-2002 07:55 AM
Re: Reducing size of logical volume
Step 1 & 2 OK
3. vgcfgbackup /dev/vg06
==> Check /etc/lvmconf/vg06.conf
Step 4,5,6,7,8 & 9 OK
Step 10 & 11 (the fsck), in my opinion is not necessary because you're newfs'ing those FS.
I assume typo error here "vg_06"
Step 12 & 13 OK (typo ?)
Step 14 & 15 not needed since you're not replacing the PV.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 08:00 AM
04-26-2002 08:00 AM
Re: Reducing size of logical volume
You don't need couple steps 3,10,11.
I think you have miss type vg_06 on step 12 & 13.
Step 14 is not require and it is at worng place it will not work because you have already mount it.
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 08:06 AM
04-26-2002 08:06 AM
Re: Reducing size of logical volume
And if you have online-JFS you could do alternatively:
-> bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 307200 45286 245548 16% /
/dev/vg00/lvol1 199381 47039 132403 26% /stand
/dev/vg00/lvol7 2048000 111154 1815936 6% /var
/dev/vg00/lvol8 2048000 1606 1918502 0% /var/adm/crash
/dev/vg00/lvol6 1536000 760116 727395 51% /usr
/dev/vg00/lvol5 500000 1402 467500 0% /tmp
/dev/vg00/lvol9 2527232 659962 1750576 27% /opt
/dev/vg00/lvol4 512000 4473 475866 1% /home
/dev/vg00/lvol10 352256 1189 329133 0% /sm
/dev/vg00/lvol11 1024000 1357 958735 0% /tmp2
-> fsadm -b 250000 /home
fsadm: /etc/default/fs is used for determining the file system type
vxfs fsadm: /dev/vg00/rlvol4 is currently 512000 sectors - size will be reduced
vxfs fsadm: allocations found in shrink range, moving data
-> lvreduce -L 252 /dev/vg00/lvol4
When a logical volume is reduced useful data might get lost;
do you really want the command to proceed (y/n) : y
Logical volume "/dev/vg00/lvol4" has been successfully reduced.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
-> bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 307200 45286 245548 16% /
/dev/vg00/lvol1 199381 47039 132403 26% /stand
/dev/vg00/lvol7 2048000 111156 1815934 6% /var
/dev/vg00/lvol8 2048000 1606 1918502 0% /var/adm/crash
/dev/vg00/lvol6 1536000 760116 727395 51% /usr
/dev/vg00/lvol5 500000 1402 467500 0% /tmp
/dev/vg00/lvol9 2527232 659962 1750576 27% /opt
/dev/vg00/lvol4 250000 4409 230300 2% /home
/dev/vg00/lvol10 352256 1189 329133 0% /sm
/dev/vg00/lvol11 1024000 1357 958735 0% /tmp2
->
All the best
Victor