Search posterous

Search all posts and users. Type a name, type a favorite song title, whatever! See what comes up.
  

More posterous blogs











More recommended blogs »

Here are posterous posts filed under linux...

Tortue says...

Android is plateform that I strongly support as a business and I believe in it (but I'm not a fan yet of the current UI's). Gameloft is not really agree with that and it's perfectly understandable as Google is playing the "I've done my part of the job, now it's your (the dev) turn" game and seems not having done enough to “entice customers to actually buy products” on the google's marketplace. The lack of a desktop store (à la iTunes, Do you think it can be made by a third party ?) is one of many example (even though most of the App on the iPhone are bought directly from the phone itself).

But what does core developers think about the platform (I work with dev all day long but I'm not one of them)? Few weeks ago, the Embedded Linux Conference Europe was held in the French city of Grenoble and one of the presentation was named "Android Mythbuster" 

This talk examines the myths and realities of the Android Operating System. Android has achieved an amazing level of anticipation and media coverage largely due to Google's backing. However, much of the technical and mainstream media coverage has led people to misunderstand the technology behind Android. In this session, we will explore the Android Open Source Project (AOSP), examine the AOSP developer community, and learn why Android is not "Linux". The discussion will cover the challenges involved in developing Android- based devices and porting Android to the MIPS architecture.

Matt Porter started contributing to Linux as an early Debian GNU/Linux developer. He has developed and maintained support for embedded systems in the mainline kernel including PowerPC VME/cPCI systems, PowerPC 4xx, and the RapidIO subsystem.
Matt led the Linux effort at Motorola Computer Group and later joined MontaVista Software as the founding member of the Arizona engineering center. He joined with other embedded Linux veterans to found Embedded Alley and now works on embedded Linux and Android product architecture.

And as Harald Welte says in his blog about Matt Porter and the presentation:

As you may know, Matt Porter was heavily involved in the MIPS and PPC ports of Android, so he and his team have seen the lowest levels of Android, more and deeper than even cellphone manufacturers ever have to look into it.

He continues: 

The presentation shows how Google has simply thrown 5-10 years of Linux userspace evolution into the trashcan and re-implemented it partially for no reason. Things like hard-coded device lists/permissions in object code rather than config files, the lack of support for hot-plugging devices (udev), the lack of kernel headers. A libc that throws away System V IPC that every unix/Linux software developer takes for granted. The lack of complete POSIX threads. I could continue this list, but hey, you should read those slides. now!

Indeed these slides are a must read but I still wonder (yeah I don't have all the answers, I'm in the business since few months only after all) how this particular architecture will affect Android both on the development and the users side.

Filed under: Linux

Paul says...

Upgrading my laptop to Karmic went with only two hitches. The first was the return of the abhorrent NetworkManager. I had to reinstall wicd via a thumb drive. The second was the return of KDM.

Since I avowed in a previous post that I use KDE for lack of a better choice, I tried out E17 again (as I do from time to time) and found that it had improved to the point where I was comfortable using it full-time. (I may write something soon about how I got it working.) I also switched to Entrance, the Enlightenment login manager—easily done with BUM. But Karmic substitutes a new init system, Upstart, which renders BUM useless.

Upstart keeps its configuration in /etc/init, in a series of .conf files, including one for KDM. The syntax is fairly simple, so I combined the useful parts of kdm.conf with the useful parts of the /init.d/entrance script and came up with an entranced.conf that seems to work.

 

# entranced - Launch Entrance Display Manager # Based on kdm.conf from Ubuntu Karmic.
description "Enlightenment Login Manager"

# configuration variables env DAEMON=/opt/e17/sbin/entranced

# let upstart handle PID expect fork

start on (filesystem
and started hal
and tty-device-added KERNEL=tty7
and (graphics-device-added or stopped udevtrigger))
stop on runlevel [016]

emits starting-dm

respawn

script

# kernel command-line inhibitor? for ARG in $(cat /proc/cmdline); do
case "${ARG}" in
text|-s|s|S|single)
exit 0
;;
esac
done

if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
elif [ -r /etc/environment ]; then
. /etc/environment
export LANG LANGUAGE
fi

