Splash Photo

Posted by admin on 06 May 2008 | Tagged as: Photography

Yes, it’s one of mine. It’s the entrance to Tuross Lake looking across the sandbar to the Pacific Ocean. Taken earlier this year (2008), the weather was fantastic.

Neil

What is dmapi?

Posted by admin on 06 May 2008 | Tagged as: Centos 5.x, IT Stuff

dmapi is the data management api defined in the X/Open document “Systems Management Data Storage Management API dated Feb 1997. XFS, IBM JFS, VxFS, AdvFS and GPFS file systems support DMAPI for Hierarchical Storage Management

Enabling the CentOSPlus repository

Posted by admin on 06 May 2008 | Tagged as: Centos 5.x, IT Stuff

  • Open the /etc/yum.repos.d/CentOS-BASE.repo file in your favourite text editor.
  • Find the [centosplus] section and set (Note: Ignore quotes) “enabled=1” then add the line “includepkgs=kernel* xfs” kmod* dmapi*”
  • You can now list the available (eg. xfs related) packages using “yum list available *xfs*”

Adding an xfs partition to Centos 5

Posted by admin on 06 May 2008 | Tagged as: Centos 5.x

First off I should say that my test system is pretty ancient being an AMD Duron with 512MB ram so if you are installing onto something more modern your mileage on the actual commands may vary. If you are using an x86_64 system you will need to enable the CentosPlus repository. For i386/i686 the modules you need are in the extras repository so no changes to the /etc/yum.repos.d/CentOS-Base.repo file are required. Also I refer to directories and devices on my hardware, you should replace these references with those for your own system as appropriate.

(1) Obtaining the xfs modules

This assumes you are logged into Centos and have a command prompt…

At a command prompt execute

yum list available *xfs*

and you should see something like the following output

Loading "installonlyn" plugin
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Available Packages
kmod-xfs.i686 0.4-1.2.6.18_53.1.14.e extras
kmod-xfs-PAE.i686 0.4-1.2.6.18_53.1.14.e extras
kmod-xfs-xen.i686 0.4-1.2.6.18_53.1.14.e extras
xfsdump.i386 2.2.46-1.el5.centos extras
xfsprogs.i386 2.9.4-1.el5.centos extras
xfsprogs-devel.i386 2.9.4-1.el5.centos extras
xorg-x11-xfs.i386 1:1.0.2-4 base
xorg-x11-xfs-utils.i386 1:1.0.2-4 base

The modules I loaded were kmod-xfs.i686, xfsdump.i386, xfsprogs.i386 and dmapi so execute the command

yum install kmod-xfs.i686 xfsdump.i386 xfsprogs.i386 dmapi

(2) Creating an XFS filesystem

  • Use fdisk or parted to create a new partition from unused space on your hard disk. You will need to check the man pages for exact details. If you are converting an existing partition to xfs then see (3) below.
  • Format the new filesystem for xfs with a command like mkfs.xfs <filesystem> eg. for a partition /dev/had3 the command would be
  • mkfs.xfs /dev/hda3

  • You can provide a number of parameters to mkfs.xfs to set various options so it may be worth reading the man pages for mkfs.xfs.
  • Create a mountpoint for the new filesystem
  • mkdir /mymount

  • Edit /etc/fstab and add a line something like
  • /dev/hda3 /mymount xfs defaults 1 1

    which basically means “mount the block special device /dev/hda3 on the /opt mountpoint”. This is an xfs filesystem which uses the default mount options, the filesystem does not need to be dumped but fsck can check the filesystem after it has checked the root filesystem”.

  • Mount your new filesystem
  • mount /mymount

    The mount command will read the mount options from the fstab line that refers to the /mymount mountpoint.

  • You can now access the new filesystem at /mymount

(3) Converting and existing filesystem to xfs. For the purposes of these notes we will assume that /dev/hda3 is mounted on /opt formatted as ext3.

  • Make a backup of any data currently on the partition you want to convert to xfs.
  • Unmount the /opt partition
  • umount /opt

  • Format the partition as XFS
  • mkfs.xfs -f /dev/hda3

  • edit /etc/fstab
    • If you are not using LVM or your system does not use volume labels to identify partitions find the entry for /dev/hda3 and change the third item on that line of the fstab file from ext3 to xfs.
    • If you have LVM2 partitions you are probably using volume labels in your fstab file in which case I suggest that you format the partition using the command mkfs.xfs -f -L /opt /dev/hda3 then find the line in fstab that starts with “LABEL=/opt” and change the third item on that line from ext3 to xfs
  • Remount the partition
  • mount /opt

  • Restore the data you backed up in the first point above.

Congratulations, you should now have a working XFS partition that will automatically mount during a system boot.

« Prev