ext3 -> vxfs conversion


Hope and frustration are always close:

Veritas VxFS is a very mature and advanced filesystem, that actually offers both the largest featureset[*] around and also the robustness of a filesystem that has been used for financial databases and the likes for a lot longer than 10 years. I remember it being at version 3.3 when I started my HP-UX job and now we’re at version 7… But what will you do if the system you’re running already has storage defined using ext3?

The /usr/lib hierarchy of Veritas Storage Foundation (and the freeware edition) actually holds a utility for converting ext3 to VXFS  on Linux.

It does work, but needs a full fsck after it’s done and doesn’t show any easy way for tuning the resulting filesystem.  A bitter taste comes with it, and in the end I rather newfs’ my filesystems than converting.

 

[root@XXX vxfs]# pwd
/usr/lib/fs/vxfs
[root@XXX vxfs]# ls
df       fscdsadm        fsdb      mkfs       vxfsckd      vxquotaoff
fcladm   fscdsconv       fsenvadm  mount      vxfsconvert  vxquotaon
ff       fscdstask       fsmap     ncheck     vxfsstat     vxrepquota
fiostat  fsck            fstyp     setext     vxgetmsg     vxrestore
fsadm    fsckptadm       fsvmap    vxdump     vxlsino      vxtunefs
fsapadm  fsckpt_restore  fsvoladm  vxedquota  vxquot       vxumount
fscat    fsclustadm      getext    vxenablef  vxquota      vxupgrade
[root@XXX vxfs]# umount  /dev/vx/dsk/xx/xx1
[root@XXX vxfs]# ./vxfsconvert /dev/vx/dsk/xx/xx1
Do you wish to commit to conversion? (ynq) y
UX:vxfs vxfsconvert: INFO: V-3-21852:  CONVERSION WAS SUCCESSFUL
[root@XXX vxfs]# mount  /dev/vx/dsk/xx/xx1/sharch/xx1
mount: you must specify the filesystem type
[root@XXX vxfs]# mount -t vxfs /dev/vx/dsk/xx/xx1 /sharch/xx1
UX:vxfs mount.vxfs: ERROR: V-3-21268: /dev/vx/dsk/xx/xx1 is
corrupted. needs checking

(Oh well, maybe it just wants a finally ‘clean’ bit set?)

[root@XXX vxfs]# ./fsck /dev/vx/dsk/xx/xx1
super-block indicates that intent logging was disabled
cannot perform log replay
file system is not clean, full fsck required
full file system check required, exiting ...

(oh WOW, smells like “logform” on AIX?)

[root@XXX vxfs]# ./fsck -o full /dev/vx/dsk/xx/xx1
super-block indicates that intent logging was disabled
cannot perform log replay
pass0 - checking structural files
pass1 - checking inode sanity and blocks
pass2 - checking directory linkage
pass3 - checking reference counts
pass4 - checking resource maps
au 11 emap incorrect - fix? (ynq)y
au 11 summary incorrect - fix? (ynq)y
au 12 emap incorrect - fix? (ynq)y
au 12 summary incorrect - fix? (ynq)y
au 13 emap incorrect - fix? (ynq)y
au 13 summary incorrect - fix? (ynq)y
au 14 emap incorrect - fix? (ynq)y
au 14 summary incorrect - fix? (ynq)y
au 15 emap incorrect - fix? (ynq)y
au 15 summary incorrect - fix? (ynq)y
au 16 emap incorrect - fix? (ynq)y
au 16 summary incorrect - fix? (ynq)y
au 17 emap incorrect - fix? (ynq) (aborted)

Oh! So my filesystem was converted, but something figured if thrash (ext3) goes in it should go out as trash, too.

Running fsck -y -o full finally got me a clean mountable vxfs filesystem, but honestly I don’t have THAT deep insight to VXFS’ mechanics to find that acceptable after looking at a few 100 error lines. newsfs *is* my friend.

Final result:

 

fileset 1 iau 0 summary incorrect - fix? (ynq)y
fileset 999 iau 0 summary incorrect - fix? (ynq)y
free block count incorrect 0 expected 25589937 fix? (ynq)y
free extent vector incorrect fix? (ynq)y
OK to clear log? (ynq)y
flush fileset headers? (ynq)y
set state to CLEAN? (ynq)y
[root@XXX vxfs]# mount -t vxfs /dev/vx/dsk/xx/xx1 /sharch/XX1
[root@XXX vxfs]# ls /sharch/A21
lost+found
[root@XXX vxfs]# ./fstyp -v /dev/vx/dsk/xx/xx1
vxfs
magic a501fcf5  version 7  ctime Wed 03 Jun 2009 02:56:18 PM CEST
logstart 0  logend 0
bsize  4096 size  25591808 dsize  25591808  ninode 0  nau 0
defiextsize 0  ilbsize 0  immedlen 96  ndaddr 10
aufirst 0  emap 0  imap 0  iextop 0  istart 0
bstart 0  femap 0  fimap 0  fiextop 0  fistart 0  fbstart 0
nindir 2048  aulen 32768  auimlen 0  auemlen 2
auilen 0  aupad 0  aublocks 32768  maxtier 15
inopb 16  inopau 0  ndiripau 0  iaddrlen 2   bshift 12
inoshift 4  bmask fffff000  boffmask fff  checksum f0b7fdf0
oltext1 35886  oltext2 25559554  oltsize 1  checksum2 0
free 25589937  ifree 0
efree  3 3 4 3 2 3 2 3 2 2 4 4 2 3 3 778 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 

[*] You’ve never seen it and wanna know why I think it was more features than ?
Or you’re a linux user and think ext4 is the best filesystem ever created, because that was true for ext3? 😉

A _few_ pieces off my head:

  • read/write snapshots – yes! optionally writeable snapshots, i.e. for regression testing
  • insanely large file sizes and filesystems
  • endian safe, the same FS can be mounted on AIX, Linux, HP-UX, Tru64, Solaris…
  • unlimited inodes
  • online tuning of deep-buried settings like average file size etc.
  • reporting/defragging for directory and extent fragmentation (yes, it fragments less than other FS, but it scales, too, and a small issue might need a small bit of care when it is scaled to 500000 files in a directory, etc.
  • robust and tunable journaling
  • oh, and cluster filesystem support
  • Concurrent write support (multiple processes writing into same file)
  • some features are not in the free or normal license, BUT you can enable them online if you have the license. Just like that.
  • Online size increase and shrink. I forgot to mention that for two years since it’s so basic in VxFS. Back on HP-UX 11.00 it was still unsafe if you didn’t run a directory+block defrag first, but hey, that was over 10 years ago!
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s