- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Decrease the size of a logical volume without ...
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
02-04-2002 10:52 AM
02-04-2002 10:52 AM
Decrease the size of a logical volume without data loss
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 11:01 AM
02-04-2002 11:01 AM
Re: Decrease the size of a logical volume without data loss
/home1 the size you wish to have, make the file system and directory and mount the filesystem as /home1
Then copy the data from /home to /home1
cd /home
tar cvf - . | (cd /home1; tar xvpf - )
Once this is complete I would umount /home
Rename /home1 as /home and remount it.
There are sure to be other ways, possible lvreduce but you would not lose any data this way.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 11:06 AM
02-04-2002 11:06 AM
Re: Decrease the size of a logical volume without data loss
The safest bet is to back up your FileSystems, then remove them, recreate them the way you want, and restore your FS's.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 11:10 AM
02-04-2002 11:10 AM
Re: Decrease the size of a logical volume without data loss
If this is not possible you will have to backup up your directories. umount the filesystems. remove the logical volumes from the volume group. re-create the logical volumes with the correct size. create new filesystem. mount filesystem. restore data from backup.
Simply put lvreduce will corrupt your filesystem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 11:16 AM
02-04-2002 11:16 AM
Re: Decrease the size of a logical volume without data loss
The problem I have is that I dont have space left in my old hard disk to create a new logical volume.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 11:32 AM
02-04-2002 11:32 AM
Re: Decrease the size of a logical volume without data loss
If you are sure all enters on one disk, then try Ignite-UX => do a make_recovery of all vg00, then boot from the tape and reinstall using make_recovery's interractive menus to give the new sizes you want...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 11:37 AM
02-04-2002 11:37 AM
Re: Decrease the size of a logical volume without data loss
nancy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 11:52 AM
02-04-2002 11:52 AM
Re: Decrease the size of a logical volume without data loss
I presume that you expanded your filesystem (via 'extendfs' or 'fsadm') after enlarging the logical volume (via 'lvextend').
If this is the case, then if you have Online JFS, you *might* be successful dynamically shrinking the filesystem (via 'fsadm'), and then doing an 'lvreduce'.
If you do not have Online JFS, and you have enlarged the filesystem with 'extendfs', then to shrink it, you *must* backup the filesystem; 'lvreduce', 'newfs'; and restore your data.
*IF* you *only* went as far as the 'lvextend', but never did an 'extendfs' on the filesystem, then you should be able to 'lvreduce' the extents without needing to restore the filesystem.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:41 PM
02-04-2002 06:41 PM
Re: Decrease the size of a logical volume without data loss
Thanks for the help. It seems to work fine for /home directory. But now Iam faced with a bigger problem.I made a backup of my /usr in /opt which was the only directory which had space in it. Then I turned to single user mode to unmount /usr directory. But when I want to copy (i.e. move since no /usr is there) the directory back to /usr, the directory tree under /opt is not visible in single -user mode. How do I go abt doing this?
Thanks in advance
regards
chandrasekar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:50 PM
02-04-2002 06:50 PM
Re: Decrease the size of a logical volume without data loss
# mount /opt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:55 PM
02-04-2002 06:55 PM
Re: Decrease the size of a logical volume without data loss
Thanks for the info. But I tried to exit out of single user mode by pressing run-level 3, which I think is multi-user mode. System hangs now.How do I get back again in single user mode to do the changes you have suggested me.Iam a novice to this field.Bail me out
regards
chandrasekar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 07:51 PM
02-04-2002 07:51 PM
Re: Decrease the size of a logical volume without data loss
When you are in single user mode, you can
mount whatever filesystem you like. From
where you stand now, you need to reboot
your system back into single user mode, before
proceeding further. By default /opt is
not mounted in single user mode. You can
mount as suggested by Patrick.
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 08:24 PM
02-04-2002 08:24 PM
Re: Decrease the size of a logical volume without data loss
I got to single user mode and tried to move the files from /opt/usr1 to my original /usr directory as the cp doesnot work. I gave this logical volume the original size which I gave earlier when it occupied single hard disk. But now it is not able to copy all the files. It says the file system is full.
This is the foll which I did in single user mode
i) umount /usr
ii) lvremove -f /dev/vgoo/lvol8
iii) lvcreate -s n -n lvol8 vg00
iv) lvextend -L 1128 /dev/vg00/lvol8 /dev/dsk/c0t6d0 (original hard disk)
v) newfs -F hfs /dev/vg00/rlvol8
vi) mount /usr
vii) mv /opt/usr1/* /usr
I have a big problem with the mv command as it had split the files between /usr and /opt/usr1 due to incompletion. Can someone explain why am I not able to copy to a logical volume mounted on /usr which was existend before.
I checked out the details of the physical volume. It says it occupies all the extents.
Please mail me asap as I have to make this system ready by tommorrrow. thanks in advance
regards
chandrasekar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 09:27 PM
02-04-2002 09:27 PM
Re: Decrease the size of a logical volume without data loss
My problems seem to accrue like anything. I tried rebooting the system .Now it gives me an error
"INIT:single user mode"
crt0:Error couldnt open /usr/lib/dld.sl errno:000000002
This messages goes in a loop and Iam unable to go to the command prompt.
I think I wud be fine with having the /usr on two hard disk then to update the HP-UX OS which I cant afford doing it
Please Could someone tell me what shud I do abt this?
regards
chandrasekar