自己搭建的NAS
使用的是OpenMediaVault 3.0.87
,默认的磁盘系统分区是EXT4
数据分区格式,并且没有搭建RAID
阵列,暂时不建议RAID
阵列执行升级操作。
某些磁盘已经空间非常紧张了,希望能使用像微软的NTFS
格式相同的磁盘数据压缩功能,但是遗憾的是EXT4
数据分区格式是不支持数据压缩的。因此有必要升级到BTRFS
数据分区格式。
另外,OpenMediaVault 3.0.87
的Linux内核已经更新到Linux Kernel 4.9.0
能够非常好的支持BTRFS
数据分区格式了,因此尝试升级到BTRFS
数据分区格式。
在执行如下操作之前,请确定已经启用了OpenMediaVault
的SSH
远程登录功能。
首先,确定数据分区的挂载位置
1 2 3 4 5 6 7 8 9 10 11 12 |
root@openmediavault:~# df 文件系统 1K-块 已用 可用 已用% 挂载点 udev 10240 0 10240 0% /dev tmpfs 788476 9204 779272 2% /run /dev/sdc1 3589076 1795968 1591076 54% / tmpfs 1971180 0 1971180 0% /dev/shm tmpfs 5120 0 5120 0% /run/lock tmpfs 1971180 0 1971180 0% /sys/fs/cgroup tmpfs 1971180 0 1971180 0% /tmp /dev/sda1 2884137588 1282636316 1601484888 45% /media/7948f871-78ff-4448-a0e7-ad508359238e /dev/sdb1 3845558068 2094208152 1751333532 55% /media/9b5fcef5-6c5a-4478-80a8-41ae6cb9dce3 /dev/sdd1 2884137588 2865971516 18149688 100% /media/7909fba8-cc50-430f-986f-9db4ba7caa3c |
如上所示,我们看到有三个磁盘的挂载,分别挂载在/dev/sda1
,/dev/sdb1
, /dev/sdd1
。
我们接下来以/dev/sda1
分区为例:
1 2 3 |
$ umount /dev/sda1 $ btrfs-convert /dev/sda1 |
几个小时后(3TB
),会输出如下信息:
1 2 3 4 |
creating btrfs metadata. creating ext2fs image file. cleaning up system chunk. conversion complete. |
表示已经转换完成了。
注意,转换完成后磁盘的UUID
会发生变化,需要重新手工修正。
1 |
$ blkid /dev/sda1 |
得到如下输出:
1 |
/dev/sda1: UUID="6357625f-c966-49ba-9c90-9e8f8ff50433" UUID_SUB="cd51e4cf-1b77-488a-ae29-d4669c0a4cdd" TYPE="btrfs" PARTUUID="82b68e98-9341-4095-b152-f51f00c2e577" |
接下来,调整磁盘加载参数
1 2 |
$ cp /etc/openmediavault/config.xml /etc/openmediavault/config.xml.bak $ sed -i 's/7948f871-78ff-4448-a0e7-ad508359238e/6357625f-c966-49ba-9c90-9e8f8ff50433/g' /etc/openmediavault/config.xml |
找到
1 2 3 4 5 6 7 8 9 10 |
<mntent> <uuid>95ed6452-f93d-4092-af4a-c72e138f0072</uuid> <fsname>6357625f-c966-49ba-9c90-9e8f8ff50433</fsname> <dir>/media/6357625f-c966-49ba-9c90-9e8f8ff50433</dir> <type>ext4</type> <opts>defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl</opts> <freq>0</freq> <passno>2</passno> <hidden>0</hidden> </mntent> |
修改为
1 2 3 4 5 6 7 8 9 10 |
<mntent> <uuid>95ed6452-f93d-4092-af4a-c72e138f0072</uuid> <fsname>6357625f-c966-49ba-9c90-9e8f8ff50433</fsname> <dir>/media/6357625f-c966-49ba-9c90-9e8f8ff50433</dir> <type>btrfs</type> <opts>defaults,nofail,noexec,acl,compress=lzo,autodefrag,commit=0,noatime</opts> <freq>0</freq> <passno>2</passno> <hidden>0</hidden> </mntent> |
注意我们增加的参数,分别是修改文件系统格式从ext4
修改为btrfs
,同时增加了几个关键参数
1 |
compress=lzo,autodefrag,commit=0,noatime |
其中的compress
为压缩算法,目前我们指定lzo
压缩。autodefrag
为自动碎片整理,提升我们的性能。commit
为数据提交的延迟,默认是30
秒,适当增加时间可以提升磁盘性能,但是可能在突然断电的时候造成数据的丢失,由于我们是NAS
,数据安全性第一,因此正时间被设置成0
,要求文件系统在修改后立即刷新到磁盘上,放置数据丢失。另外强烈建议增加noatime
参数,这个参数是要求系统不必在每次访问文件的时候都修改最后一次的访问时间,可以明显提升服务器性能,尤其是对于NAS
服务器来说,除非是安全审计需要,否在完全没必要使用文件访问时间。
另外注意我们移除的参数
1 |
user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 |
这几个参数是btrfs
不支持的。
完成后重启系统
1 2 3 |
$ omv-mkconf fstab $ sudo reboot |
注意,上面的操作完成后,并不会真正压缩已经存在的文件,只压缩以后创建的文件
1 2 3 |
$ cd /media/6357625f-c966-49ba-9c90-9e8f8ff50433 $ btrfs filesystem defragment -r -v -clzo . |
上面的整个过程执行之后,会发现磁盘占用实际上是增加了的,这个不必在意,属于btrfs
的特性,到一定程度会自动回收空间的。
如果想手工回收这部分空间,执行如下命令即可:
1 2 3 4 5 |
$ cd /media/6357625f-c966-49ba-9c90-9e8f8ff50433 $ btrfs balance start -v -dusage=0 . $ btrfs balance start -v . |
整个过程非常耗时间,可以通过新开一个SHELL
中执行如下命令来查看进度信息
1 2 3 |
$ cd /media/6357625f-c966-49ba-9c90-9e8f8ff50433 $ btrfs balance status . |
注意
目前遇到了执行
1 2 3 4 5 |
$ cd /media/6357625f-c966-49ba-9c90-9e8f8ff50433 $ btrfs balance start -v -dusage=0 . $ btrfs balance start -v . |
之后,整个OpenMediaVault
系统无响应的问题,即使强制重新开机,也会在挂载完成刚刚转换后的磁盘后系统继续宕机,这个问题还在查找原因中。
刚刚开始是怀疑btrfs-tools
版本太低导致的,系统默认自带的是btrfs-tools 3.17
,但是Linux内核确是Linux Kernel 4.9.0
,按理说,两者版本号应该是一致的,但是标准源上只更新到了btrfs-tools 4.7.3
,使用如下命令更新后,问题依旧
1 |
$ sudo apt-get install btrfs-progs |
通过移除硬盘,重启系统后,查看系统日志
1 |
$ cat /var/log/syslog |
看到如下内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
Aug 21 23:08:45 openmediavault kernel: [ 11.572669] CPU: 1 PID: 501 Comm: mount Not tainted 4.9.0-0.bpo.3-amd64 #1 Debian 4.9.30-2+deb9u2~bpo8+1 Aug 21 23:08:45 openmediavault kernel: [ 11.572805] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Q1900-ITX, BIOS C1.80 12/17/2015 Aug 21 23:08:45 openmediavault kernel: [ 11.572944] task: ffff8fc0799a6dc0 task.stack: ffffa84ec0ae4000 Aug 21 23:08:45 openmediavault kernel: [ 11.573033] RIP: 0010:[<ffffffffc0344fcb>] [<ffffffffc0344fcb>] qgroup_fix_relocated_data_extents+0x2b/0x2c0 [btrfs] Aug 21 23:08:45 openmediavault kernel: [ 11.573234] RSP: 0018:ffffa84ec0ae79f0 EFLAGS: 00010246 Aug 21 23:08:45 openmediavault kernel: [ 11.573315] RAX: ffff8fc0741b6800 RBX: ffff8fc077d26770 RCX: 000000000000128b Aug 21 23:08:45 openmediavault kernel: [ 11.573421] RDX: ffff8fc079343810 RSI: ffff8fc074741800 RDI: ffff8fc079343780 Aug 21 23:08:45 openmediavault kernel: [ 11.573527] RBP: ffff8fc074ec2800 R08: ffff8fc07405c000 R09: ffff8fc079343780 Aug 21 23:08:45 openmediavault kernel: [ 11.573633] R10: 0000000000000000 R11: 0000000000000000 R12: ffffa84ec0ae7a88 Aug 21 23:08:45 openmediavault kernel: [ 11.573740] R13: ffff8fc074741800 R14: 0000000000000000 R15: ffff8fc079343780 Aug 21 23:08:45 openmediavault kernel: [ 11.573847] FS: 00007f8570bbe840(0000) GS:ffff8fc07fc80000(0000) knlGS:0000000000000000 Aug 21 23:08:45 openmediavault kernel: [ 11.573967] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Aug 21 23:08:45 openmediavault kernel: [ 11.574054] CR2: fffffffffffffe10 CR3: 00000001367e6000 CR4: 00000000001006e0 Aug 21 23:08:45 openmediavault kernel: [ 11.574160] Stack: Aug 21 23:08:45 openmediavault kernel: [ 11.574196] ffffffffc02ed592 ffff8fc079343780 0000000000000801 ffff8fc0741b6800 Aug 21 23:08:45 openmediavault kernel: [ 11.574335] ffff8fc079343780 0000000000000801 ffffffffc02efffd ffff8fc0799a6dc0 Aug 21 23:08:45 openmediavault kernel: [ 11.574478] 0000000000000000 a11cd9e1ac42d412 ffff8fc077d26770 ffff8fc074ec2800 Aug 21 23:08:45 openmediavault kernel: [ 11.574616] Call Trace: Aug 21 23:08:45 openmediavault kernel: [ 11.579190] [<ffffffffc02ed592>] ? join_transaction.isra.14+0x22/0x3f0 [btrfs] Aug 21 23:08:45 openmediavault kernel: [ 11.583819] [<ffffffffc02efffd>] ? start_transaction+0x9d/0x4a0 [btrfs] Aug 21 23:08:45 openmediavault kernel: [ 11.588451] [<ffffffffc0349638>] ? btrfs_recover_relocation+0x2e8/0x420 [btrfs] Aug 21 23:08:45 openmediavault kernel: [ 11.593105] [<ffffffffc02ec94d>] ? open_ctree+0x223d/0x2760 [btrfs] Aug 21 23:08:45 openmediavault kernel: [ 11.597702] [<ffffffff8ed35c49>] ? snprintf+0x49/0x60 Aug 21 23:08:45 openmediavault kernel: [ 11.602250] [<ffffffffc02bfe1d>] ? btrfs_mount+0xd3d/0xe80 [btrfs] Aug 21 23:08:45 openmediavault kernel: [ 11.606742] [<ffffffff8eba538d>] ? pcpu_alloc+0x34d/0x650 Aug 21 23:08:45 openmediavault kernel: [ 11.611187] [<ffffffff8ec077a6>] ? mount_fs+0x36/0x170 Aug 21 23:08:45 openmediavault kernel: [ 11.615562] [<ffffffff8ec247c4>] ? vfs_kern_mount+0x64/0x100 Aug 21 23:08:45 openmediavault kernel: [ 11.619940] [<ffffffffc02bf29c>] ? btrfs_mount+0x1bc/0xe80 [btrfs] Aug 21 23:08:45 openmediavault kernel: [ 11.624250] [<ffffffff8eba538d>] ? pcpu_alloc+0x34d/0x650 Aug 21 23:08:45 openmediavault kernel: [ 11.628596] [<ffffffff8ec077a6>] ? mount_fs+0x36/0x170 Aug 21 23:08:45 openmediavault kernel: [ 11.632988] [<ffffffff8ec247c4>] ? vfs_kern_mount+0x64/0x100 Aug 21 23:08:45 openmediavault kernel: [ 11.637301] [<ffffffff8ec26dad>] ? do_mount+0x1dd/0xc70 Aug 21 23:08:45 openmediavault kernel: [ 11.641568] [<ffffffff8ec27b24>] ? SyS_mount+0x84/0xc0 Aug 21 23:08:45 openmediavault kernel: [ 11.645762] [<ffffffff8f0077bb>] ? system_call_fast_compare_end+0xc/0x9b Aug 21 23:08:45 openmediavault kernel: [ 11.649937] Code: 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 83 ec 50 4c 8b 76 10 65 48 8b 04 25 28 00 00 00 48 89 44 24 48 31 c0 48 8b 46 08 <49> 8b ae 10 fe ff ff 48 8b 98 f0 01 00 00 31 c0 48 8b 53 20 83 Aug 21 23:08:45 openmediavault kernel: [ 11.659055] RIP [<ffffffffc0344fcb>] qgroup_fix_relocated_data_extents+0x2b/0x2c0 [btrfs] Aug 21 23:08:45 openmediavault kernel: [ 11.663502] RSP <ffffa84ec0ae79f0> Aug 21 23:08:45 openmediavault kernel: [ 11.667815] CR2: fffffffffffffe10 Aug 21 23:08:45 openmediavault kernel: [ 11.671992] ---[ end trace 5342438d9209c318 ]--- Aug 21 23:08:45 openmediavault systemd[1]: media-6357625f\x2dc966\x2d49ba\x2d9c90\x2d9e8f8ff50433.mount mount process exited, code=killed status=9 |
根据Re: mount troubles after crash里面的回复,这个是Linux Kernel 4.9.0
已知的BUG
,在Linux Kernel 4.10-rcs
之后的版本被修复。因此涉及到了Linux Kernel
的升级操作。
目前看来要么自己编译内核,要么等待Debian Jessie
的back-backports
更新Linux
内核了,希望整个修复已经合并到Linux Kernel 4.9.44
版本中了吧。
或者关闭btrfs
的磁盘配额(btrfs-quota
)功能(崩溃的原因就是磁盘配额部分的BUG
),也可以解决这个问题。
1 |
$ sudo btrfs quota disable /media/`whoami`/6357625f-c966-49ba-9c90-9e8f8ff50433 |
注意,上面的命令是在Ubuntu 16.04 Linux Kernel 4.4.0-92
系统上执行的(硬盘被单独拿出来,然后挂载到Ubuntu 16.04 Linux Kernel 4.4.0-92
的机器上),貌似由于这个版本的内核不支持btrfs
的磁盘配额。因此,没有这个问题。
目前测试来看,上面的办法(关闭磁盘配额)并不能解决问题,看来只有升级到Linux Kernel 4.10
,或者把补丁重新应用到Linux Kernel 4.9
这一条路了。
手工升级到 Linux Kernel 4.13.0-rc5-amd64
,则执行如下操作:
1 2 3 |
$ sudo cp /etc/apt/preferences.d/openmediavault-kernel-backports.pref /etc/apt/preferences.d/openmediavault-kernel-backports.pref.bak $ sudo vi /etc/apt/preferences.d/openmediavault-kernel-backports.pref |
把里面的如下内容
1 2 3 4 5 6 7 8 9 10 11 |
Package: linux-base Pin: release a=jessie-backports Pin-Priority: 500 Package: linux-headers-* Pin: release a=jessie-backports Pin-Priority: 500 Package: linux-image-* Pin: release a=jessie-backports Pin-Priority: 500 |
替换为:
1 2 3 4 5 6 7 8 9 10 11 |
Package: linux-base Pin: release o=Debian,a=experimental Pin-Priority: 102 Package: linux-headers-* Pin: release o=Debian,a=experimental Pin-Priority: 102 Package: linux-image-* Pin: release o=Debian,a=experimental Pin-Priority: 102 |
然后执行如下命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#国内用户建议使用这个地址 deb http://mirrors.163.com/debian/ experimental main $ sudo echo "deb http://deb.debian.org/debian experimental main" >> /etc/apt/sources.list $ sudo apt-get update $ sudo apt-get -t experimental install search linux-image-4.1 #目前最新的就是 linux-image-4.13.0-rc5-amd64 $ sudo apt-get -t experimental install linux-image-4.13.0-rc5-amd64 #使用完成后,建议移除我们刚刚的修改,这样可以避免误安装其他东西,导致系统异常。 $ sudo rm -rf /etc/apt/preferences.d/openmediavault-kernel-backports.pref $ sudo mv /etc/apt/preferences.d/openmediavault-kernel-backports.pref.bak /etc/apt/preferences.d/openmediavault-kernel-backports.pref $ sudo sed -i '/deb\ http:\/\/deb.debian.org\/debian\ experimental\ main/d' /etc/apt/sources.list $ sudo reboot |
注意,这个源,可以替换成Debian 9
的backport
的源,貌似可以安装 linux-image-4.12
版本的内核,内核部分不必追求最新,一般追求最稳定,能解决问题即可。
貌似linux-image-4.13.0-RC5
版本内核依旧存在BUG
,如下所示:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
Aug 23 22:20:13 openmediavault kernel: [ 153.478300] kernel BUG at /build/linux-yioSfB/linux-4.13~rc5/fs/btrfs/relocation.c:4667! Aug 23 22:20:13 openmediavault kernel: [ 153.478481] invalid opcode: 0000 [#1] SMP Aug 23 22:20:13 openmediavault kernel: [ 153.478553] Modules linked in: cpufreq_conservative cpufreq_powersave cpufreq_userspace nfsd auth_rpcgss nfs_acl nfs lockd grace fscache sunrpc quota_v2 quota_tree snd_hda_codec_hdmi snd_hda_codec_realtek hci_uart snd_hda_codec_generic snd_soc_rt5670 snd_soc_rt5645 btbcm snd_soc_rt5640 btqca snd_soc_rl6231 snd_intel_sst_acpi btintel snd_intel_sst_core bluetooth snd_soc_sst_atom_hifi2_platform snd_soc_sst_match drbg snd_soc_core iTCO_wdt ppdev iTCO_vendor_support ansi_cprng parport_pc parport i915 ecdh_generic snd_compress evdev snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm drm_kms_helper dw_dmac snd_timer battery drm snd video i2c_algo_bit dw_dmac_core shpchp lpc_ich rfkill soundcore mfd_core intel_rapl intel_soc_dts_thermal intel_soc_dts_iosf intel_powerclamp coretemp kvm_intel kvm Aug 23 22:20:13 openmediavault kernel: [ 153.479699] irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel cryptd intel_cstate pcspkr button loop fuse autofs4 ext4 crc16 mbcache jbd2 fscrypto btrfs xor raid6_pq dm_mod md_mod sg sd_mod hid_generic usbhid ata_generic crc32c_intel i2c_i801 ahci r8169 mii libahci ata_piix xhci_pci libata xhci_hcd usbcore scsi_mod usb_common fan thermal i2c_hid hid sdhci_acpi sdhci i2c_designware_platform i2c_designware_core mmc_core Aug 23 22:20:13 openmediavault kernel: [ 153.480340] CPU: 0 PID: 112 Comm: kworker/u8:3 Tainted: G W 4.13.0-rc5-amd64 #1 Debian 4.13~rc5-1~exp1 Aug 23 22:20:13 openmediavault kernel: [ 153.480504] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Q1900-ITX, BIOS C2.10 11/30/2016 Aug 23 22:20:13 openmediavault kernel: [ 153.480710] Workqueue: btrfs-endio-write btrfs_endio_write_helper [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.480822] task: ffff8b09b5308380 task.stack: ffff993500afc000 Aug 23 22:20:13 openmediavault kernel: [ 153.480965] RIP: 0010:btrfs_reloc_cow_block+0x1f8/0x370 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.481062] RSP: 0018:ffff993500aff9e0 EFLAGS: 00010246 Aug 23 22:20:13 openmediavault kernel: [ 153.481150] RAX: ffff8b09b9d8c000 RBX: ffff8b09b6f19800 RCX: ffff8b08b62e05b8 Aug 23 22:20:13 openmediavault kernel: [ 153.481265] RDX: ffff8b09b60c87a8 RSI: ffff8b09b6f19800 RDI: ffff8b09b8a33e88 Aug 23 22:20:13 openmediavault kernel: [ 153.481379] RBP: ffff8b09b7efb000 R08: ffff993500affa70 R09: 0000000000001000 Aug 23 22:20:13 openmediavault kernel: [ 153.481494] R10: fffffffffffffff7 R11: ffff8b09b8e94358 R12: ffff8b09b8a33e88 Aug 23 22:20:13 openmediavault kernel: [ 153.481608] R13: 0000000000000000 R14: ffff8b08b62e05b8 R15: ffff8b09b9d8c000 Aug 23 22:20:13 openmediavault kernel: [ 153.481724] FS: 0000000000000000(0000) GS:ffff8b09bfc00000(0000) knlGS:0000000000000000 Aug 23 22:20:13 openmediavault kernel: [ 153.481854] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Aug 23 22:20:13 openmediavault kernel: [ 153.481948] CR2: 00007f9964755000 CR3: 0000000129809000 CR4: 00000000001006f0 Aug 23 22:20:13 openmediavault kernel: [ 153.482063] Call Trace: Aug 23 22:20:13 openmediavault kernel: [ 153.482150] ? update_ref_for_cow+0x254/0x350 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.482274] ? __btrfs_cow_block+0x35d/0x5c0 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.482395] ? btrfs_cow_block+0xcb/0x1b0 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.487038] ? btrfs_search_slot+0x1fd/0x9e0 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.491662] ? btrfs_lookup_file_extent+0x4a/0x70 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.496270] ? __btrfs_drop_extents+0x156/0xe10 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.500816] ? kmem_cache_alloc+0xbb/0x5a0 Aug 23 22:20:13 openmediavault kernel: [ 153.505321] ? __schedule+0x3d0/0x860 Aug 23 22:20:13 openmediavault kernel: [ 153.509822] ? insert_reserved_file_extent.constprop.65+0x97/0x2f0 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.514424] ? btrfs_finish_ordered_io+0x33b/0x790 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.519029] ? dequeue_task_fair+0x58/0x640 Aug 23 22:20:13 openmediavault kernel: [ 153.523595] ? __switch_to+0x234/0x430 Aug 23 22:20:13 openmediavault kernel: [ 153.528159] ? btrfs_scrubparity_helper+0xcf/0x300 [btrfs] Aug 23 22:20:13 openmediavault kernel: [ 153.532691] ? __schedule+0x3d0/0x860 Aug 23 22:20:13 openmediavault kernel: [ 153.537179] ? process_one_work+0x181/0x370 Aug 23 22:20:13 openmediavault kernel: [ 153.541641] ? worker_thread+0x4d/0x3a0 Aug 23 22:20:13 openmediavault kernel: [ 153.546128] ? kthread+0xfc/0x130 Aug 23 22:20:13 openmediavault kernel: [ 153.550568] ? process_one_work+0x370/0x370 Aug 23 22:20:13 openmediavault kernel: [ 153.554980] ? kthread_create_on_node+0x70/0x70 Aug 23 22:20:13 openmediavault kernel: [ 153.559390] ? ret_from_fork+0x25/0x30 Aug 23 22:20:13 openmediavault kernel: [ 153.563694] Code: 5e 41 5f e9 8b ad ff ff f6 85 b1 05 00 00 01 0f 84 ab fe ff ff c7 04 24 01 00 00 00 e9 d8 fe ff ff 49 83 fa f7 0f 85 42 fe ff ff <0f> 0b 41 0f b6 cf 4d 8d 7a 30 4c 89 44 24 20 48 89 c8 48 89 4c Aug 23 22:20:13 openmediavault kernel: [ 153.572587] RIP: btrfs_reloc_cow_block+0x1f8/0x370 [btrfs] RSP: ffff993500aff9e0 Aug 23 22:20:13 openmediavault kernel: [ 153.576943] ---[ end trace bc1f498ba941cbb6 ]--- |
执行如下命令,修复一下文件系统:
1 2 3 4 |
$ sudo umount /dev/sda1 # sudo btrfsck --repair --init-csum-tree --init-extent-tree /dev/sda1 太慢了,如果没有严重问题,只执行修复即可 $ sudo btrfsck --repair /dev/sda1 |
貌似不管用,估计还要继续升级内核,btrfs
还是不够成熟啊!
参考OpenMdeiaValut 3.0.86上编译Linux Kernel 4.13-rc6编译安装最新的内核,貌似可以解决上面的问题。
参考链接
- 尝试将系统分区 ext4 转换成 btrfs 格式
- Btrfs (简体中文)
- 在 SSD 上使用 btrfs 文件系统的相关优化
- BTRFS support, mount options
- BTRFS Mount options
- How to upgrade btrfs-tools 3.17 to 4.9?
- btrfs update?
- mount troubles after crash
- Oops in btrfs_recover_relocation, kernel 4.8.1
- Restart during btrfs balance raid1 conversion, now can only mount read-only
- Removing/Replacing a disk
- 0000888: Option to remove missing HDD from Storage > Filesystem
- HowToUpgradeKernel
- Debian linux kernel