この記事の監修:宮崎智広(Linux実務・教育歴20年以上・受講者3,100名超)
その際、NTFSフォーマットのUSB外付けHDDを利用する際の注意手順も紹介します。
でも安心してください。プロのエンジニアはコマンドを暗記していません。
「現場で使える型」を効率よく使いこなしているだけです。
LinuxにUSB外付けHDDを接続
1.messagesファイルのログをリアルタイムで表示します。
# tail -f /var/log/messages
2.USB外付けHDDを接続しデバイス名が表示されるか確認します。
下記ログが表示され、カーネルにUSB外付けHDDが認識されることが分かります。
しかし、例では自動で割り当てるはずのデバイス名が割当られません。
その場合、Windows用のNTFSフォーマットが読み込めないのが原因になります。
引き続き、
「3.NTFSフォーマットHDDを読み込めるようにする」以降の作業を行ってください。
デバイス名が表示される場合は、
「8.messagesファイルのログをリアルタイムで表示しつつ、USB外付けHDDを再度接続する」
から参照してください。
Mar 3 17:45:18 Tiger kernel: usb 1-1: new high-speed USB device number 2 using ehci-pci
Mar 3 17:45:18 Tiger kernel: usb 1-1: device descriptor read/64, error 18
Mar 3 17:45:19 Tiger kernel: usb 1-1: device descriptor read/64, error 18
Mar 3 17:45:19 Tiger kernel: usb 1-1: new high-speed USB device number 3 using ehci-pci
Mar 3 17:45:19 Tiger kernel: usb 1-1: device descriptor read/64, error 18
Mar 3 17:45:20 Tiger kernel: usb 1-1: device descriptor read/64, error 18
Mar 3 17:45:20 Tiger kernel: usb usb1-port1: attempt power cycle
Mar 3 17:45:20 Tiger kernel: usb 1-1: new high-speed USB device number 4 using ehci-pci
Mar 3 17:45:20 Tiger kernel: usb 1-1: Invalid ep0 maxpacket: 9
Mar 3 17:45:20 Tiger kernel: usb 1-1: new high-speed USB device number 5 using ehci-pci
Mar 3 17:45:20 Tiger kernel: usb 1-1: Invalid ep0 maxpacket: 9
Mar 3 17:45:20 Tiger kernel: usb usb1-port1: unable to enumerate USB device
3.NTFSフォーマットHDDを読み込めるようにする
epel-releaseリポジトリを追加します。
# yum install epel-release
読み込んだプラグイン:fastestmirror, langpacks
Determining fastest mirrors
* base: ftp.riken.jp
* extras: ftp.riken.jp
* updates: ftp.riken.jp
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/4): base/7/x86_64/group_gz | 165 kB 00:00:00
(2/4): extras/7/x86_64/primary_db | 159 kB 00:00:00
(3/4): updates/7/x86_64/primary_db | 6.7 MB 00:00:03
(4/4): base/7/x86_64/primary_db | 6.0 MB 00:00:11
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ epel-release.noarch 0:7-11 を インストール
--> 依存性解決を終了しました。
依存性を解決しました
4.ntfs-3gのインストールを実行するも原因不明のエラーが発生
NTFSを読み込めるようにするntfs-3gのインストールを実行するもエラーが発生。
エラーが発生しない場合は、
「7.再度ntfs-3gのインストールを実行」から参照してください。
# yum install ntfs-3g
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
One of the configured repositories failed (不明),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable
or
subscription-manager repos --disable=
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=
Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
[root@Tiger ~]#
5.デバックモードで「yum」を実行
「URLGRABBER_DEBUG=1」を付けてデバックモードでエラー原因調査を行います。
結果、ファイアウォールのポート443が塞がっているのが原因と判明
# URLGRABBER_DEBUG=1 yum install ntfs-3g
2020-03-03 17:53:29,828 urlgrabber version = 3.10
2020-03-03 17:53:29,828 trans function "_" =
2020-03-03 17:53:29,873 combined options: {
'delegate' : {
'async' : None,
'bandwidth' : 0,
'cache_openers': True,
'checkfunc' : None,
'close_connection': 0,
'copy_local' : 0,
'curl_obj' : None,
'data' : None,
'default_speed': 1000000.0,
'delegate' : None,
'failfunc' :
〜中略〜
2020-03-03 17:53:30,500 opening local file "/var/cache/yum/x86_64/7/epel/metalink.xml.tmp" with mode wb
* About to connect() to mirrors.fedoraproject.org port 443 (#14) ←原因
* Trying 209.132.181.15...
* After 14993ms connect time, move on!
* Trying 8.43.85.67...
* After 7495ms connect time, move on!
* Trying 209.132.181.16...
* After 3746ms connect time, move on!
* Trying 13.250.126.156...
* After 1874ms connect time, move on!
6.ファイアウォールのポート443を開ける
サーバーにポート443で接続できるよう
関係のあるファイアウォール開けてください。
7.再度ntfs-3gのインストールを実行
# yum install ntfs-3g
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 8.3 kB 00:00:00
* base: ftp.riken.jp
* epel: ftp.riken.jp
* extras: ftp.riken.jp
* updates: ftp.riken.jp
base | 3.6 kB 00:00:00
epel | 5.3 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/3): epel/x86_64/group_gz | 90 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(3/3): epel/x86_64/primary_db | 6.7 MB 00:00:00
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ ntfs-3g.x86_64 2:2017.3.23-11.el7 を インストール
--> 依存性解決を終了しました。
依存性を解決しました
<PR>手元に置いて学びを深める1冊
本気で学ぶ Linux実践入門 サーバ運用のための業務レベル管理術
まず無料メルマガで学ぶのが第一歩、加えて手元に置くなら本書。ディスク追加・マウント設定・fstab設定など現場で使えるLinuxサーバー管理の実践スキルが習得できます。
3,100名以上が実践した「型」を無料で公開中
プロのエンジニアはコマンドを暗記していません。
「現場で使える型」を効率よく使いこなしているだけです。
その「型」を図解60Pにまとめた入門マニュアルを、完全無料でプレゼントしています。
姓・名・メールの3つだけ/30秒/解除は3秒 / 詳細はこちら
- 次のページへ:サポート終了したCentOS5をアップデートする
- 前のページへ:RHEL7/CentOS7が重要カーネルセキュリティアップデートをリリース【CVE-2019-14821/CVE-2019-15239】
- この記事の属するカテゴリ:Linuxエラー対処法・Linux情報・技術・セキュリティへ戻る

無料メルマガで学習を続ける
Linuxの実践スキルをメールで毎週お届け。
登録は30秒、解除もいつでも可。
登録無料・いつでも解除できます