浏览代码

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,8 +1224,8 @@ function image_setup_utils {
1224 1224
     fi
1225 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 1231
 function image_install_nodejs {

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

@@ -123,4 +123,8 @@ function defrag_filesystem {
123 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 130
 # NOTE: deliberately no exit 0

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

@@ -663,6 +663,9 @@ function setup_utils {
663 663
     function_check separate_tmp_filesystem
664 664
     separate_tmp_filesystem 150
665 665
 
666
+    function_check optimise_filesystem
667
+    optimise_filesystem
668
+
666 669
     function_check disable_null_passwords
667 670
     disable_null_passwords
668 671