1834570 Members
3687 Online
110069 Solutions
New Discussion

online Jfs and lvreduce

 
Abhijeet_8
New Member

online Jfs and lvreduce

Hi All,

It's my first day and first question in forum. i am a Solaris admin.

I have a Hp Server running on HPUX 11.11 with online JFS installed. This file system size is 10Gb and 2 Gb is used. I want to reduce it to 3 Gb.

How should i do it ? is it must to have a backup ? if yes why ?

Thanks
Abhi
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: online Jfs and lvreduce

It is ALWAYS a must to have a backup. If you don't have it something will happen and you'll need it.

I have always preferred backing up the data, blowing away the LV, recreating it the size you want and then restoring the data.

You should, though, be able to use fsadm and lvreduce, in that order, to reduce the size of the LV.

But ABSOLUTELY make a backup just in case something bad happens to your data.
Abhijeet_8
New Member

Re: online Jfs and lvreduce

Patric,

it's a day to day job for me in SUN servers using veritas commands.

Is there something in HP which increase risk fector ?

Abhi
Hoang Chi Cong_1
Honored Contributor

Re: online Jfs and lvreduce

Hi Abhi

Could you show us which filesystem do you want to reduce? (dev/vgXX/lvXX)
As Patrik said and as my experience, if you reduce one filesystem, *ALWAYS* backup that file system.
You can backup it to a tape or to any filesystem that enough free (As you said the size of that filesystem is 2GB) with fbackup or tar command.
I am not a Solaris admin but I have studied about Solaris, the command is not difference far a way with HP-UX command.

With OnlineJFS you can try to reduce the FS using fsadm specifying the new size in KB.
# lvreduce -L /dev/vgXX/lvXX
Then:
# fsadm -F vxfs -b

Goodluck to you
HoangChiCong
Looking for a special chance.......
Ravi_8
Honored Contributor

Re: online Jfs and lvreduce


Hi

while in solaris also, while reducing the file system size, you need a backup.

simlarly in HP also, you need a backup and use the fsadmin to reduce the file system size, later if you found data loss, always you can restore from backup
never give up
Abhijeet_8
New Member

Re: online Jfs and lvreduce

Hi,

In solaris i use vxassist command to resize file system and volumes in single command.

I know that command is part of Veritas volume manager.

Sunil
abhijeet_7
Advisor

Re: online Jfs and lvreduce

Hello Abhi,

Till last month i was working on HP_UX11i..now i am working on sun-solaris 8.

Online JFS (ver 3.3) is a very good product
that can help you in Fast File system recovery,Online resizing,Degragmanting,&online backups.

I would recommend to take backup using tar or
fbackup ,whichever suits you[i would prefer 'fbackup'] & then go for reducing file system.The online JFS includes
a file system snapshot capability,which makes it possible to back up a file system,even if files & directories are being modified.
To minimize the chance of data loss,one must have a backup ready.

two Q's one must ask ourself:
a.How often do the contents of the file change?
b.How critical is the content of the file?

depending on answers you get,you can decide about taking backup.

For ur query, you can do this
1. lvreduce -L /dev/vgxx/myfs
2. lvdisplay -v /dev/vgxx/myfs
3. fsadm -F vxfs -b /myfs

pls read "$ man fsadm" before using it.Its a very good utility to recognize ,consolidate file extents,free extents & directories to ensure optimal file system performance.

you can defrag & "fsck" if you wish to check
integrity of the reduced file system.

being online jfs,"fsck" won't take much time
to complete file system check .
e.g

# fsck -F vxfs /dev/vgxx/rmyfs
"file system is clean-log replay is not required"

defrag is optional...


Hope it helps
ABHI K
we work, to become...not acquire