[Ocfs2-tools-devel] ocfs2-tools-64bitblocks.patch for ocfs2-tools-1.3.9-0.1

Sunil Mushran Sunil.Mushran at oracle.com
Mon Jul 21 17:39:55 PDT 2008


debugfs.ocfs2 -R "stats" /dev/sdX
dumps the superblock.

debugfs.ocfs2 -R "stat //global_bitmap" /dev/sdX
dumps the global bitmap.

Take dumps before and after the resize. Should tell us a lot.

Sunil

Sabuj Pattanayek wrote:
>> Here's a patch to allow mkfs.ocfs2 to create volumes greater than 16T.
>> Haven't tested tunefs.ocfs2 yet:
>>     
>
> The tunefs.ocfs2 -S didn't go as planned. The original lvm setup was
> created with:
>
> pvcreate /dev/mapper/3600d0230007024e80035fd3c9d1f7e00p1
> pvcreate /dev/mapper/3600d0230007024a10036317a6f004200p1
> vgcreate -s 2G vg /dev/mapper/3600d0230007024e80035fd3c9d1f7e00p1
> /dev/mapper/3600d0230007024a10036317a6f004200p1
> lvcreate -i 2 -I 128 -l 100%VG -n 20T vg
>
> Then later today to extend the vg by 5T I did:
>
> porpoise ~ # pvcreate /dev/mapper/3600d02300065e5190fffff73839bab00p1
>   WARNING: Locking disabled. Be careful! This could corrupt your metadata.
>   Physical volume "/dev/mapper/3600d02300065e5190fffff73839bab00p1"
> successfully created
> porpoise ~ # vgextend vg /dev/mapper/3600d02300065e5190fffff73839bab00p1
>   WARNING: Locking disabled. Be careful! This could corrupt your metadata.
>   Volume group "vg" successfully extended
>
> So that the pv shows (dm-3 is a symlink to
> /dev/mapper/3600d0230007024e80035fd3c9d1f7e00p1 , don't know how lvm
> decides to use these names, but it's all the same):
>
> # pvdisplay
>   WARNING: Locking disabled. Be careful! This could corrupt your metadata.
>   --- Physical volume ---
>   PV Name               /dev/dm-3
>   VG Name               vg
>   PV Size               9.55 TB / not usable 1.36 GB
>   Allocatable           yes (but full)
>   PE Size (KByte)       2097152
>   Total PE              4888
>   Free PE               0
>   Allocated PE          4888
>   PV UUID               v6gSi5-ke6U-MFAU-kMzv-8rAX-4ZZL-2zGQVc
>
>   --- Physical volume ---
>   PV Name               /dev/mapper/3600d0230007024a10036317a6f004200p1
>   VG Name               vg
>   PV Size               9.55 TB / not usable 1.36 GB
>   Allocatable           yes (but full)
>   PE Size (KByte)       2097152
>   Total PE              4888
>   Free PE               0
>   Allocated PE          4888
>   PV UUID               FewJz1-n7bb-se8G-mUDe-qdqK-akKj-I0x5SG
>
>   --- Physical volume ---
>   PV Name               /dev/mapper/3600d02300065e5190fffff73839bab00p1
>   VG Name               vg
>   PV Size               5.09 TB / not usable 1013.97 MB
>   Allocatable           yes
>   PE Size (KByte)       2097152
>   Total PE              2606
>   Free PE               2606
>   Allocated PE          0
>   PV UUID               eNB9Fv-ahAn-UiEd-cYfq-sNX1-Qy4w-JNICWp
>
> # vgdisplay
>   WARNING: Locking disabled. Be careful! This could corrupt your metadata.
>   --- Volume group ---
>   VG Name               vg
>   System ID
>   Format                lvm2
>   Metadata Areas        3
>   Metadata Sequence No  3
>   VG Access             read/write
>   VG Status             resizable
>   Clustered             yes
>   Shared                no
>   MAX LV                0
>   Cur LV                1
>   Open LV               0
>   Max PV                0
>   Cur PV                3
>   Act PV                3
>   VG Size               24.18 TB
>   PE Size               2.00 GB
>   Total PE              12382
>   Alloc PE / Size       9776 / 19.09 TB
>   Free  PE / Size       2606 / 5.09 TB
>   VG UUID               XbgBCY-D156-RuB5-ZBvs-QGbc-aP10-9CMUbx
>
> # lvdisplay
>   WARNING: Locking disabled. Be careful! This could corrupt your metadata.
>   --- Logical volume ---
>   LV Name                /dev/vg/20T
>   VG Name                vg
>   LV UUID                gWOfeZ-23Sk-lCae-BhBd-RI0K-Qnuv-i2Zz0Z
>   LV Write Access        read/write
>   LV Status              available
>   # open                 0
>   LV Size                19.09 TB
>   Current LE             9776
>   Segments               1
>   Allocation             inherit
>   Read ahead sectors     auto
>   - currently set to     512
>   Block device           252:6
>
> # lvextend -v -l 100%VG /dev/vg/20T
>   WARNING: Locking disabled. Be careful! This could corrupt your metadata.
>     Finding volume group vg
>   Using stripesize of last segment 128.00 KB
>     Archiving volume group "vg" metadata (seqno 3).
>   Extending logical volume 20T to 24.18 TB
>   Insufficient suitable allocatable extents for logical volume 20T:
> 2606 more required
>
> ok so let's try:
>
> porpoise ~ # lvextend -v -i 1 -l 100%VG /dev/vg/20T
>   WARNING: Locking disabled. Be careful! This could corrupt your metadata.
>     Finding volume group vg
>     Archiving volume group "vg" metadata (seqno 3).
>   Extending logical volume 20T to 24.18 TB
>     Creating volume group backup "/etc/lvm/backup/vg" (seqno 4).
>     Found volume group "vg"
>     Found volume group "vg"
>     Loading vg-20T table
>     Suspending vg-20T (252:6) without device flush
>     Found volume group "vg"
>     Resuming vg-20T (252:6)
>   Logical volume 20T successfully resized
>
> worked, then:
>
> porpoise ~ # lvdisplay
>   WARNING: Locking disabled. Be careful! This could corrupt your metadata.
>   --- Logical volume ---
>   LV Name                /dev/vg/20T
>   VG Name                vg
>   LV UUID                gWOfeZ-23Sk-lCae-BhBd-RI0K-Qnuv-i2Zz0Z
>   LV Write Access        read/write
>   LV Status              available
>   # open                 0
>   LV Size                24.18 TB
>   Current LE             12382
>   Segments               2
>   Allocation             inherit
>   Read ahead sectors     auto
>   - currently set to     512
>   Block device           252:6
>
> Let's try to resize the partition:
>
> porpoise ~ # tunefs.ocfs2 -S /dev/vg/20T
> tunefs.ocfs2 1.3.9
> y
>
> Changing volume size from 5125439488 blocks to 6491734016 blocks
> Proceed (y/N): Resized volume
> Wrote Superblock
>
> /dev/mapper/vg-20T    5.1T  180M  5.1T   1% /mnt/ocfs2
>
> So that didn't exactly go as planned. Any thoughts on what to modify
> in resize.c or elsewhere?
>
> Thanks,
> Sabuj
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
>   




More information about the Ocfs2-tools-devel mailing list