[Gelistirici] [PATCH] YALI: tune2fs

S.Çağlar Onur caglar at pardus.org.tr
20 Tem 2007 Cum 02:09:48 EEST


Selamlar;

ext3 dosya sistemleri için fstab içinde pass değerini 1 yaptıktan sonra her 39 boot için bir kere
her açılışta fsck çalışıyor, bunu saymayı format sırasında bırakmasını ve bu kontrolleri sadece 6 aylık 
aralıklarla yapmasını sağlayan yama aşağıda, uygun mudur?

Index: yali/filesystem.py
===================================================================
--- yali/filesystem.py	(revision 14977)
+++ yali/filesystem.py	(working copy)
@@ -220,6 +220,24 @@
         if p.close():
             raise YaliException, "ext3 format failed: %s" % partition.getPath()
 
+        # for Disabling Lengthy Boot-Time Checks
+        self.tune2fs(partition)
+
+    def tune2fs(self, partition):
+        cmd_path = sysutils.find_executable("tune2fs")
+        if not cmd_path:
+            e = "Command not found to tune the filesystem"
+            raise FSError, e
+
+        # Disable mount count and use 6 month interval to fsck'ing disks at boot
+        cmd = "%s -c 0 -i 6m %s" % (cmd_path, partition.getPath())
+
+        p = os.popen(cmd)
+        o = p.readlines()
+        if p.close():
+            raise YaliException, "tune2fs tuning failed: %s" % partition.getPath()
+
+
     def minResizeMB(self, partition):
         cmd_path = sysutils.find_executable("dumpe2fs")
 
Saygılar
-- 
S.Çağlar Onur <caglar at pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
-------------- sonraki bölüm --------------
A non-text attachment was scrubbed...
Name: kullanılamıyor
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://liste.pardus.org.tr/gelistirici/attachments/20070720/788193e7/attachment-0002.pgp>


Gelistirici mesaj listesiyle ilgili daha fazla bilgi