13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 5 ■ WORKING WITH FILESYSTEMS■ Note You can’t convert backward from ext4 to ext3. It is possible (although complicated) to mount an ext3filesystem as ext4 without actually using any of the new data features, in which case you would still be able tomount the filesystem as ext3 as well. But it would be a bit pointless because you’d miss the ext4 features!XFSXFS is a 64-bit journaling filesystem created by Silicon Graphics. It’s available for nearly all mainstream<strong>Linux</strong> distros, although in general it’s not possible to use it for the boot partition, because grub doesn’talways handle it reliably. (However, you can create a small /boot partition as ext3 and then run the restof your filesystems as XFS.)Online defragmentation (that is, defragmentation while the filesystem is mounted) is available forXFS, although, like ext4, XFS uses delayed allocation and extents (a method of listing blocks that enablesthem to be given as a continuous list rather than named individually) to reduce fragmentation. To usethe xfs_fsr defragmentation tool, you’ll need to install the xfsdump package (Debian/Ubuntu).xfs_fsrJust using the command with no options will set it to spend 7,200 seconds (two hours) looping overand reorganizing the filesystems listed in /etc/mtab. To change this time to one hour (or substitute anyother seconds value), use this:xfs_fsr -t 3600Alternatively, you can set it to defragment a particular file:xfs_fsr /local/mybigfile.tar.gzYou can also use xfs_growfs to resize an XFS filesystem on the fly:xfs_growfs /filesystempath■ Note You will need space to grow the filesystem into! This is most often used with logical volume managementsetups. Or you can adapt recipe 5-5 to generate more partition space and then use xfs_growfs to extend thefilesystem.XFS is the fastest journaling filesystem in benchmarking tests and is reasonably low in CPU demand.Note, however, that an XFS filesystem can’t be shrunk once it’s created.134Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!