# fail on error set -e

# does daemon exist? test -x $DAEMON || exit 0

echo -n "Becoming entranced: entrance"
initctl emit starting-dm DM=entranced

esd &
exec $DAEMON

end script

/opt/e17/sbin/entranced is the location used by Easy_e17.sh. If you installed E17 otherwise, substitute the appropriate location.

Put this in /etc/init/entranced.conf, move /etc/init/kdm.conf to /etc/init/kdm.dont (anything not ending in .conf is skipped), and Entrance works perfectly.

That was really much easier than I thought it would be.

Filed under: linux

remz says...

Image editing tool GIMP is to be dropped from the default installation of Ubuntu 10.04 Lucid Lynx.

There are a number of reasons cited for this change:

  • the general user doesn’t use it
  • its user-interface is too complex
  • it’s an application for professionals
  • desktop users just want to edit photos and they can do that in F-Spot
  • it’s a photoshop replacement and photoshop isn’t included by default in Windows…
  • it takes up room on the disc

I am disappointed by Canonical's decision to drop GIMP from the default installation. I agree that users can install it using Ubuntu Software Center or apt-get if they want to. Canonical thought this is a better approach than shoving the huge software package down every user's throat. They are probably right.

But what about those users who are trying out Linux for the first time? For most newbies, Ubuntu is the first taste of Linux and some of them (like me) will stick to it. Several of my friends, whom I have recommended Ubuntu, are regular/semi-regular users of Photoshop and one of the first apps they've tried out in Ubuntu is GIMP. Not many liked it but in most of the cases, they agreed that it could get the job done.

Once GIMP is removed from the Live CD or the default installation, it becomes more difficult to pitch Ubuntu to such people.

Moreover, F-Spot, the app supposed to handle the basic image editing needs, and I don't get along too well.

Filed under: linux

bharathi says...

grep -- (Global Regular Expression Print) Print lines matching a pattern

