1823385 Members
2542 Online
109654 Solutions
New Discussion юеВ

fsadm and lvreduce

 
SOLVED
Go to solution
Dario_4
Frequent Advisor

fsadm and lvreduce

Hi alls,

I have reduced a file system with this command:

# lvreduce -L 8192 /dev/vg01/lv_u01

# lvextend -L 10880 /dev/vg01/lv_oracle

# fsadm -b 10880000 /app/oracle

But, before the lvreduce I forget the fsadm and now I've 2 different size of filesystem.

How to solve it ?

Thanks
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: fsadm and lvreduce

Delete it and recreate it OR run fsadm again with correct size.

When you reduced /dev/vg01/lv_u01, did you have anything on the filesystem worth keeping?


live free or die
harry
Live Free or Die
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: fsadm and lvreduce

Because it is possible (and even probable) that your lv_oracle LVOL is using extents that once belonged to the u01 filesystem, I suspect that the only safe option is to restore from backup. Even if you used fsadm to reduce the filesystem, you really have no way to know that all the data is intact.
If it ain't broke, I can fix that.
Dietmar Konermann
Honored Contributor

Re: fsadm and lvreduce

Hi!

So your freshly extented /app/oracle on /dev/vg01/lv_oracle now uses physical extents that were fomerly assigned to /dev/vg01/lv_u01?

In this case, to exclude any possible curruption, I would recommend to recreate the filesystem in /dev/vg01/lv_u01 using newfs. You may try to backup as much data as possible from it before...

Regards...
Dietmar.

"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
James R. Ferguson
Acclaimed Contributor

Re: fsadm and lvreduce

Hi:

In addition to the advice already received, remember that when using 'fsadm -b' to resize a filesystem, the value of a 1K block is 1024, not 1000 as suggested by your posting.

Thus, instead of:

# lvextend -L 10880 /dev/vg01/lv_oracle
# fsadm -b 10880000 /app/oracle

...you should have:

# lvextend -L 10880 /dev/vg01/lv_oracle
# fsadm -b 11141120 /app/oracle

Regards!

...JRF...
Dario_4
Frequent Advisor

Re: fsadm and lvreduce

Unfortunatly, I have lost my data in the filesystem..(probabily because lvreduce take random PV for reducing lv and not only free one)
May be, now, with newfs of lv_u01 and oracle export is possibile to running up the fs.

Thanks to all.