LoginSignup
4

More than 5 years have passed since last update.

posted at

updated at

Organization

CentOS7でMacのHFS+ドライブをマウントする

はじめに

先日稼働させたCentOS7上のsambaサーバーのNASに、もともとMacで共有していたドライブをコピーしたくてHFS+をマウントさせよう!というお話。

WiFi経由でファイルコピーしようとしたら遅すぎて・・w

Do it!

kmod-hfsplusをインストールする

yumコマンド・・・のリポジトリが足りてないので追加します。
で、インストールします。

# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
# yum install kmod-hfsplus

HFS+パーティションをマウントする

partedコマンドでパーティションを確認します。
注意:fdiskコマンドだとGPTはうまく表示されないのでドツボにハマります!

# parted -l

モデル: BUFFALO External HDD (scsi)
ディスク /dev/sdb: 3001GB
セクタサイズ (論理/物理): 512B/4096B
パーティションテーブル: gpt
ディスクフラグ: 

番号  開始    終了    サイズ  ファイルシステム  名前                  フラグ
 1    20.5kB  210MB   210MB   fat32             EFI System Partition  boot
 2    210MB   3000GB  3000GB  hfs+              Share HD 2

マウントしてみましょう。(リードオンリーです)

# mount -t hfsplus -o ro /dev/sdb2 /media/hfs

いけたかな?

# ll /media/hfs

合計 776
drwxrwxr-x 1 nobody nobody      9  5月  2  2016 Backup
drwxrwxr-x 1 nobody nobody     36  1月 11 13:29 Books
drwxrwxr-x 1 nobody nobody      6  8月 14  2015 Develop
drwxr-xr-x 1 nobody nobody      4  6月 18  2016 Documents
drwxrwxr-x 1 nobody nobody      4  3月 22  2015 Games
drwxrwxr-x 1 nobody nobody      8  2月 15 23:37 Media
drwxrwxr-x 1 nobody nobody     11 10月 29 22:23 Movies
drwxrwxr-x 1 nobody nobody     21 10月 30 01:26 Music
drwxrwxr-x 1 nobody nobody     15 12月  4 15:47 Photos
drwxr-xr-x 1 nobody nobody      5  5月 15  2016 Users
drwxrwxr-x 1 nobody nobody      5 10月 30 13:59 Virtual
drwxr-xr-x 1 nobody nobody      7  2月 11 22:00 Works

見えましたw

参考

CentOS7 で Mac で使っている外付けハードディスク (hfsplus) を読む

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
4