Archive

Archive for the ‘Storage’ Category

Secure Shell Filesystem

October 4th, 2009 No comments
Print Friendly, PDF & Email

sshfsIn this article, we are looking at SSHFS, the Secure Shell Filesystem. We can use it to mount a remote filesystem using the SSH Protocol.  So the information flowing between the two systems is completely encrypted. SSHFS is a client based application, so beside the SSH server, there is nothing to installed on the remote server to use it.  FUSE is a linux kernel module that allow non-privilege user to mount their own filesystem without the help of any kernel code. One of the interesting feature of SSHFS is that you can securely mount a filesystem over the internet, this is impossible with Samba and not very secure with NFS. If you like more information on SSHFS, you can visit the  SSHFS homepage and the Wiki of the SSHFS package. There is also a YouTube video that show how to use SSHFS on a Fedora system. For those interested in a windows version of sshfs, there is a free version available at the Dokan site, you need to install the Dokan Library first, then install SSHFS. I have done some simple test with it and I didn’t had any problem.

Installing fuse and fuse-sshfs

FUSE and FUSE-SSHFS use the ssh protocol, so SSH needs to be installed on our client system. The only required package on the remote system,  is “openssh” (may work with other version of ssh). The package FUSE and FUSE-SSHFS  don’t need to be install on the remote system, only on the local server.  The first thing we  need to do is to get the latest version the “fuse” at this page and “fuse-sshfs” packages from this page and install them on our local system. The package “fuse” is now part of the RedHat/Centos 5.4, but you still need to get “fuse-sshfs” cause it isn’t included. Should the other site be unresponsive, you can download the rpm from Linternux site.

RedHat/Centos 5 fuse-2.7.4-1.el5.rf.i386.rpm fuse-sshfs-2.2-5.el5.i386.rpm
RedHat/Centos 4 fuse-2.7.4-1.el4.rf.i386.rpm fuse-sshfs-2.2-1.el4.rf.i386.rpm
RedHat/Centos 3 fuse-2.7.4-1.el3.rf.i386.rpm fuse-sshfs-2.2-1.el3.rf.i386.rpm
Fedora 10 fuse-2.7.4-2.fc10.i386.rpm fuse-sshfs-2.2-5.fc10.i386.rpm
Fedora 11 fuse-2.7.4-3.fc11.i586.rpm fuse-sshfs-2.2-2.fc11.i586.rpm

# ls -l
total 296
-rw-rw-r-- 1 jacques jacques 255149 Sep  6 13:15 fuse-2.7.3-1.el5.rf.i386.rpm
-rw-rw-r-- 1 jacques jacques  43203 Sep  6 13:15 fuse-sshfs-1.9-1.el5.rf.i386.rpm

# rpm -ivh fuse*
warning: fuse-2.7.3-1.el5.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing...             ########################################### [100%]
1:fuse                   ########################################### [ 50%]
2:fuse-sshfs             ########################################### [100%]
#

Read more…

Categories: Network, Storage

Adding SAN disk without rebooting

June 23rd, 2009 2 comments
Print Friendly, PDF & Email

The production system is running, the database filesystem is almost full. We need more disk space on the server. The server is attached to the San so we can add disk without bringing down the server. In this article, we will demonstrate what is needed to make the new San disk available to the server without disturbing the running application. Although that theses commands have been tested and used on production environment,  I suggest that you build your confidence first, by trying them on a development system.

On Red Hat / Centos 5

In our example, we have presently one disk accessible via one fiber HBA on our server. We can use to “lsscsi” command to list our scsi device. If you do not have the command ‘lsscsi’ command installed, you can install it by issuing the following command “yum install lsscsi”.

Our server can see one disk at the moment ;

#  lsscsi
[0:0:0:0]    disk    HITACHI  OPEN-V           5009   /dev/sda

Let rescan our SCSI bus. Since we have only one fiber card in our server, we will scan only the first HBA (host0). If you have two fiber card, you may need to issue the “partprobe” command for the disk to be seen on the second interface.

# echo "1" > /sys/class/fc_host/host0/issue_lip

We now see the new SAN disk that was newly allocated to the system.

# lsscsi
[0:0:0:0]    disk    HITACHI  OPEN-V           5009   /dev/sda
[0:0:0:1]    disk    HITACHI  OPEN-V           5009   /dev/sdb

For other kind of SCSI attached storage, we should rescan the bus with this command :

# echo "- - -" > /sys/class/scsi_host/host0/scan   (First hba)
# echo "- - -" > /sys/class/scsi_host/host1/scan   (Second hba, if present)

Read more…

Categories: Storage