Feed on
Subscription

How to use XFS file system below Linux environment



The system of advanced log file that system of file of ? ? XfS is SGI development,XFS provides retractility extremely,Very hale.What what I hope is SGI its transplanting arrived in Linux system.Fall in Linux environment.Version practicable is at present newest of XFS file system for 1.2 version,Can work to fall in 2.4 core well.


? ? one, brief introduction of XFS file system


Major attribute includes ? ? the following:


Completeness of ? ? data


? ? uses XFS file system,After the delay machine that expect is less than happens,Above all,As a result of file system open log function,So the file on your disk can delay accidentally no longer machine and destroyed.How many do the file that stores on file system at present no matter and data have,The daily record that file system can record according to place restores disk file content quickly inside very short time.


? ? transmits character


System of file of ? ? XFS is used optimize algorithm,Log record manipulates an effect to integral file very small.XFS inquiry and allocate storage space very fast.Xfs file system can provide fast reaction time continuously.The author once had had a test to system of file of XFS, JFS, Ext3, ReiserFS,The property performance of system of XFS file file is quite superior.


? ? but expansibility


The file system that ? ? XFS is a complete 64-bit,The storage space that it can support byte of about a hundred ten thousand T.Show to the support of especially big file and small size file numerous,The catalog that supports especially big measure.The file bulk that can sustain most is 263 = 9 X 1018 = 9 Exabytes,Dimension of system of the biggest file is 18 Exabytes.


? ? XFS uses high watch structure (B+ is cultivated) ,Made sure OK and quick search and fast space distribute file system.XFS can offer high speed to operate continuously,The function of file system does not suffer in catalog the limitation of catalog and file amount.


? ? transmits bandwidth


? ? XFS can store with be close to the function of naked equipment I/O data.In the test of individual file system,Its handling capacity is highest can amount to 7GB every second,To individual file read keep an operation,Its handling capacity can amount to 4GB every second.


? ? two, the use of XFS file system


? ? 1. Download and compile a kernel


The kernel patch that ? ? downloads corresponding version,Software of solution pressing patch is wrapped,Hit a patch to systematic core


? ? downloads an address:Ftp://oss.sgi.com/projects/xfs/d. . . .4.18-all.patch.bz2


? ? hits a patch to core,After download solution is pressed,Obtain a document:Xfs-1.1-2.4.18-all.patch file.


? ? undertakes be repairinged as follows to core:


? ? # Cd /usr/src/linux


? ? # Patch -p1 < /path/to/xfs-1.1-2.4.18-all.patch


After mending finishs ? ? ,The job that should have next is to compile core,Compile XFS into Linux core but in.


? ? runs the following command above all,System of file of XFS of choice core support:


? ? #make Menuconfig


? ? is in " file system " the choice in menu:


? ? <*> SGI XFS Filesystem Support ## explains:Compile the support of XFS file system explain into core or SGI XFS Filesystem Support ## :Support XFS file system with the means of module of dynamic to load


? ? still has two choices additionally:


## of ? of ? ? Enable XFS DMAPI explains:To the API of disk management,Storage tube behoove is used with the program


## of ? of ? ? Enable XFS Quota explains:Support cooperates Quota to use disk space size to manage to the user


After ? ? overfulfil job,Exit and save core to choose configuration


After ? ? ,Compile a kernel next,Install core:


#make BzImage of ? of ? of ? of ? of ? of ? ? ?


#make Module of ? of ? of ? of ? of ? of ? ? ?


#make Module_install of ? of ? of ? of ? of ? of ? ? ?


#make Install of ? of ? of ? of ? of ? of ? ? ?


If you do not have patience to the job with complex and trival above or ? ? did not hold,So OK and direct the core that has made good patch from the download on the site of SGI,Its version is 2.4.18.It is package of software of a Rpm,You should be installed simply only can.The core that SGI refers has two to plant,The machine that offers Smp and single processor respectively is used.


? ? 2. Establish XFS file system


? ? finishs pair of core after compiling,Still should download to it the XFSprogs tool software of form a complete set is wrapped,Also namely Mkfs.xfs tool.The form that otherwise we cannot complete bisect division is changed: ??of n of second a kind of sedge post the pattern that shows wisdom ? Qia to make system of file of ? ? FS.The software that wants download includes a name:Xfsprogs-2.0.3.


? ? presses downloads XFSProgs tool solution,Install,Mkfs.xfs automatic installation is in / below Sbin catalog.


Xvf Xfsprogs-2.0.3.src.tar.gz of - of #tar of ? of ? of ? of ? of ? of ? ? ?


#cd Xfsprogs-2.0.3src of ? of ? of ? of ? of ? of ? ? ?


# of ? of ? of ? of ? of ? of ? ? ? . / Configure


#make of ? of ? of ? of ? of ? of ? ? ?


