Operating System - HP-UX
1844876 Members
2135 Online
110233 Solutions
New Discussion

Re: I want to know how to decrease the filesystem size

 
Santhikumari
Advisor

I want to know how to decrease the filesystem size

Hi,

I am new to this field. I want to know the how to decrease the /var filesystem. and how to move the files from /var to another.
13 REPLIES 13
Dennis Handly
Acclaimed Contributor

Re: I want to know how to decrease the filesystem size

You want to remove/move files so there is more space? Or do you want to reduce the size of the whole filesystem? (You only have 614 Mb.)

You can't move files if they are needed in single user mode.
Otherwise you can move them and leave symlinks pointing to the new location.
Santhikumari
Advisor

Re: I want to know how to decrease the filesystem size

which command is used for reducing the size of the filesystem?
Suraj K Sankari
Honored Contributor

Re: I want to know how to decrease the filesystem size

Hi,

lvreduce is the command to Reduce logical volume

Suraj

Re: I want to know how to decrease the filesystem size

Suraj,

*Please* be careful when giving this sort of advice... yes lvreduce will reduce the size of a logical volume, but if it is done before the filesystem on the logical volume has been reduced it will completely corrupt the filesystem.

Santhikumari,

How you reduce the size of a filesystem depends on whether or not you have Online JFS installed or not. If you do, you can reduce the size of the filesystem online, if you don't you'll need to go to single user mode via a reboot to accomplish this.

Check what the output of the command:

swlist | grep -i jfs

returns - hopefully it will mention the OnlineJFS product.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Santhikumari
Advisor

Re: I want to know how to decrease the filesystem size

Hi duncan,

I dont have the root access. So that command is not working in the usermode.Please help me regarding this.

Re: I want to know how to decrease the filesystem size

Santhikumari

>> I dont have the root access.

Then there is no point in proceeding - you cannot carry out system administration tasks such as extending/reducing filesystems without root access. Are you not the system adminsitrator for this server? If you aren't, why don't you ask the actual sysadmin to reduce the filesystem size for you?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Wim Rombauts
Honored Contributor

Re: I want to know how to decrease the filesystem size

If you don't have root access, forget it.
Only root can manage filesystems, so :
- Get root access, or find someone who has and wants to help you.
- What type of filesystem is it ? HFS ? Or VxFS ? If it is HFS, you can't reduce your filesystem. You well need to create a new smaller filesystem, copy over the data and witch the mountpoint.
- If it is VxFS, check if you have Online-JFS. If not, you will have to reboot your system to single-user mode.
- If you have Online-JFS, look at fsadm (manpage fsadm_vxfs). fsadm -F vxfs -b should help you.

Be aware that shrinking a filesystem is not always possible.
After the filesystem has been shrinked, carefully reduce the LVM with lvreduce, but don't set it smaller as the new filesystem size, or you will indeed have a corrupted filesystem.
Santhikumari
Advisor

Re: I want to know how to decrease the filesystem size

Hi,

I am taking KT. My senior is on leave. I got the error from that. It is very important server. So there is any way to reduce the size of the FS.
Santhikumari
Advisor

Re: I want to know how to decrease the filesystem size

Hi rombauts,

/var (/dev/vg00/lvol8 ) : vxfs.

I got the above output fron "df -n".


Re: I want to know how to decrease the filesystem size

>> So there is any way to reduce the size of the FS.

Not without root access. If you don't have it, you can't do it.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Santhikumari
Advisor

Re: I want to know how to decrease the filesystem size

Thanks to all.

I will inform to my senior regarding this error. But I want to know the procedure. Please Could you give me the details of this.
Dennis Handly
Acclaimed Contributor

Re: I want to know how to decrease the filesystem size

>I got the error from that. It is very important server. So there is any way to reduce the size of the FS.

Do you have the exact error message? It may help us determine what you really want.

I typically never hear anyone say make /var smaller, only bigger.
See my first reply.
And if you can't make it bigger, you can try to reduce or move the files.
prasadb
Super Advisor

Re: I want to know how to decrease the filesystem size

HELLO Santhikumari

KEEP ASSIGNING POINTS TO THOSE WHO SPEND THEIR VALUABLE TIME FOR YOU