瀏覽代碼

Some filesystem optimisations for btrfs

Bob Mottram 8 年之前
父節點
當前提交
81e06abc20
共有 3 個文件被更改,包括 9 次插入2 次删除
  1. 2
    2
      src/freedombone-image-customise
  2. 4
    0
      src/freedombone-utils-filesystem
  3. 3
    0
      src/freedombone-utils-setup

+ 2
- 2
src/freedombone-image-customise 查看文件

1224
     fi
1224
     fi
1225
     chroot "$rootdir" apt-get -yq install tripwire
1225
     chroot "$rootdir" apt-get -yq install tripwire
1226
 
1226
 
1227
-    # mirroring
1228
-    # cmake
1227
+    # filesystem optimisations
1228
+    sed -i 's|btrfs subvol=@|btrfs defaults,subvol=@,compress=lzo,ssd|g' $rootdir/etc/fstab
1229
 }
1229
 }
1230
 
1230
 
1231
 function image_install_nodejs {
1231
 function image_install_nodejs {

+ 4
- 0
src/freedombone-utils-filesystem 查看文件

123
     echo $'Defragmentation completed'
123
     echo $'Defragmentation completed'
124
 }
124
 }
125
 
125
 
126
+function optimise_filesystem {
127
+    sed -i 's|btrfs subvol=@|btrfs defaults,subvol=@,compress=lzo,ssd|g' /etc/fstab
128
+}
129
+
126
 # NOTE: deliberately no exit 0
130
 # NOTE: deliberately no exit 0

+ 3
- 0
src/freedombone-utils-setup 查看文件

663
     function_check separate_tmp_filesystem
663
     function_check separate_tmp_filesystem
664
     separate_tmp_filesystem 150
664
     separate_tmp_filesystem 150
665
 
665
 
666
+    function_check optimise_filesystem
667
+    optimise_filesystem
668
+
666
     function_check disable_null_passwords
669
     function_check disable_null_passwords
667
     disable_null_passwords
670
     disable_null_passwords
668
 
671