o2image(8)
β¨ o2image β the OCFS2 Manual Page, but make it cute β¨
okay bestie, so this is o2image(8) from the OCFS2 Manual Pages and honestly? it's giving "quiet little tool that does something kinda iconic." let's get into it π
πΈ NAME πΈ
o2image β copy or restore OCFS2 file system meta-data
like. it copies metadata. that's the whole vibe. π¦
π SYNOPSIS π
o2image [-r] [-I] device image-file
that's it. that's the lineup. <pink>device</pink> and <pink>image-file</pink> are your two besties here, and the flags are optional lil sprinkles β¨
π DESCRIPTION π
so o2image copies the OCFS2 file system meta-data from the <purple>device</purple> over to the specified <purple>image-file</purple>. and what's in that image file? it contains the file system skeleton β that means the inodes, the directory names, and the file names. what it does not include is any file data. nope, zero. none. the actual file contents are not invited to this party π
so why would anyone want this?? bestie, it's actually so useful:
- it can help you debug certain problems that are not reproducible otherwise β like on-disk corruptions π
- it could also be used to analyse the file system layout in an aging file system, with an eye towards improving performance. like a lil glow-up consultation for your fs π
now, heads up: since the image-file contains a copy of all the meta-data blocks, it can be a large file. like, big big. π
by default, it's created in a packed format, where all the meta-data blocks are written back-to-back. with the -r option, you can instead choose to have the file in the raw (or sparse) format, where the blocks are written to the same offset as they are on the device.
and pssst β debugfs.ocfs2 understands both formats. so you're covered either way, periodt π«Ά
oh and also! o2image has the option -I to restore the meta-data from the image file back onto the device. ngl, this option will rarely be useful to end-users β it's been written specifically for developers and testers. so if you're just vibing on your laptop, maybe don't. iykyk π₯
β¨ OPTIONS β¨
-rβ copies the meta-data to the image-file in the raw format. use this option only if the destination file system supports sparse files. if you're unsure, do not use this option and let the tool create the image-file in the packed format. when in doubt, don't, bestie π-Iβ restores meta-data from the image-file onto the device. CAUTION: this option could corrupt the file system. like literally could wreck it. π-iβ interactive mode! before writing out the image file, it prints its size and asks whether to proceed. this setting only applies when'-I'is not specified. super handy when the file system holding the image is low on disk space and you might need to free up space once the target image size is calculated. it's giving "let me check my bank account before i buy this" π
π EXAMPLES π
example 1: copies metadata blocks from /dev/sda1 device to sda1.out file.
# o2image /dev/sda1 sda1.out
example 2: copies meta-data blocks from sda1.out onto the /dev/sda1 device. as this command over-writes an existing volume, please use with CAUTION.
# o2image -I /dev/sda1 sda1.out
okay real talk β that second one over-writes an existing volume. be careful. be so careful. π¨
π SEE ALSO π
debugfs.ocfs2(8) fsck.ocfs2(8) fsck.ocfs2.checks(8) mkfs.ocfs2(8) mount.ocfs2(8) mounted.ocfs2(8) o2cluster(8) o2info(1) tunefs.ocfs2(8)
like a whole friend group fr fr π
π§ AUTHORS π§
Oracle Corporation
β COPYRIGHT β
Copyright Β© 2007, 2012 Oracle. All rights reserved.
and that's the whole page, bestie!! this was Version 1.8.9, dated January 2012 β yeah it's an oldie but it's still slaying πβ¨π go forth and copy some meta-data responsibly, mwah π«Ά
π¦ where this page comes from
- fedora 44: ocfs2-tools 1.8.9-2.fc44 Β· GPL-2.0-only
- fedora 44: ocfs2-tools 1.8.9-2.fc44 Β· GPL-2.0-only
- ubuntu resolute: ocfs2-tools 1.8.9-1 Β· GPL-2.0-or-later
- ubuntu stonking: ocfs2-tools 1.8.9-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms