Handbook:Alpha/Blocks/Disks/ta

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Handbook:Alpha/Blocks/Disks and the translation is 13% complete.
Outdated translations are marked like this.

Although it is theoretically possible to use a full disk to house a Linux system, this is almost never done in practice. Instead, full disk block devices are split up in smaller, more manageable block devices. On Alpha systems, these are called slices.

குறிப்பு
In further sections, the installation instructions will use the example partitioning for the ARC/AlphaBIOS setup. Please adjust to personal preference!

பகிர்வு திட்டத்தை வடிவமைத்தல்

எத்தனை பகிர்வுகள் எவ்வளவு அளவுகளில் தேவை?

வட்டு பகிர்வு தளவமைப்பின் வடிவம் வட்டில் பயன்படுத்தப்படும் முறைமை மற்றும் கோப்பு முறைமையின் தேவைகளை அதிகமாகச் சார்ந்துள்ளது. நிறையப் பயனர்கள் இருந்தால், தனி /home பகிர்வை வைத்துக்கொள்வது பாதுகாப்பை அதிகப்படுத்தி, காப்புநகல் போன்ற பராமரிப்பு பணிகளை எளிமையாக்கும் என அறிவுறுத்தப்படுகிறது. ஜெனடூவை ஒரு அஞ்சல் சேவையகமாகச் செயல்படுத்த நிறுவும்போது, எல்லா அஞ்சல்களும் பெரும்பாலும் /var அடைவிற்குள் சேமித்து வைப்பதால் இந்த அடைவு தனி /var பகிர்வாக இருக்க வேண்டும். பெரும்பாலான விளையாடல் சேவையகங்கள் /opt அடைவில் நிறுவப்படுவதால், விளையாட்டு சேவையகங்களுக்காக இதைத் தனி பகிர்வாக வைத்துக்கொள்ளலாம். இந்த பரிந்துரைகளுக்கான காரணம் /home அடைவை ஒத்தது: பாதுகாப்பு, காப்புநகலாக்கம் மற்றும் பராமரிப்பு.

ஜென்டூவில் பெரும்பாலான சூழல்களில், /usr மற்றும் /var அடைவுகளை ஒப்பீட்டளவில் பெரிய அளவாக வைக்கப்பட வேண்டும். /usr ஆனது முறைமையில் உள்ள பெரும்பாலான செயலிகளையும் லினக்ஸ் கர்னலையும் (/usr/src என்னும் இடத்தின் கீழ்) நடத்துகிறது. இயல்பாக, /var ஜென்டூ இ-பில்ட் கருவூலத்தை (/var/db/repos/gentoo என்னும் இடத்தில் உள்ள) நடத்துகிறது. இது கோப்பு முறைமையைப் பொருத்து, பொதுவாக 650 MiB (மெகா எண்ணுன்மிகள்) வரையிலான வட்டு இடைவெளியைப் பயன்படுத்தலாம். இந்த இடைவெளியானது /var/cache/distfiles மற்றும் /var/cache/binpkgs அடைவுகளை தவிர்த்து கணிக்கப்பட்டுள்ளது. ஏனெனில் முறைமையில் சேர்க்கப்படும்போது இந்த அடைவுகளில் முறையே மூலநிரல் கோப்புக்கள் மற்றும் (விரும்பினால்) இருமத் தொகுப்புகளால் மெதுவாக நிரம்பத் துடங்கிவிடும்.

எத்தனை மற்றும் எவ்வளவு பெரிய பகிர்வுகள் என்பது ஈடுசெய்தல்களைக் கருத்தில் கொள்வதிலும், சூழலுக்கு ஏற்றவாறு சிறந்த விருப்பத்தைத் தேர்வு செய்வதிலும் சார்ந்துள்ளது. தனி பகிர்வு அல்லது கனவளவு பின்வரும் நன்மைகளைக் கொண்டுள்ளது:

  • ஒவ்வொரு பகிர்வு அல்லது கனவளவுக்கும் சிறப்பாகச் செயல்படும் கோப்பு முறைமையைத் தேர்வு செய்ய வேண்டும்.
  • பகிர்வு அல்லது கனவளவில் செயலிழந்த கருவி ஒன்று தொடர்ந்து கோப்புகளை எழுதிக் கொண்டிருக்கிறது என்பதால் ஒட்டுமொத்த முறைமையும் காலி இடைவெளி இல்லாமல் போக வாய்ப்பில்லை.
  • தேவைப்பட்டால், பல சரிபார்த்தல்களை இணையாகச் செய்ய முடியும் என்பதால், கோப்பு முறைமை சரிபார்த்தல்களின் நேரத்தைக் குறைக்கலாம் (பல பகிர்விற்குப் பதிலாகப் பல வட்டுக்களைப் பயன்படுத்தும்போது இதன் பயனை முழுமையாகப் பெறலாம்).
  • சில பகிர்வு மற்றும் கனவளவுகளைப் படிக்க-மட்டும், nosuid (setuid இருமங்கள் தவிர்க்கப்பட்டு), noexec (செயல்படுத்தக்கூடிய இருமங்கள் தவிர்க்கப்பட்டு) முதலியவற்றைக் கொண்டு ஏற்றும்போது பாதுகாப்பை அதிகப்படுத்தலாம்.


