<div dir="ltr"><div><div>Hi,</div><div><br></div><div> I tried to reduce the VG and this is
    what it looked like before I tried to reduce it <br>
    <br>
    Filesystem                       Size  Used Avail   Use% Mounted on<br>
    /dev/mapper/vg0-data         2.2T  1.7T  433G  80%  /data</div><div><br></div><div>Out of the available <b>433G</b> I wanted to reduce <b>100G</b> in vg0 so that I
    could use it for a new partition and this is what I did ..<br>
    <br><b>
    e2fsck -f /dev/vg0/data<br>
    resize2fs /dev/vg0/data 100G<br>
    lvreduce -L -100G -n /dev/vg0/data</b></div><div><br></div><div>lvs</div><div>  LV   VG   Attr   LSize Origin Snap%  Move Log Copy%  Convert</div><div>  data vg0  -wi-ao 2.08T                                      </div>
</div><div><br></div><div>after the lvreduce it did what I intended to as you can see in <br>
    <br>
    vgs<br>
      VG   #PV #LV #SN Attr   VSize VFree  <br>
      vg0    1   1   0 wz--n- 2.18T <b>100.00G</b>   ( it did allocate the
    100.00G as free space )</div><div><div><div><br></div></div><div>after I mounted /data back , I could even touch a file , however
    when we start the app (mysql) and when it tries to write into the
    existing data in /data , the drive goes into <b>read only mode repeatedly</b> ..</div><div><br></div><div>in order to fix it i unmounted /data and ran </div><div><br></div><div><b>e2fsck -f /dev/vg0/data -n</b></div>
<div><b><br></b></div><div>after the fsck completed it would prompt to fix superblock/inodes which I replied with 'yes' however the problem still persists that if i mount /data it goes into read-only mode .</div><div>
<div><br></div><div>dmsetup table</div><div>vg0-data: 0 4477255680 linear 104:17 384</div></div><div><br></div><div>Red Hat Enterprise Linux Server release 5.7</div><div>2.6.18-274.17.1.el5 #1 SMP  x86_64</div><div>lvm2-2.02.84-6.el5_7.1</div>
<div><br></div><div>I have reduced lvm's with those  sequence of commands in the past but i just dont understand why it seems to have failed this time although i did get 100G free space in vg0 but the partition /data seems useless ..</div>
<div><br></div><div><b> I would greatly appreciate any help/insights .. i notice lvm has created a backup file in /etc/lvm/archive as   <a href="http://vg0_00008-1147866134.vg">vg0_00008-1147866134.vg</a> , does restoring from that file actually work ? will it get the drive into original state ? and how can i actually free some space from the volume group if i want to ?</b></div>
<div><br></div><div><br></div><div>########</div><div>some errors spewed in dmesg</div><div><br></div><div><div>attempt to access beyond end of device</div><div>dm-0: rw=0, want=4654102632, limit=4477255680</div><div>EXT3-fs error (device dm-0): read_block_bitmap: Cannot read block bitmap - block_group = 17145, block_bitmap = 561807360</div>
<div>Aborting journal on device dm-0.</div><div>attempt to access beyond end of device</div><div>dm-0: rw=0, want=4565762056, limit=4477255680</div><div>EXT3-fs error (device dm-0): read_block_bitmap: <2>ext3_abort called.</div>
<div>EXT3-fs error (device dm-0): ext3_journal_start_sb: Detected aborted journal</div><div><br></div><div>Cannot read block bitmap - block_group = 17417, block_bitmap = 570720256</div><div>EXT3-fs error (device dm-0): read_block_bitmap: Cannot read block bitmap - block_group = 17417, block_bitmap = 570720256</div>
<div>dm-0: rw=0, want=4683202568, limit=4477255680</div><div>EXT3-fs error (device dm-0): read_block_bitmap: Cannot read block bitmap - block_group = 17865, block_bitmap = 585400320</div><div><br></div><div>EXT3-fs error (device dm-0) in ext3_free_blocks_sb: Journal has aborted</div>
<div>EXT3-fs error (device dm-0) in ext3_orphan_del: Journal has aborted</div><div>__journal_remove_journal_head: freeing b_committed_data</div><div><br></div><div><br></div><div>ext3_abort called.</div><div>EXT3-fs error (device dm-0): ext3_put_super: Couldn't clean up the journal</div>
<div>kjournald starting.  Commit interval 5 seconds</div><div>EXT3-fs warning (device dm-0): ext3_clear_journal_err: Filesystem error recorded from previous mount: IO failure</div><div>EXT3-fs warning (device dm-0): ext3_clear_journal_err: Marking fs in need of filesystem check.</div>
<div>EXT3-fs warning: mounting fs with errors, running e2fsck is recommended</div><div>attempt to access beyond end of device</div><div>dm-0: rw=0, want=4654102632, limit=4477255680</div><div><br></div><div>EXT3-fs error (device dm-0): read_block_bitmap: Cannot read block bitmap - block_group = 17145, block_bitmap = 561807360</div>
<div>Aborting journal on device dm-0.</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>-- <br><div dir="ltr"><i style="background-color:rgb(255,0,0);color:rgb(0,102,0)">Tariq Wali.</i><span><span style="background-color:rgb(255,255,153)"></span></span><br>
</div><br>
</div></div>