Summary:
`grep' searches the input files for lines containing a match to a given pattern list. Grep has a no .of useful options, character classes and support regular expressions.

Examples:

 
$ grep -i bharathi Midas.txt -- Print the lines which contains the 
string "bharathi" in the Midas.txt file.
 
$ grep -v bharathi ILUGC.txt -- Print the line which is not the
string "bharathi".
 
$ grep -A 2 "ram" file -- Along with matching line, prints the next
2 lines. 
 
$ grep -B 2 "siva" file -- Along with matching line, prints the
previous 2 lines. 
 
$ grep -C 2 "rupa" file -- Along with matching line, prints the 
previous and next 2 lines. 
 
$ grep -n "vijay" file -- Print the matching lines with its
line number. 
 
$ grep -c "Linux" file -- Prints count of match. 
 
$ grep -w "is" file -- Match the whole word only. Match "is",
but not "this". 
 
$ grep "^A" file -- Prints the line starting with A. 
 
$ grep "Z$" file -- Prints the line with ending letter Z. 
 
$ grep '^[012]' file -- Prints the line starting with 0/1/2. 
 
$ grep -E "Linux|Unix" file -- Print the lines containing "Linux"
or "Unix". 

Read : info grep / egrep / fgrep

Filed under: linux

jazzy says...

It´s simple, just a thought. I´m agree that, most of the part, we are on internet. Very good to become an "conditional" Open Source project, lovely thing than Canonical works together with the big G, around the project, but: Do you want an "ubuntized" world?....

Dont create an iso file for simple download is a mess...

In some point, the GNU and the Linux itself project, are outside the show. Reason?: People will think that they are use Google OS, but no Open Source Software.
I don´t like this kind of world....really.... Could be more honest, make a move like Moblin, lettin all the distros work together in a common UI interface...

Intel, in spite of this, I don´t like their politics, was too much fair like OLPC project and Chrome OS.

We cannot speculate the use of a netbook. Limitations creates rejection.
Could be more useful work with a project like Cairo Shell, to transform Windows Shell, and Linux shell?....

mmmm.....some weird posibilities are coming...

P.

Filed under: linux

sinantr says...

$ rsync -av --stats  /home/test/yedek  /home/test/hedef

-a arşivleme
-v verbose tümleşik
--stats istatislik verir
--delete yedekteki silinen dosya hedeften silinir
-------------------------------------------------------

Başka bir sunucudan alma yada gönderme

rsync -av --delete --stats -e ssh root@makine:/home/test/deneme  /home/test/test

makinedeki denim dizinini yerel deki home da test dizini altına koplayar test dizini yok ise test dizini açar.

Filed under: linux

sinantr says...

Üzerinde CentOS (RHEL ya da Fedora da olabilir) kurulu olan bilgisayarınıza,  yeni bir disk eklemeniz gerekirse duruma göre izleyebileceğiniz iki yol bulunmaktadır. Birincisi; eğer CentOS, LVM (Logical Volume Management) kullanıyorsa, takacağınız yeni diski LVM’ye dahil ederek varolan disk bölümünü  genişletmektir. İkinci yol ise, (LVM kullanmamanız ya da partisyon genişletme işlemini tercih etmemeniz durumunda) ilgili diski yeni bir partisyon olarak sisteme eklemektir.

Bu makale, LVM yapısına yeni bir disk ekleyerek, mevcut disk partisyonlarını değiştirmeksizin online kapasite arttırımının nasıl yapılabileceği ve LVM kullanılmaması durumunda gene ikinci bir diskin, bu sefer yeni bir disk partisyonu olarak eklenerek mount edilmesini anlatan iki ana başlıktan oluşmaktadır.

[Yöntem - 1] LVM Yapısına Yeni Bir Disk Eklemek

Bildiğiniz gibi bir çok Linux dağıtımı  (RHEL 4 ve sonrası, CentOS, Fedora, Suse 9 ve sonrası) LVM (Mantıksal Hacim Yönetimi) denilen güzel bir sistem kullanmaktadır; ve LVM çoğu dağıtımın default kurulumunda kullanılmaktadır.

LVM, sistem üzerinde disk kümesi ya da kümeleri oluşturmaya olanak sağlayan bir disk yönetim sistemidir. LVM kullanarak, mevcut disk bölümü üzerinde online olarak yeniden boyutlandırma yapılabilir.

Elinizde default olarak kurulmuş bir CentOS varsa, disk yönetimi LVM üzerinden yapılıyor demektir. Bu durumda, yeni diski halihazırda yapılandırılmış olan LVM’ye dahil edebilir, böylece varolan disk bölümünün genişletilmesini sağlayabilirsiniz.

Örneğin, üzerinde 80GB’lik tek bir disk bulunan bir CentOS’unuz var ve  diskin tümü sistemin kök dizini (/) için kullanılan tek bir disk bölümüne ayrılmış olsun (CentOS’u default kurduysanız durum bu olacaktır.)  Zaman içinde 80GB’lik alanın yetmemeye başlarsa LVM imdadınıza yetişir ve bilgisayara takılan ikinci bir diskin var olan disk bölümüne eklenmesine olanak sağlar. Böylece daha önceden 80GB olan kök dizininiz ikinci bir 80′lik diskin eklenmesi ile 160GB’ye çıkabilecektir.

Kısaca LVM birden fazla diski tek bir disk bölümü olarak kullanmanıza olanak sağlayacaktır.  Bu nedenle LVM disk yönetim işlemlerinde çok büyük kolaylıklar sağlamaktadır.

Uygulama

Bu işlemi aşağıdaki yönergeleri izleyerek kolayca yapabilirsiniz.

UYARI: Disk yapılandırma işlemleri, ne yaptığınızı tam olarak bilmemeniz durumunda, datanızın kaybolması ile sonuçlanabilecek problemlere neden olabilir. Dolayısı ile burada anlatılan işlemleri üretim ortamında çalışan bir sunucu vs. üzerinde denemeden önce test ortamınızda denemenizi tavsiye ederim.

İşleme başlamadan önce LVM ile ilgili biraz daha teorik bilgi vermek yerinde olacaktır. Zira yazıda LVM ile ilgili bir çok terim geçecektir.

Yukarıda da tekrarladığım gibi disklerin kümelendirilmesine olanak sağlayan bir sistem olan LVM’nin mantığı şu şekildedir.

LVM, Volume Group (VP) denilen bir volüm (hacim) gurubu ve bu guruba dahil edilmiş Physical Volume (PV) denilen fiziksel volumlerden ve Logical Volume (LV) denilen mantksal volümlerden oluşur. Bu terimlerin mealleri şöyledir:

  • Volume Group (Hacim Gurubu): En üstte bulunan bu katman, fiziksel ve mantıksal volüm’leri içine almaktadır. Yani fiziksel disklerin kümelendiği alan burasıdır.
  • Physical Volume (Fiziksel Hacim): PV ise fiziksel aygıtlardan (disk) ve disk bölümlerinden oluşan kısımdır.
  • Logical Volume (Mantıksal Hacim): LV olarak kısaltılan bu terim, disk ve ya disk bölümlerinin formatlanmasından sonra ortaya çıkan dosya sistemi içeren (mesela ext3 ile formatlanmış kök dizini /) yapıya verilen isimdir.

Yani var olan bir LVM’ye yeni bir disk eklemek isterseniz,  önce yeni bir disk bölümü (partition) oluşturmalı  sonra bu disk bölümü için yeni bir fiziksel volüm oluşturup en tepedeki volüm grubuna dahil etmelisiniz. Sonrasında da var olan mantıksal volümü yeni disk bölümünü kapsayacak şekilde genişletmelisiniz.

Bizim yapacağımız da tam olarak budur.

İşte işlem adımları:

Diski Sisteme Takın ve Durumdan Emin Olun

Öncelikle, diskinizi bilgisayara takıp sistemin bu yeni diski gördüğünden emin olun. Bu iş için dmesg log dosyasına göz atabilirsiniz:

[root@lvm ~]# more /var/log/dmesg

Ben test ortamı olarak üzerinde CentOS 5.2 kurulu ve 15GB’lik tek bir diske sahip bir vmware guest kullandım, bu gueste 10GB boyutunde yeni bir disk ekledikten sonra disklerle ilgili dmesg çıktısı şu şekilde oluştu.

hda: VMware Virtual IDE Hard Drive, ATA DISK drive hdb: VMware Virtual IDE Hard Drive, ATA DISK drive hdc: VMware Virtual IDE CDROM Drive, ATAPI CD/DVD-ROM drive hda: max request size: 128KiB hda: 31457280 sectors (16106 MB) w/32KiB Cache, CHS=33288/15/63, UDMA(33) hda: hda1 hda2 hdb: max request size: 128KiB hdb: 20971520 sectors (10737 MB) w/32KiB Cache, CHS=22192/15/63, UDMA(33) hdb: unknown partition table

Mavi ile belirtilen satırlarda da görüldüğü gibi, yeni disk hdb ismi ile sistem tarafından tanınmış durumda. Ancak henüz herhangi bir disk bölümleme işlemi yapılmadığı için “unknow partition table” uyarısı verilmiş.

Not: Disklerin SCSI olması durumunda, disk isimleri sda, sdb vs. olarak görüntülenecektir. Dolayısı ile aşağıda verilen komutları kendi disk isminize göre düzenledikten sonra çalıştırın.

Şimdi pvscan komutunu çalıştırarak halihazırdaki fiziksel volume durumuna bakalım.

[root@lvm ~]# pvscan PV /dev/hda1 VG VolGroup00 lvm2 [14.88 GB / 0 free] Total: 1 [14.88 GB] / in use: 1 [14.88 GB] / in no VG: 0 [0 ]

Görüldüğü gibi VolGroup00 isimli volume grubuna (VG), fiziksel volume (PV) olarak sadece 1. disk olan hda diski  dahil durumda.

Buradaki VG disk ya da disklerden oluşan Volüm Grubunu Temsil ediyor, PV olarak geçen fiziksel volüm ise fiziksel disk ya da disk bölümlerini temsil ediyor. Benim örneğimde 15GB’lik 1. diskin hepsi fiziksel volume olarak eklenmiş durumda.

df çıktısı ise şöyle:

[root@lvm ~]# df -h Filesystem            Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 14G  1.1G   13G   8% / /dev/hda1              99M   18M   77M  19% /boot tmpfs                 125M     0  125M   0% /dev/shm

Default bir CentOS kurulumunda oluşan bir disk bölümleme yapısında, kök dizini (/) VolGroup00 volüm grubuna dahil LogVol00 isimli bir Logical (Mantıksal) Volüm’e atanmış.

Fdisk ile Yeni bir Disk Bölümü (Partition) oluşturmak

Takip edilecek ikinci adım, yeni takılan disk için fdisk kullanarak bir disk bölümü oluşturmaktır. Yeni diskin sadece bir kısmını disk bölümü olarak tanımlayabileceğiniz gibi, bu örnekte yapıldığı şekli ile diskin hepsini tek bir bölüm olarak tanımlayabilirsiniz.

Sistemin hdb olarak gördüğü disk için bir disk bölümü oluşturalım:

[root@lvm ~]# fdisk /dev/hdb

Açılan komut satırında takip etmeniz gereken adımlar şunlar.

  1. Önce  “add new partition” anlamına gelen n tuşuna basın.
  2. İkinci adımda, bölümün primary mi extended mi olacağı sorulacaktır. p diyin.
    (Aslında extended olması için e tuşuna da basabilirsiniz.)
  3. Bölüm numarasını 1 olarak belirleyin. (2, 3, 4 de diyebilirsiniz.)
  4. Bu adımda, diskin başlangıç ve biriş noktalarının ne olmasını istediğiniz sorulacaktır, enter diyerek default değerlerle devam edin.
  5. Bölüm oluşturulduktan sonra  t tuşuna basıp ilgili disk bölümünün tipini LVM olarak set etmek için 8e yazıp enter’a basın.
  6. En son olarak w tuşuna basıp yapılan değişikliğin partisyon tablosuna kaydedilmesini sağlayarak çıkın.

Disk bölümü oluşturuldu.  İlgili disk bölümünü /dev dizini altında görebilirsiniz. Çıktı şuna benzer olarak görüntülenmelidir.

[root@lvm ~]# ls -l /dev/hdb* brw-r----- 1 root disk 22, 65 May 14 15:10 /dev/hdb brw-r----- 1 root disk 22, 66 May 14 15:10 /dev/hdb1 

Görüldüğü gibi disk bölümü hdb1 ismi ile oluşturulmuş durumda. Dolayısı ile bir sonraki adıma geçebiliriz.

Physical Volume (Fiziksel Hacim) Oluşturma

Şimdi /dev altında bulunan hdb1 disk bölümünü fiziksel bir volüme çeviriyoruz.

[root@lvm ~]# pvcreate /dev/hdb1

Böylece, volüm grubuna eklenebilecek bir fiziksel volüm elde ettik.
Sıradaki adıma geçebiliriz.

Yeni Physical Volumü, Volüm Grubuna Eklemek

Benim test için kullandığım vm guest’in üzerindeki CentOS tamamen default kuruluma sahip, daha önce default kurulumlarda disk yapılandırması için LVM kullanıldığını söylemiştim. İişte  bu tip kurulumlarda, Volum Group’un ismi VolGroup00 olarak veriliyor. Ancak volüm grubunuzun ismi değişik olabilir, bu nedenle vgdisplay komutundan yararlanım, tam ismi öğrenebilirsiniz.

[root@lvm ~]# vgdisplay   --- Volume group ---   VG Name               VolGroup00   System ID   Format                lvm2   Metadata Areas        1   Metadata Sequence No  3   VG Access             read/write   VG Status             resizable   MAX LV                0   Cur LV                2   Open LV               2   Max PV                0   Cur PV                1   Act PV                1   VG Size               14.88 GB   PE Size               32.00 MB   Total PE              476   Alloc PE / Size       476 / 14.88 GB   Free  PE / Size       0 / 0   VG UUID               Z3jhaS-XzOJ-py5H-KofF-qnZV-ZAcN-VcPwm2

Görüldüğü gibi volüm grubunun ismi VolGroup00 olarak geçiyor ve VG size 1. diskimizin total boyutu olan 15GB, bu durumda aşağıdaki komut ile hdb1 fiziksel volum’u VolGroup00 dölümüne ekleyeceğiz:

[root@lvm ~]# vgextend VolGroup00 /dev/hdb1

Artık volume group’u iki adet disk dahil olmalı. Durumu kontrol etmek için pvscan komutunu kullanalım.

[root@lvm ~]# pvscan   PV /dev/hda1   VG VolGroup00   lvm2 [14.88 GB / 0    free]   PV /dev/hdb1   VG VolGroup00   lvm2 [9.97 GB / 9.97 GB free]   Total: 2 [24.84 GB] / in use: 2 [24.84 GB] / in no VG: 0 [0   ]

Komutun çıktısında da görüldüğü üzere, VolGroup00′a iki adet PV (fiziksel volüm) dahil durumda.
Yeni disk bölümüni volüm gruba dahil ettiğimize göre artık bu yeni disk alanını (PV) eski disk alanıyla birleştirebiliriz.

Yeni Disk Alanını, Logical Volüm’e Dahil Etmek

Şimdi elimizde, volum gruba dahil edilmiş 10GB ( tam olarak 9.97 GB) büyüklüğünde bir disk space var. Bu disk space’i bilgisayarın kök dizinini (/) barındıran Logical Volüm’e dahil edeceğiz. Bu işi yapabilmek için Logical Volüm’ün ismini bilmeniz gerekir. Daha önceden yukarıda verilmiş olan df çıktısına tekrar bakarsak bu ismi öğrenebiliriz.

[root@lvm ~]# df -h Filesystem            Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 14G  1.1G   13G   8% / /dev/hda1              99M   18M   77M  19% /boot tmpfs                 125M     0  125M   0% /dev/shm

Mavi olarak işaretlenen ibarede görüldüğü üzere root (/) dizinini tutan logical volumü’ün ismi LogVol00 (default isim).

İsmi öğrendiğimize göre,  yeni disk alanını buraya ekleyebiliriz.

[root@lvm ~]# lvextend -L+9.97G /dev/VolGroup00/LogVol00

Not: Dikkat ettiysenize 10GB’lik disk alanım olmasına rağmen logical volüm’e ekleme işleminde 9.97GB ibaresini kullandım. (pvscan komutunun çıktısında hdb1 diski için 9.97GB belirtiliyordu.) Bunun nedeni disk blocklarından yola çıkılarak yapılan hesaptır. Dolayısı ile sisteminize 40GB disk ekleyip extend işlemini tam 40GB olacak şekilde yapamayabilirsiniz. Kendi diskinizin tam size’ını öğrenmek için pvscan komutunun çıktısını inceleyiniz.

Artık, son adıma geçebiliriz.

Dosya Sisteminin Online Olarak Yeniden Boyutlandırılması

Son olarak yapılması gereken iş, hali hazırda 15GB olarak görünen root (/) dizinine ait logical volüm’ü yeni eklediğimiz diski de kullanabilmesi için  yeniden boyutlandırmaktan ibaret.

Dosya sistemini yeniden boyutlandırmak için kullanılması gereken komut, hangi dosya sisteminin kullanıldığı ile alakalıdır. Eğer ext3 dosya sistemi kullanıyorsanız, resize2fs ya da ext2online komutlarından biri ile yapabilirsiniz. Örneğin eğer sisteminiz reiserfs ise de resize_reiserfs komutunu kullanabilirsiniz. Dediğim gibi ben default kurulmuş bir CentOS 5.2 kullanıyorum ve bunun için  resize2fs kullanacağım.

Komut şu şekilde:

[root@lvm ~]# resize2fs /dev/VolGroup00/LogVol00

Bu komut ile dosya sistemi online olarak yeniden boyutlandırılır ve sonuç olarak aşağıdaki gibi bir çıktı alırsınız.

resize2fs 1.39 (29-May-2006) Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required Performing an on-line resize of /dev/VolGroup00/LogVol00 to 6258688 (4k) blocks. The filesystem on /dev/VolGroup00/LogVol00 is now 6258688 blocks long.

İşlem tamamlandı;  şimdi tekrar df komutu ile disk durumunu kontrol edelim.

[root@lvm ~]# df -h Filesystem            Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 24G  1.1G   21G   5% / /dev/hda1              99M   18M   77M  19% /boot tmpfs                 125M     0  125M   0% /dev/shm

Evet görüldüğü gibi root dizini artık toplamda 24GB. Böylece LVM sayesinde iki adet fiziksel diski tek bir disk bölümü için kullanmış olduk.
LVM yapısı gerçekten de yüksek disk kapasitesi gerektiren her türlü durumda, epey kullanışlı bir sistem.

Son olarak LVM olmaksızın izleyebileceğiniz diğer bir yöntemden bahsedeceğim.

[Yöntem - 2]  Diski Ayrı Bir Bölüm Olarak Mount Etmek

Yeni diski sisteminize LVM’ye dahil etmeden, yeni bir disk bölümü olarak da kullanmak isteyebilirsiniz. Örneğin, yeni diski sacece backup amaçlı kullanmak istiyor ve bu diski yedekleme işleminden sonra bilgisayardan çıkartmak istiyor olabilirsiniz ya da işletim sisteminizin LVM desteği yoktur. İşte böyle durumlar için basitçe, yeni diski yeni bir disk bölümü olarak sisteme ekleyerek mount etme yolunu seçebilirsiniz.

Bu yöntemde, basitçe, fdisk ile yeni bir disk bölümü oluşturacağız ve ext3 dosya sistemi kullanacak şekilde formatladıktan sonra /mnt altında disk2 ismi ile mount edeceğiz ve sistem açılışlarında otomatik mount edilmesi için bu disk partisyonunu fstab dosyasına ekleyeceğiz.

UYARI: Disk yapılandırma işlemleri, ne yaptığınızı tam olarak bilmemeniz durumunda, datanızın kaybolması ile sonuçlanabilecek problemlere neden olabilir. Dolayısı ile burada anlatılan işlemleri üretim ortamında çalışan bir sunucu vs. üzerinde denemeden önce test ortamınızda denemenizi tavsiye ederim.

İşe başlamadan önce, diski taktıktan sonra diskin sistem tarafından algılandığına emin olun. Bu işlem için, yukarıda anlatılan birinci yöntemin ilk maddesine bakabilirsiniz.

Fdisk ile Disk Bölümü (Partition) Oluşturmak

Benim test makinamda yeni IDE diskin ismi hdb olarak geçmekte ve bu diskin hepsini kullanarak tek bir partition oluşturacağım bu nedenle komutu şu şekilde çalıştırıyorum:

[root@lvm ~]# fdisk /dev/hdb

Açılan komut satırında takip etmeniz gereken adımlar şunlar.

  1. Önce  “add new partition” anlamına gelen n tuşuna basın.
  2. Bölümün primary olacağını belirtmek için p tuşuna basın. (Aslında extended olması için e tuşuna da basabilirsiniz.)
  3. Bölüm numarasını 1 olarak belirleyin.
  4. Diskin başlangıç ve biriş noktalarının ne olmasını istediğinizi belirtir soruya, enter diyerek default değerleri verin.
  5. En son olarak w tuşuna basıp yapılan değişikliğin partisyon tablosuna kaydedilmesini sağlayarak çıkın.

İşlem tamamlandıktan sonra.  yeni  disk bölümünü /dev dizini altında şu şekilde görebilirsiniz:

[root@lvm ~]# ls -l /dev/hdb* brw-r----- 1 root disk 22, 65 May 14 15:10 /dev/hdb brw-r----- 1 root disk 22, 66 May 14 15:10 /dev/hdb1

Görüldüğü gibi bölüm hdb1 olarak durmakta.

Disk Bölümünün Formatlanması

Ben diski ext3 dosya sistemine göre formatlayacağım; bu nedenle mkfs.ext3 komutunu kullanıyorum:

[root@lvm ~]# mkfs.ext3 /dev/hdb1

İşlem sorunsuz olarak tamamlandıysa bu disk bölümünü mount edebiliriz.

Diskin Mount Edilmesi

Mount işlemini disk2 ismi ile yapacağımı belirtmiştim, bu nedenle ilgili dizini açıyorum:

[root@lvm ~]# mkdir /mnt/disk2

Sonrasında da mount ediyorum.

[root@lvm ~]# mount /dev/hdb1 /mnt/disk2

İşlem tamamlandığına göre df komutu ile kontrol ettiğiniz de yeni diski /mnt/disk2 dizinine mount edilmiş olarak göremeniz gerekir.

Son olarak fstab dosyasına bu diski ekleyelim ve açılışlarda otomatik mount edilsin.

Yeni Disk Bölümünün fstab’a Eklenmesi

/etc altında duran fstab dosyanı editleyip  en altına aşağıdaki satırı ekliyorum.

/dev/hdb1   /mnt/disk2  ext3  defaults 0 0

Bu adımdan sonra işimiz bitmiş oluyor. Böylece ikinci bir diski, sisteme yeni bir dizin altında mount etmiş olduk. Bu yöntem LVM yöntemi gibi esneklikler sağlamasa da insanın işi herzaman düşebilir.

Filed under: linux

inqex says...

Manche lieben es, andere wurden von diversen GUIs (Windows[tm], u.a.) entwöhnt . Das schwarze Fenster, die Kommandozeile[1]. Hiermit ein paar Verweise zu Programmen und Konfigurationen für die Konsole.

Tmux löste hier inzwischen das in die Jahre gekommene screen ab.

Drei fertig gebackene Grmlkonfigurationsdateien von screen, der zsh und Vim gibt es dort. Bei der Screenkonfiguration ergab sich auf hiesigen System eine kleine Ungereimtheit, wie oben geschrieben stört dies jedoch dank tmux nicht.

Bei seraphyn erhält man eine kleine Liste erwähnenswerter Programme, welche hier nicht extra Auflistung erfährt.

-
[1] Manch einer bescheinigt der Konsole ein neues Erblühen, die Programmsuch und -aufruffunktion unter KDE4 (Alt+F2) sei ein Beispiel, doch dies ist ein anderes Thema.

Filed under: linux

bharathi says...

ulimit - Control the resources available to processes

Summary :
ulimit, Bash Built-in Command, provides fine control over the amount of resources (Virtual Mem, Max no .of process, Core file size,..) available to any processes started by the shell. Except for -t, which is in seconds, -p, which is in increments of 512 bytes, and -u, which is an unscaled number of processes, all other values are in 1024-byte increments.

For example, if the maximum no. of user process is set to 5, then that user can't run more then 5 process.

Examples :

 
$ ulimit -a -- Show All current limits. 
 
$ ulimit -n -- Show max open files limit. 
 
$ ulimit -t -- Show max CPU time limit. 
 
$ ulimit -c -- Show core file size. 
 
$ ulimit -c 6000 -- Set new core file size. 
 
$ ulimit -u 60 -- Set max no .of processes per user to 60. 
It will protect the system from shell booms. 

Read : info bash

Filed under: linux

bharathi says...

sort - Sort lines of text files

Summary :
Sort the file contents based on options given to it. By default the output is showed in the display.

Examples :

 
$ sort -- Take the input from stdin, sort and output in stdout. 
 
$ sort myfile -o myoutput -- Sort the myfile content and store
it in "myoutput". 
 
$ sort -b myfile -- Ignore the leading blanks and sort. 
 
$ sort -br myfile -- Same as above but in reverse order. 
 
$ sort -c myfile -- Only Check whether myfile is already sorted 
 
$ sort -f myfile -- Ignore the case and sort (a == A) 
 
$ sort -u myfile -- Sort and output only unique lines 
 
$ sort -n myfile -- Numerically sort the content. 
 
$ sort -g myfile -- Same as above. It understand more complex 
notations like +, -, NaN, infinity, expo. 
 
$ sort -M months -- Month sort (Jan < Feb <..< Dec). 
 
$ sort -t : -k 2,2n -k 5.3,5.4 myfile -- Sort numerically on the 
2nd field and resolve ties by sorting alphabetically on the 3rd
and 4th characters of field 5. Use `:' as the field delimiter. 

Read : man sort

Filed under: linux