இருப்பினும், பல பகிர்வு முறையில் குறிப்பிட்ட சில குறைகளும் உள்ளது:

  • முறையாக உள்ளமைக்கப்படாத போது, முறைமையின் ஒரு பகிர்வில் அதிகமான இடைவெளியும் மற்றொரு பகிர்வில் குறைவான இடைவெளியும் இருக்க வாய்ப்புகள் உள்ளன.
  • /usr/ கான தனி பகிர்விற்கு, இதை எல்லா துவக்க நிரல்கள் துவங்குவதற்கு முன்பு ஏற்றுவதற்கு ஒரு initramfs ஐ கொண்டு துவக்க வேண்டும். initramfs ஐ உருவாக்கல் மற்றும் பராமரித்தல் இந்த கையேட்டின் எல்லைக்கு அப்பாற்பட்டது என்பதால், புதிய பயனர்களை /usr/ க்கு என்று தனியாக ஒரு பகிர்வைப் பயன்படுத்த வேண்டாம் என அறிவுறுத்துகிறோம்
  • மேலும் SCSI மற்றும் SATA வட்டுக்கள் GPT வட்டு முத்திரையைப் பயன்படுத்தாத வரை 15 பகிர்வுகள் வரை மட்டுமே பகிர்வு செய்ய முடியும்.
குறிப்பு
Systemd ஐ பயன்படுத்தும் நோக்கத்திலிருந்தால், வேர் கோப்பு முறைமையின் ஒரு பாகமாகவோ அல்லது initramfs மூலம் ஏற்றப்பட்டோ துவக்கத்தில் /usr/ கிடைக்கும்.

அப்படியென்றால் இடமாற்று இடைவெளி?

இடமாற்று இடைவெளி அளவுக்கு எந்தவொரு மிகச்சரியான மதிப்பும் இல்லை. இந்த இடைவெளியின் வேளை கர்னலுக்கு உள் நினைவகம் (RAM) அழுத்தத்தில் இருக்கும்போது வட்டில் சேமிப்பு இடம் அளிப்பதாகும். இந்த இடமாற்று இடைவெளி கர்னலை உடனடியாக அணுக வாய்ப்பில்லாத நினைவக பக்கங்களை வட்டில் சேமிக்க அனுமதிக்கிறது. இதன்மூலம் இப்போதைய வேளைகளுக்குத் தேவையான RAM நினைவு விடுவிக்கப்படுகிறது. பக்கங்கள் மீண்டும் இடமாற்றும்போது வட்டு உடனடியாக தேவைப்படுவதால், நினைவு பக்கங்களை அதற்கான இடத்தில் எழுதுவதற்கு, RAM இல் இருந்து எழுதுவதற்கான நேரத்தை விட அதிக நேரம் எடுத்துக்கொள்கிறது (உள் நினைவகத்தை ஒப்பிடுகையில் வட்டு மெதுவாக வேளை செய்யக் கூடியது என்பதால்).

அதிகப்படியாக RAM இருந்தால் அல்லது தீவிரமாக நினைவு தேவைப்படும் செயலிகளை முறைமை இயக்கப்போவதில்லை என்றால், ஒருவேளை நிறைய இடமாற்று இடைவெளி தேவைப்படாமல் போகலாம். இருப்பினும் கணினியின் உறக்கநிலையின்போது நினைவகத்தில் உள்ள மொத்த விவரங்களும் இந்த இடைமாற்று இடைவெளியில்தான் சேமித்து வைக்கப்படுகிறது என்பதை அறிந்துகொள்ளவும் (சேவையக முறைமைகளைத் தவிர பெரும்பாலும் பணித்தள மற்றும் மடிக் கணினிகளில் காணப்படும்). முறைமைக்கு உறக்கநிலை ஆதரவு தேவைப்பட்டால், நினைவகத்தின் அளவை ஒத்த அல்லது அதற்கும் கூடுதலான இடமாற்று இடைவெளி தேவைப்படலாம்.

பொதுவான விதியாக, இடமாற்று இடைவெளியின் அளவு உள் நினைவகத்தின் (RAM) அளவை விட இரண்டு மடங்கு அதிகமாக இருக்கப் பரிந்துரைக்கிறோம். பல வன்தட்டுகள் உள்ள முறைமைகளில், இணை படித்தல்/எழுதல் செயல்களைப் பயன்படுத்திக் கொள்ள ஒவ்வொரு வட்டிலும் ஒரு இடைமாற்று இடைவெளியை உருவாக்குவது அறிவார்ந்த செயலாகும். எவ்வளவு வேகமாக ஒரு வட்டு இடமாற்றுகிறதோ அவ்வளவு வேகமாக இடமாற்று இடைவெளியில் உள்ள தரவுகளை அணுகியவுடன் முறைமை இயங்கும். சுழலக்கூடிய மற்றும் திட நிலை வட்டுகளின் இடையில் ஒன்றைத் தேர்வு செய்யும்போது, சிறந்த செயல்திறனுக்காக திடநிலை வட்டுக்களில் இடமாற்று இடைவெளியை இடுவது நல்லது. மேலும் இடமாற்று கோப்புகளை இடமாற்று பகிர்வுகளுக்கு மாற்றாகப் பயன்படுத்திக்கொள்ளலாம்; இது மிகக் குறைந்த வட்டு இடைவெளிகளைக் கொண்ட முறைமைகளின் கவனத்தை ஈர்க்கும்.


fdisk ஐ பயன்படுத்தி வட்டை பகிர்வு செய்தல் (SRM மட்டும்)

பின்வரும் பகுதிகள் SRM ற்கான எடுத்துக்காட்டு சீவல் தளவமைப்பை எவ்வாறு உருவாக்குவது என்பதைப் பற்றி விளக்குகிறது:

சீவல் விளக்கம்
/dev/sda1 இடைமாற்று சீவல்
/dev/sda2 வேர் சீவல்
/dev/sda3 முழு வட்டு (தேவைப்படுகிறது)

தனிப்பட்ட விருப்பங்களுக்கு ஏற்ப சீவல் தளவமைப்பை மாற்றிக்கொள்ளவும்.

Identifying available disks

To figure out what disks are running in the system, use the following commands:

IDE வட்டுக்களுக்கு:

root #dmesg | grep 'drive$'

SCSI வட்டுக்களுக்கு:

root #dmesg | grep 'scsi'

The output will show what disks were detected and their respective /dev/ entry. In the following parts we assume that the disk is a SCSI disk on /dev/sda.

Now fire up fdisk:

root #fdisk /dev/sda

எல்லா சீவல்களையும் நீக்குதல்

If the hard drive is completely blank, then first create a BSD disklabel.

Command (m for help):b
/dev/sda contains no disklabel.
Do you want to create a disklabel? (y/n) y
A bunch of drive-specific info will show here
3 partitions:
#       start       end      size     fstype   [fsize bsize   cpg]                                    
  c:        1      5290*     5289*    unused        0     0

We start with deleting all slices except the 'c'-slice (a requirement for using BSD disklabels). The following shows how to delete a slice (in the example we use 'a'). Repeat the process to delete all other slices (again, except the 'c'-slice).

Use p to view all existing slices. d is used to delete a slice.

BSD disklabel command (m for help):p
8 partitions:
#       start       end      size     fstype   [fsize bsize   cpg]                                    
  a:        1       235*      234*    4.2BSD     1024  8192    16
  b:      235*      469*      234*      swap
  c:        1      5290*     5289*    unused        0     0
  d:      469*     2076*     1607*    unused        0     0
  e:     2076*     3683*     1607*    unused        0     0
  f:     3683*     5290*     1607*    unused        0     0
  g:      469*     1749*     1280     4.2BSD     1024  8192    16
  h:     1749*     5290*     3541*    unused        0     0
BSD disklabel command (m for help):d
Partition (a-h): a

After repeating this process for all slices, a listing should show something similar to this:

BSD disklabel command (m for help):p
3 partitions:
#       start       end      size     fstype   [fsize bsize   cpg]                                    
  c:        1      5290*     5289*    unused        0     0

Creating the swap slice

On Alpha based systems there is no need for a separate boot slice. However, the first cylinder cannot be used as the aboot image will be placed there.

We will create a swap slice starting at the third cylinder, with a total size of 1 GB. Use n to create a new slice. After creating the slice, we will change its type to 1 (one), meaning swap.

BSD disklabel command (m for help):n
Partition (a-p): a
First cylinder (1-5290, default 1): 3
Last cylinder or +size or +sizeM or +sizeK (3-5290, default 5290): +1024M
BSD disklabel command (m for help):t
Partition (a-c): a
Hex code (type L to list codes): 1

After these steps a layout similar to the following should be shown:

BSD disklabel command (m for help):p
3 partitions:
#       start       end      size     fstype   [fsize bsize   cpg]                                    
  a:        3      1003      1001       swap
  c:        1      5290*     5289*    unused        0     0

Creating the root slice

We will now create the root slice, starting from the first cylinder after the swap slice. Use the p command to view where the swap slice ends. In our example, this is at 1003, making the root slice start at 1004.

Another problem is that there is currently a bug in fdisk making it think the number of available cylinders is one above the real number of cylinders. In other words, when asked for the last cylinder, decrease the cylinder number (in this example: 5290) with one.

When the slice is created, we change the type to 8, for ext2.

BSD disklabel command (m for help):n
Partition (a-p): b
First cylinder (1-5290, default 1): 1004
Last cylinder or +size or +sizeM or +sizeK (1004-5290, default 5290): 5289
BSD disklabel command (m for help):t
Partition (a-c): b
Hex code (type L to list codes): 8

The resulting slice layout should now be similar to this:

BSD disklabel command (m for help):p
3 partitions:
#       start       end      size     fstype   [fsize bsize   cpg]                                    
  a:        3      1003      1001       swap
  b:     1004      5289      4286       ext2
  c:        1      5290*     5289*    unused        0     0

Save the slice layout and exit

Exit the fdisk application by typing w. This will also save the slice layout.

Command (m for help):w

Using fdisk to partition the disk (ARC/AlphaBIOS only)

The following parts explain how to create the example partition layout for ARC/AlphaBIOS:

Partition Description
/dev/sda1 Boot partition
/dev/sda2 Swap partition
/dev/sda3 Root partition

Change the partition layout according to personal preference.

Identifying the available disks

To figure out what disks are running, use the following commands:

For IDE disks:

root #dmesg | grep 'drive$'

For SCSI disks:

root #dmesg | grep 'scsi'

From this output it should be easy to see what disks were detected and their respective /dev/ entry. In the following parts we assume that the disk is a SCSI disk on /dev/sda.

Now fire up fdisk:

root #fdisk /dev/sda

Deleting all partitions

If the hard drive is completely blank, then first create a DOS disklabel.

Command (m for help):o
Building a new DOS disklabel.

We start with deleting all partitions. The following shows how to delete a partition (in the example we use '1'). Repeat the process to delete all other partitions.

Use p to view all existing partitions. d is used to delete a partition.

command (m for help):p
Disk /dev/sda: 9150 MB, 9150996480 bytes
64 heads, 32 sectors/track, 8727 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
  
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         478      489456   83  Linux
/dev/sda2             479        8727     8446976    5  Extended
/dev/sda5             479        1433      977904   83  Linux Swap
/dev/sda6            1434        8727     7469040   83  Linux
command (m for help):d
Partition number (1-6): 1

Creating the boot partition

On Alpha systems which use MILO to boot, we have to create a small vfat boot partition.

Command (m for help):n
Command action
  e   extended
  p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-8727, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-8727, default 8727): +16M
Command (m for help):t
Selected partition 1
Hex code (type L to list codes): 6
Changed system type of partition 1 to 6 (FAT16)

Creating the swap partition

We will create a swap partition with a total size of 1 GB. Use n to create a new partition.

Command (m for help):n
Command action
  e   extended
  p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (17-8727, default 17): 17
Last cylinder or +size or +sizeM or +sizeK (17-8727, default 8727): +1000M
Command (m for help):t
Partition number (1-4): 2
Hex code (type L to list codes): 82
Changed system type of partition 2 to 82 (Linux swap)

After these steps a layout similar to the following is shown:

Command (m for help):p
Disk /dev/sda: 9150 MB, 9150996480 bytes
64 heads, 32 sectors/track, 8727 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
  
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          16       16368    6  FAT16
/dev/sda2              17         971      977920   82  Linux swap

Creating the root partition

We will now create the root partition. Again, just use the n command.

Command (m for help):n
Command action
  e   extended
  p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (972-8727, default 972): 972
Last cylinder or +size or +sizeM or +sizeK (972-8727, default 8727): 8727

After these steps a layout similar to the following should be shown:

Command (m for help):p
Disk /dev/sda: 9150 MB, 9150996480 bytes
64 heads, 32 sectors/track, 8727 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
  
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          16       16368    6  FAT16
/dev/sda2              17         971      977920   82  Linux swap
/dev/sda3             972        8727     7942144   83  Linux

Save the partition layout and exit

Save the changes made in fdisk by typing w.

Command (m for help):w

Now that the partitions are created, continue with Creating filesystems.