トップ 差分 一覧 ソース 検索 ヘルプ RSS ログイン

OpenSuse-Tips

  OpenSuse Leap のTips

OpenSuse で NTFS のマウント

標準で ntfs-3g はインストールされているので

#デバイス  マウントポイント  ファイルシステム   パラメータ
/dev/sda1  /windows/C        ntfs-3g            user,users,gid=users,fmask=113,dmask=002,locale=en_US.UTF-8 0 0

ntfs-3g -o ro,gid=users,umask=0002 /dev/disk/by-label/windows /mnt

参考

Fontの追加

以前から気になっていた Migu フォントを OpenSuse Leap 42 にインストール

http://mix-mplus-ipa.osdn.jp/
からダウンロード

~/.fonts に *ttf を配置
念の為に /usr/sbin/font-config を実行する
アプリケーションは 再起動する
xterm -fa Migu1M -fs 10 
で起動
参考
http://www.rs.tus.ac.jp/yyusa/ricty.html

btrfs の復旧

http://lapismoon.tumblr.com/post/2730839833/btrfs%E5%BE%A9%E6%97%A7

http://natural-born-minority.blogspot.jp/2013/05/btrfs.html

以下抜粋

/deb/sdb1 でそのHDDを認識した様子。

次にチェックを行います。

# btrfsck -s 1 /dev/sdb1

checking extents
checking fs roots
root 256 inode 134434 errors 400
root 256 inode 141903 errors 400
(以下、このerrors表示が35行)
found 28013846528 bytes used err is 1
total csum bytes: 26610968
total tree bytes: 731906048
total fs tree bytes: 654274560
btree space waste bytes: 195829544
file data blocks allocated: 41893093376
 referenced 26841923584
Btrfs v0.20-rc1

どうやら、inodeが35箇所に渡り壊れている模様。
mountしてみてもダメ(mountコマンドで固まる)で、修復手段はやはりみつかりませんでしたが、
「Linux3.4以降では "btrfs-restore" コマンドが使える」とのこと(上記参考サイト)な ので、それを利用して「復旧」ではなく「生きてる奴だけサルベージ」することに。

# mkdir dump
# btrfs-restore /dev/sdb1 ./dump/

Root objectid is 5
We have looped trying to restore files in ./dump/@[元のDir構造] too many times to  be making progress, stopping
(同じような出力が10行くらい)
We seem to be looping a lot on ./dump/@[元のDir構造] do you want to keep going on ? (y/N):
(同じような出力が20形くらい、全部Enter連打)
btrfs-restore: extent_io.c:602: free_extent_buffer: Assertion `!(eb->refs < 0)' failed.
中止 (コアダンプ)

$$ 間違い無く「変な終わりかた(死にかた?)」してますが、結果を見てみます。

# ls -l ./dump/ 
合計 8
drwxr-xr-x 22 root root 4096  5月  4 01:16 @
drwxr-xr-x  4 root root 4096  5月  4 01:24 @home
## $ btrfs check -p --mode=lowmem /dev/sdb

バッテリーの残量を確認

 % cat /sys/class/power_supply/BAT0/uevent
% upower -d|grep -i device
Device: /org/freedesktop/UPower/devices/line_power_AC
Device: /org/freedesktop/UPower/devices/battery_CMB1
Device: /org/freedesktop/UPower/devices/DisplayDevice
% upower -i /org/freedesktop/UPower/devices/battery_CMB1 
 native-path:          CMB1
 vendor:               Fujitsu
 model:                CP494696-01
 serial:               01C-W120316001717W
 power supply:         yes
 updated:              2017年11月22日 11時24分27秒 (88 seconds ago)
 has history:          yes
 has statistics:       yes
 battery
   present:             yes
   rechargeable:        yes
   state:               charging
   warning-level:       none
   energy:              19.44 Wh
   energy-empty:        0 Wh
   energy-full:         21.6 Wh
   energy-full-design:  21.6 Wh
   energy-rate:         0 W
   voltage:             12.152 V
   percentage:          90%
   capacity:            100%
   technology:          lithium-ion
   icon-name:          'battery-full-charging-symbolic'