Linuxファイルサーバを廃止してWindowsのドライブにする準備

準備
  1. Linuxにvsftpdを入れる
  2. WinからFTP接続確認
  3. Linuxのfstabのバックアップ用ドライブ3つをコメントアウト
  4. Linux電源オフ
  5. Win電源オフ
  6. WinからBDドライブを取り外してSATAを1つ空ける
  7. Linuxから3つのHDDのバックアップ用ドライブを取り外す
  8. Linux電源オン

linuxにvsftpdを入れます。

# yum install vsftpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * Webmin: download.webmin.com
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
http://download.webmin.com/download/yum/repodata/repomd.xml: [Errno 4] IOError: 
Trying other mirror.
http://webmin.mirror.somersettechsolutions.co.uk/yum/repodata/repomd.xml: [Errno 4] IOError: 
Trying other mirror.
http://ftp.iij.ad.jp/pub/linux/centos/5.10/os/x86_64/repodata/repomd.xml: [Errno 4] IOError: 
Trying other mirror.
http://ftp.jaist.ac.jp/pub/Linux/CentOS/5.10/os/x86_64/repodata/repomd.xml: [Errno 4] IOError: 
Trying other mirror.
http://ftp.nara.wide.ad.jp/pub/Linux/centos/5.10/os/x86_64/repodata/repomd.xml: [Errno 4] IOError: 
Trying other mirror.
http://ftp.riken.jp/Linux/centos/5.10/os/x86_64/repodata/repomd.xml: [Errno 4] IOError: 

(略)

Trying other mirror.
Error: failure: repodata/filelists.xml.gz from Webmin: [Errno 256] No more mirrors to try.
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

エラーです。
DLが全然出来ません的なエラー。
ひょっとして先日ルータを変更したから外に出て行けてない?
確認してみます。

# ping yahoo.jp
ping: unknown host yahoo.jp

出ていけてません。
DNSの設定とかがダメな感じな気がします。
Webminから設定します。

Networking > Network Configuration

Netmaskが指定されてません

Netmaskを 255.255.255.0 に設定

DNS Servers が指定されてません

DNS Servers に192.168.0.1 に設定

Routing and Settings にそれっぽいものがありません

Default Routes に eth0 192.168.0.1 を追加

ネットワーク設定を全て反映

イケました。

# ping yahoo.jp
PING yahoo.jp (124.83.219.204) 56(84) bytes of data.
64 bytes from yjpn100.mobile.vip.ogk.yahoo.co.jp (124.83.219.204): icmp_seq=1 ttl=49 time=15.0 ms
64 bytes from yjpn100.mobile.vip.ogk.yahoo.co.jp (124.83.219.204): icmp_seq=2 ttl=49 time=15.9 ms
64 bytes from yjpn100.mobile.vip.ogk.yahoo.co.jp (124.83.219.204): icmp_seq=3 ttl=49 time=15.4 ms

--- yahoo.jp ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 15.092/15.504/15.982/0.380 ms

では再びインストール

# yum install vsftpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * Webmin: download.webmin.com
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Webmin                                                                                                                                   |  951 B     00:00
base                                                                                                                                     | 1.1 kB     00:00
extras                                                                                                                                   | 2.1 kB     00:00
mondorescue                                                                                                                              | 1.2 kB     00:00
mondorescue/primary                                                                                                                      |  54 kB     00:01
mondorescue                                                                                                                                             295/295
updates                                                                                                                                  | 1.9 kB     00:00
updates/primary_db                                                                                                                       | 115 kB     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:2.0.5-28.el5 set to be updated
Webmin/filelists                                                                                                                         | 9.2 MB     01:08
base/filelists                                                                                                                           | 3.7 MB     00:04
extras/filelists_db                                                                                                                      | 224 kB     00:00
mondorescue/filelists                                                                                                                    |  43 kB     00:00
updates/filelists_db                                                                                                                     | 513 kB     00:00
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================
 Package                              Arch                                 Version                                     Repository                          Size
================================================================================================================================================================
Installing:
 vsftpd                               x86_64                               2.0.5-28.el5                                base                               143 k

Transaction Summary
================================================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 143 k
Is this ok [y/N]: y
Downloading Packages:
vsftpd-2.0.5-28.el5.x86_64.rpm                                                                                                           | 143 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : vsftpd                                                                                                                                   1/1

Installed:
  vsftpd.x86_64 0:2.0.5-28.el5

Complete!

無事インストール完了。
起動します。

# service vsftpd start
vsftpd 用の vsftpd を起動中:                               [  OK  ]

設定とかしないでアクセスしてみますが繋がりませんでした。
どうせ一時的にしか使わないのでノンセキュリティな感じにします。

ユーザの制限とtcp_wrappersの設定を外します。

# vi /etc/vsftpd/vsftpd.conf

#userlist_enable=YES
#tcp_wrappers=YES

制限ユーザからrootを外します。

# vi /etc/vsftpd/ftpusers

#root

これでFTPサーバを再起動します。

# service vsftpd restart
vsftpd を停止中:                                           [  OK  ]
vsftpd 用の vsftpd を起動中:                               [  OK  ]

やってみたら接続できました。

では起動時にドライブがマウントされないようにしておきます。

# vi /etc/fstab

LABEL=00main            /var/storage/00/main    ext3    defaults        0 0
#LABEL=00mirror          /var/storage/00/mirror  ext3    defaults        0 0
LABEL=01main            /var/storage/01/main    ext3    defaults        0 0
#LABEL=01mirror          /var/storage/01/mirror  ext3    defaults        0 0
LABEL=02main            /var/storage/02/main    ext3    defaults        0 0
#LABEL=02mirror          /var/storage/02/mirror  ext3    defaults        0 0

電源を切って物理的な作業をします。

コメント