Operating System - HP-UX
1834570 Members
3894 Online
110069 Solutions
New Discussion

Reduced Mirrored FileSystem

 
Cliff Lim Kok Hwee
Regular Advisor

Reduced Mirrored FileSystem

Gd Day Forum,

I need to reduce the filesystem size of the current mirrored filesystem /mnt/data04 to 4GB

/dev/vg02/lvol4 8192000 873590 6861014 11% /mnt/data04

lvdisplay -v /dev/vg02/lvol4 |more
--- Logical volumes ---
LV Name /dev/vg02/lvol4
VG Name /dev/vg02
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 8000
Current LE 2000
Allocated PE 4000
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t0d0 2000 2000
/dev/dsk/c3t0d0 2000 2000

I will be performing the following steps,

#fsadm -d -e -D -E /mnt/data04
#fsadm -b 4194304 -v vxfs /mnt/data04
#lvreduce -L 4096 /dev/vg02/lvol6

Will it be ok and the mirrored copy will also be taken care of?

thanks n regards/cliff
6 REPLIES 6
Sunil Sharma_1
Honored Contributor

Re: Reduced Mirrored FileSystem

Your steps are perfectly alright.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Cliff Lim Kok Hwee
Regular Advisor

Re: Reduced Mirrored FileSystem

Guys,

Online filesystem reduction using fsadm will incur certain amount of data corruption risk?

Is it beter to perform a backup and restore of data to a reduced filesystem instead?

Advises to this is appreciated.

regards/cliff
Robert-Jan Goossens
Honored Contributor

Re: Reduced Mirrored FileSystem

Hi Cliff,

Yes it is possible to corrupt your system. If you have space in an other filesystem you could create a copy online.

Close the app using the filesystem /mnt/data04

Create a online or tape backup.

# find /mnt/data04 cpio -pcmudv /copy
fsadm and lvreduce
copy the data back to the orginal filesystem and restart your app.

Best regards,
Robert-Jan
Sunil Sharma_1
Honored Contributor

Re: Reduced Mirrored FileSystem

Hi Cliff,

I never come across problem of data corruption usinif fsadm for safer side you can keep a backup copy.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Kent Ostby
Honored Contributor

Re: Reduced Mirrored FileSystem

Cliff -- Just to answer the last part of your question, yes the mirror will be taken care of as well.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Sridhar Bhaskarla
Honored Contributor

Re: Reduced Mirrored FileSystem

Hi Cliff,

I have reduced it quite a few times using onlineJFS and I didn't have any issues. But 'reducing' is always a risk. So, I suggest you keep a good backup of the filesystem.

In future, you do not have to convert the size into blocks to reduce. fsadm will allow you to specify the space in MB.

fsadm -b 4096m /mnt/data04
lvreduce -L 4096 /dev/vg02/lvol6

Make sure you have atleast 10% free space in that filesystem.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try