- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- reduce file system
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
12-20-2001 07:44 AM
12-20-2001 07:44 AM
reduce file system
/dev/vg01/lvol8 430080 38287 367363 9% /etc/opt/activation
reduce in :
/dev/vg01/lvol8 40960 38191 2653 94% /etc/opt/activation
reduce of 430mb in 40M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 07:52 AM
12-20-2001 07:52 AM
Re: reduce file system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 07:53 AM
12-20-2001 07:53 AM
Re: reduce file system
Are you concerned with the reduction in the amount of data? If so, that is part of the risk of reducing a file system. When you reduce you are at risk of losing data.
The most risk free way to reduce an LV is to back it up (a couple of times), remove the LV, recreate the LV and then restore your data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 07:53 AM
12-20-2001 07:53 AM
Re: reduce file system
HI,
To reduce the size of the logical volume:
lvreduce -L
-USA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 08:05 AM
12-20-2001 08:05 AM
Re: reduce file system
, only with lvreduce?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 08:13 AM
12-20-2001 08:13 AM
Re: reduce file system
I see 38MB of data on this file system. It's better to take a backup of it before you attempt to reduce the file system.
You can do it safely if you have OnlineJFS. If you don't, I insist you to take the backup, unmount the file system, use lvreduce and mount the file system back.
Online JFS,
1. Take backup
2. #fsadm -b 40960 /etc/opt/activation
Without onlineJFS
1. Take backup
2. Umount /dev/vg01/lvol8
3. lvreduce -L 40 /dev/vg01/lvol8
4. fsck /dev/vg01/lvol8
4. mount /dev/vg01/lvol8 /etc/opt/activation
5. Restore the data (if the data is corrupted)
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 08:16 AM
12-20-2001 08:16 AM
Re: reduce file system
I would recommend you to backup your file system before you reduce it ! Then lvreduce it. Do an fsck after reducing the file system for any possible errors.
# lvreduce -L new_size lvname.
SW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 09:08 AM
12-20-2001 09:08 AM
Re: reduce file system
sgc1 # lvreduce -L 70 /dev/vg01/lvol8
execute all steps:
Warning: rounding up logical volume size to extent boundary at size "72" 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;
do you really want the command to proceed (y/n) : y
Logical volume "/dev/vg01/lvol8" has been successfully reduced.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
sgc1 # fsck /dev/vg01/lvol8
file system is clean - log replay is not required
sgc1 # mount /dev/vg01/lvol8
but cradled I do bdf, I continue seeing 430 Ms in the file system:
so that the modification is not updated?
sgc1 # bdf
/dev/vg01/lvol8 430080 38287 367363 9% /etc/opt/activation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 09:22 AM
12-20-2001 09:22 AM
Re: reduce file system
what is the output of lvdisplay ?
Normally it's a problem while extending file systems and if not doing an extendfs after lvextend.
Some info:
http://us-support2.external.hp.com/cki/bin/doc.pl/sid=cf6e503a1ba845b77b/screen=ckiDisplayDocument?docId=200000009933331
SW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 10:25 AM
12-20-2001 10:25 AM
Re: reduce file system
Can you please attach lvdisplay /dev/vg01/lvol8?.
Also try unmount and mount again.
Do you have recent LVM patches?.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2001 10:53 AM
12-20-2001 10:53 AM
Re: reduce file system
If you were using Online JFS you could have used the fsadm command. But if using std lvm commands (as it would appear you have) you would need to do the following steps:
1. Backup up the file system
2. Umount the file system
3. Create the new smaller filesystem using newfs command. Indicate the new smaller file system size using the -s size option newfs command.
4. Re-mount file system
5. Restore the backup up file system data to the newly created file system.
That should fix ya,
Rgrds,
Rit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2001 10:50 AM
12-21-2001 10:50 AM
Re: reduce file system
You can reduce the filesystem with the fsadm command. To reduce your files system to 70MB, all you had to do was run the command
fsadm -b 143360 /etc/opt/activation
(The fsadm uses blocks. 1 MB = 2048 blocks, 70MB * 2048 = 143360 blocks).
Try running the fsadm command above. If you get an error message. Then try putting back your old Logical Volume Information back in. (Look in /etc/lvmconf/vg01.conf ) And run
lvextend -l 105 /dev/vg01/lvol8
(105 is your old extends of 420MB/4. There are 4MB per each extends. It is preferable to work with extends than with MB) Run the lvdisplay /dev/vg01/lvol8 to view the current extends.
If you did not modify this filesystem yet you should be able to restore. Then run the
fsadm -b 143360 /etc/opt/activation
If all else fails. Then you will need to follow the suggestions of the othe posters. Create an new small 70MB or 40MB partition, copy your data there and erase your old large partition.
Don't forgot back, back, and backup!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2001 02:13 PM
12-21-2001 02:13 PM
Re: reduce file system
since I do not know wether you have the "Online JFS/Advanced VxFS" installed and since you are only talking about a few MB:
- backup those few MB, perhaps just a simple "tar" to another filesystem
- unmount the filesystem to be reduced
- use "lvreduce" to shrink it as much as you want
- use "mkfs" to create a new filesystem on it
- mount it again, perhaps simply with "mount -a"
- untar the backup back to that filesystem
Estimated amount of time: 5minutes!
Good luck and merry X-mas!
Wodisc