#make Install of ? of ? of ? of ? of ? of ? ? ?


? ? uses Mkfs.xfs format to change disk for Xfs file system,The method is as follows:


# of ? ? # /sbin/mkfs.xfs /dev/sda6 explains:system of file of Xfs of divisional format melt into, it is indication content below:


Meta-data=/dev/sda6 Isize=256 Agcount=8 of ? of ? of ? of ? of ? of ? ? ? , agsize=128017 Blks


Data = Bsize=4096 Blocks=1024135 of ? of ? of ? of ? of ? of ? ? ? , imaxpct=25


= Sunit=0 Swidth=0 Blks of ? of ? of ? of ? of ? of ? ? ? , unwritten=0


Naming =version 2 Bsize=4096 of ? of ? of ? of ? of ? of ? ? ?


Log =internal Log Bsize=4096 Blocks=1200 of ? of ? of ? of ? of ? of ? ? ?


Realtime =none Extsz=65536 Blocks=0 of ? of ? of ? of ? of ? of ? ? ? , rtextents=0


When ? ? format changes disk,If Mkfs.xfs hints you are divisional originally already by system of file of other of format melt into,Can use parameter - F forcibly the format is changed:


F /dev/sda6 of - of ? ? #/sbin/mkfs.xfs


? ? 3. System of file of to load XFS


T Xfs /dev/sda6 /xfs ## of - of ? ? #mount among them / Xfs is advocate divisional / a catalog below.


? ? is final,After be being started to allow a system with respect to automatic to load,Should change / Etc/fstab,After such systems are started, meet Xfs of automatic to load is divisional and need not every time manual to load.


Because suffer Linux memory page to restrict,? ? should be current Xfs a bit of the specification,In X86 version,Can realize a dimension of file system to be 4K only.Additional,The means Mount that XFS file system can differ,Allow file system namely with reading means to load,Also allow to write means to load in order to read.Because Xfs file system uses as,this is when root file system,Want for safety with read-only means to load.


? ? three, of file system migratory


The other partition that ? ? should make a system medium uses XFS file system,Still having one situation is migratory file system.The proposal is when migratory file system,The data that gets on disk above all, file backs up first,Lest produce beyond recall loss,Undertaking file system is changed between,Best can have whole system complete backup.This one pace has a lot of kinds of methods,The article tries to describe with respect to migratory method of the author only.The kind that everybody can be used to according to oneself goes finishing


? ? if you are conceivable a pure Xfs system (all file system of the system all uses XFS file system) word,Still get root file system also system of file of Xfs of format melt into.This is more multifarious one pace actually.Because of root file system cannot by Umount,So,Must found a partition above all,Its file system is Ext2 file system,All files that get on current root partition next and catalog,Ground of from beginning to end is duplicate to this one partition,Change next / Etc/fstab file,Replace original root partition.


? ? method is as follows:


$ Mkfs -t Ext2 /dev/hda4 of ? of ? of ? of ? of ? of ? ? ?


$ Mkdir /mnt/temp of ? of ? of ? of ? of ? of ? ? ?


$ Mount -t Ext2 /dev/hda4 /mnt/temp of ? of ? of ? of ? of ? of ? ? ?


$ Cd / of ? of ? of ? of ? of ? of ? ? ?


$ Tar Lcvf - of ? of ? of ? of ? of ? of ? ? ? . | (? of Cd /mnt/temp; Tar Xpvf - )


Operation of ? ? above is all files that get on root partition bale,Duplicate to build newly-built partition.Of course,You also can make duplicate file commands below in order to directly.


DpR / /mnt/temp of - of ? ? # Cp


? ? is caught,Change the root partition that starts next time / Dev/hda4 is divisional,Change / Etc/fstab file and / Etc/lilo.conf,Next,Moving Lilo.


After ? ? is started afresh,New root partition has been been / Dev/hda4.


? ? next,The partition that establishs system of file of a Xfs:


? ? $ Mkfs -t Xfs /dev/hda2


? ? to load this is divisional,The method that uses different,the root divisional content duplicates come here divisional


? ? $ Mount -t Xfs /dev/hda2 /mnt/temp


? ? falls in root partition,Move


? ? $ Cd /


? ? $ Tar Lcvf - . | (Cd /mnt/temp; Tar Xpvf - )


? ? is changed again / Etc/fstab, / Etc/lilo.conf,Replace original Ext2 with newly-built Xfs partition advocate divisional.Following place are shown:


? ? / Dev/hda2 / Xfs Defaults 1 1


? ? uses newly-built Xfs partition as a partition,Save above to install.Examine configuration file content again,Affirm without by accident hind the again new system that start.If your setting is all correct,So after the system is started successfully,You owned the system of system of file of a pure XFS.




Related:

    Submit: