pitSTOP

Sorry, command-not-found has crashed!

Posted by: aneeska on: November 2, 2009

sorry

howto: Mirror using RAID Level 1

Posted by: aneeska on: October 29, 2009

Creating a Mirrored RAID array

$ mdadm –create /dev/mdX –level=1 –raid-devices=2 /dev/sdY /dev/sdZ

- sdY , sdZ : partitions/disks taking part in the mirroring. They could be anything depending upon your situation. For ex, sdY could be sdc1 and sdZ could be sdf2

- mdX : name of the RAID partition on to which the partitions sdZ and sdZ are associated

Once the command is successfully executed, mdX will be listed in “/proc/partitions” as a partition. This can now be mounted and used a normal EXT2/3 partition. Now the partitions sdY and sdZ will contain exactly the same data.

info : To know the mirroring status as well as the health of the RAID arrays, do “cat /proc/mdstat” from command line. Output of the command is self-explanatory (else refer man pages).

Stopping the raid array

$ mdadm –manage –stop /dev/mdX

 

Use only one of the disks of the array

The disk/partition sdY or sdZ will not be mountable by themselves using mount command. For that, “assemble” a raid array with any one of the disk which you want, as given below:

$ mdadm –assemble –run /dev/mdX /dev/sdY

or

$ mdadm –assemble –run /dev/mdX /dev/sdZ

 

Remove/Wipe out only RAID array information from a disk

To remove a RAID array configuration from the disks participating in RAID, use the “–zero-superblock” option removes the RAID information from the partitions and hence the partition will no longer will be recognized as a RAID component. Individual partitions (ex. mdY, mdZ) can be mounted afterwards and data will be preserved.

$ mdadm /dev/mdX –stop # stop RAID

$mdadm /dev/mdX –zero-superblock /dev/sdY

or

$ mdadm /dev/mdX –zero-superblock /dev/sdZ

 

Re-creating RAID array with the drives (sdY/sdZ) whose superblock has been zeroed

Use the command for creating the RAID array. It will ask whether to create array with partitions containing ext2fs. Answer yes and the RAID array will be recreated. Existing data in the partitions will be preserved.

 

– acknowledgements to my friend jk for the info


advertisement :

Ad_blumblum

howto: merge pdfs into one

Posted by: aneeska on: October 16, 2009

OS: Linux
Application : pdftk
Package : pdftk
Usage :

# pdftk 001.pdf 002.pdf cat output output.pdf

Open the file “/etc/ssh/sshd_config

and add this line, if it not there :

PermitTunnel yes

Restart the service “sshd

$ /etc/init.d/ssh restart

– This method of restarting is for debian/ubuntu releases

Then try establishing the tunnel. It will work. (Turn on verbose mode for “ssh”)

Thanks to : SSH_VPN page

fix: Failed to create listen socket on port 21 : Filezilla

Posted by: aneeska on: September 30, 2009

You have installed Filezilla server and tried to start it. From the logs, you find out that the following error has happened :

“FileZilla Server version 0.9.33 beta started
Initializing Server.
Creating listen socket on port 21…
Failed to create listen socket on port 21
Server not online.”

What to do ?

Reason

Port 21 is already being used. Thats why Filezilla server can’t bind on it.

Solution

1. Find out who is using it. Execute the following command in command prompt

$ netstat -abn

look for mention of “21″ in its output.

If you get “inetinfo.exe” associated with 21, it means that IIS server is running on your machine and he is listening on port 21. Disable IIS from running his FTP server.

2. Stop IIS FTP server

Control Panel -> Administrative Tools -> Internet Information Server -> right click on FTP -> Stop

source: noctunabsas


advertisement :

Ad_blumblum

tweeting is a way of life!