https://wiki.archlinux.org/api.php?action=feedcontributions&user=Zatricky&feedformat=atom
ArchWiki - User contributions [en]
2024-03-29T14:08:49Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=Beginners_guide&diff=515157
Beginners guide
2018-03-28T09:45:39Z
<p>Zatricky: Added redirect to Installation guide - mostly because there are many existing external links pointing to the old Beginner's guide URI</p>
<hr />
<div>#REDIRECT [[Installation_guide]]</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Beginners_guide&diff=514547
Talk:Beginners guide
2018-03-23T13:45:43Z
<p>Zatricky: note re potential redirect</p>
<hr />
<div>Should this page be re-instated but redirecting to [[Installation_guide]]? There are a lot of external links, mostly old links, pointing to this non-existent page. --[[User:Zatricky|Zatricky]] ([[User talk:Zatricky|talk]]) 13:45, 23 March 2018 (UTC)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Input_Leap&diff=510127
Talk:Input Leap
2018-02-08T05:52:10Z
<p>Zatricky: formatting</p>
<hr />
<div>==Synergy 1.7+ SSL encryption==<br />
Synergy 1.7+ replaces the existing crypto with an SSL transport plugin, according to http://synergy-project.org/wiki/Security. This is automatically configured for Synergy Pro users using the GUI, but can be compiled from source and installed manually for free. Might be worth touching on this in the encryption section, which is now outdated. [[User:Wlritchi|Wlritchi]] ([[User talk:Wlritchi|talk]]) 06:24, 3 June 2015 (UTC)<br />
<br />
== Update to Synergy 2.0 ==<br />
<br />
Fedora 26 is now on Synergy 2.0 - it breaks existing configurations/autostart/etc - so likely we're going to have to update the article very soon. :-| [[User:Zatricky|Zatricky]] ([[User talk:Zatricky|talk]]) 05:44, 8 February 2018 (UTC)<br />
<br />
Significantly, though ''synergyc'' and ''synergys'' are provided, they both refer to using ''synergy-core --client'' and ''synergy-core --server'' instead. [[User:Zatricky|Zatricky]] ([[User talk:Zatricky|talk]]) 05:51, 8 February 2018 (UTC)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Input_Leap&diff=510126
Talk:Input Leap
2018-02-08T05:51:26Z
<p>Zatricky: Added note re synergy[cs] vs synergy-core binary-name</p>
<hr />
<div>==Synergy 1.7+ SSL encryption==<br />
Synergy 1.7+ replaces the existing crypto with an SSL transport plugin, according to http://synergy-project.org/wiki/Security. This is automatically configured for Synergy Pro users using the GUI, but can be compiled from source and installed manually for free. Might be worth touching on this in the encryption section, which is now outdated. [[User:Wlritchi|Wlritchi]] ([[User talk:Wlritchi|talk]]) 06:24, 3 June 2015 (UTC)<br />
<br />
== Update to Synergy 2.0 ==<br />
<br />
Fedora 26 is now on Synergy 2.0 - it breaks existing configurations/autostart/etc - so likely we're going to have to update the article very soon. :-| [[User:Zatricky|Zatricky]] ([[User talk:Zatricky|talk]]) 05:44, 8 February 2018 (UTC)<br />
Significantly, though `synergyc` and `synergys` are provided, they both refer to using `synergy-core --client` and `synergy-core --server` instead. [[User:Zatricky|Zatricky]] ([[User talk:Zatricky|talk]]) 05:51, 8 February 2018 (UTC)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Input_Leap&diff=510125
Talk:Input Leap
2018-02-08T05:45:15Z
<p>Zatricky: typo</p>
<hr />
<div>==Synergy 1.7+ SSL encryption==<br />
Synergy 1.7+ replaces the existing crypto with an SSL transport plugin, according to http://synergy-project.org/wiki/Security. This is automatically configured for Synergy Pro users using the GUI, but can be compiled from source and installed manually for free. Might be worth touching on this in the encryption section, which is now outdated. [[User:Wlritchi|Wlritchi]] ([[User talk:Wlritchi|talk]]) 06:24, 3 June 2015 (UTC)<br />
<br />
== Update to Synergy 2.0 ==<br />
<br />
Fedora 26 is now on Synergy 2.0 - it breaks existing configurations/autostart/etc - so likely we're going to have to update the article very soon. :-| [[User:Zatricky|Zatricky]] ([[User talk:Zatricky|talk]]) 05:44, 8 February 2018 (UTC)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Input_Leap&diff=510124
Talk:Input Leap
2018-02-08T05:44:45Z
<p>Zatricky: /* Update to Synergy 2.0 */ new section</p>
<hr />
<div>==Synergy 1.7+ SSL encryption==<br />
Synergy 1.7+ replaces the existing crypto with an SSL transport plugin, according to http://synergy-project.org/wiki/Security. This is automatically configured for Synergy Pro users using the GUI, but can be compiled from source and installed manually for free. Might be worth touching on this in the encryption section, which is now outdated. [[User:Wlritchi|Wlritchi]] ([[User talk:Wlritchi|talk]]) 06:24, 3 June 2015 (UTC)<br />
<br />
== Update to Synergy 2.0 ==<br />
<br />
Fedora 27 is now on Synergy 2.0 - it breaks existing configurations/autostart/etc - so likely we're going to have to update the article very soon. :-| [[User:Zatricky|Zatricky]] ([[User talk:Zatricky|talk]]) 05:44, 8 February 2018 (UTC)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Dm-crypt/System_configuration&diff=438365
Dm-crypt/System configuration
2016-06-17T08:56:17Z
<p>Zatricky: grammar</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Encryption]]<br />
[[Category:File systems]]<br />
[[ja:Dm-crypt/システム設定]]<br />
{{Expansion|Aggregate here all the generic information on system configuration from the other sub-articles of [[Dm-crypt]].}}<br />
Back to [[Dm-crypt]].<br />
<br />
{{Tip|If in need to remotely unlock root or other early-boot filesystems (headless machine, distant servers...), follow the specific instructions from [[Dm-crypt/Specialties#Remote_unlocking_of_the_root_.28or_other.29_partition|Dm-crypt/Specialties#Remote unlocking of encrypted root]].}}<br />
<br />
== mkinitcpio ==<br />
When encrypting a system it is necessary to regenerate the initial ramdisk after properly configuring [[mkinitcpio]]. Depending on the particular scenarios, a subset of the following hooks will have to be enabled:<br />
<br />
* {{ic|encrypt}}: always needed when encrypting the root partition, or a partition that needs to be mounted ''before'' root. It is not needed in all the other cases, as system initialization scripts like {{ic|/etc/crypttab}} take care of unlocking other encrypted partitions. Note that this hook should be placed ''after'' the '''udev''' hook if used.<br />
* {{ic|shutdown}}: recommended before ''mkinitcpio 0.16'' to ensure controlled unmounting during system shutdown. It is still functional, but not deemed necessary [https://mailman.archlinux.org/pipermail/arch-dev-public/2013-December/025742.html anymore]. <br />
* {{ic|keymap}}: provides support for foreign keymaps for typing encryption passwords; it must come ''before'' the {{ic|encrypt}} hook.<br />
* {{ic|keyboard}}: needed to make USB keyboards work in early userspace.<br />
** {{ic|usbinput}}: deprecated, but can be given a try in case {{ic|keyboard}} does not work.<br />
<br />
Other hooks needed should be clear from other manual steps followed during the installation of the system.<br />
<br />
== Boot loader ==<br />
In order to enable booting an encrypted root partition, a subset of the following kernel parameters need to be set: see [[kernel parameters]] for instructions specific to your [[boot loader]]. <br />
<br />
For example using [[GRUB#Root partition|GRUB]] the relevant parameters are best added to {{ic|/etc/default/grub}} before generating the boot configuration. See also [[GRUB#Warning when installing in chroot]] as another point to be aware of when installing the GRUB loader. <br />
<br />
=== cryptdevice ===<br />
This parameter will make the system prompt for the passphrase to unlock the device containing the encrypted root on a cold boot. It is parsed by the {{ic|encrypt}} hook to identify which device contains the encrypted system:<br />
<br />
cryptdevice=''device'':''dmname''<br />
<br />
* {{ic|''device''}} is the path to the raw encrypted device. Usage of [[Persistent block device naming]] is advisable.<br />
* {{ic|''dmname''}} is the '''d'''evice-'''m'''apper name given to the device after decryption, which will be available as {{ic|/dev/mapper/''dmname''}}.<br />
* If a LVM contains the [[Dm-crypt/Encrypting_an_entire_system#LUKS_on_LVM|encrypted root]], the LVM gets activated first and the volume group containing the logical volume of the encrypted root serves as ''device''. It is then followed by the respective volume group to be mapped to root. The parameter follows the form of {{ic|cryptdevice<nowiki>=</nowiki>''/dev/vgname/lvname'':''dmname''}}.<br />
<br />
=== root ===<br />
<br />
The {{ic|1=root=}} parameter specifies the {{ic|''device''}} of the actual (decrypted) root file system:<br />
<br />
root=''device''<br />
<br />
* If the file system is formatted directly on the decrypted device file this will be {{ic|/dev/mapper/''dmname''}}.<br />
* If a LVM gets activated first and contains an [[Dm-crypt/Encrypting_an_entire_system#LUKS_on_LVM|encrypted logical rootvolume]], the above form applies as well. <br />
* If the root file system is contained in a logical volume of a fully [[encrypted LVM]], the device mapper for it will be in the general form of {{ic|root<nowiki>=</nowiki>/dev/mapper/''volumegroup''-''logicalvolume''}}.<br />
<br />
{{Tip|This parameter is not needed to be specified manually when using [[GRUB]]. Executing ''grub-mkconfig'' is meant to determine the correct UUID of the decrypted root filesystem and specify it in the generated {{ic|grub.cfg}} automatically.}}<br />
<br />
=== resume ===<br />
resume=''device''<br />
<br />
* {{ic|''device''}} is the device file of the decrypted (swap) filesystem used for suspend2disk. If swap is on a separate partition, it will be in the form of {{ic|/dev/mapper/swap}}. See also [[Dm-crypt/Swap encryption]].<br />
<br />
=== cryptkey ===<br />
<br />
This parameter is required by the {{ic|''encrypt''}} hook for reading a keyfile to unlock the {{ic|''cryptdevice''}}. It can have three parameter sets, depending on whether the keyfile exists as a file in a particular device, a bitstream starting on a specific location, or a file in the initramfs. <br />
<br />
For a file in a device the format is:<br />
<br />
cryptkey=''device'':''fstype'':''path''<br />
<br />
* {{ic|''device''}} is the raw block device where the key exists.<br />
* {{ic|''fstype''}} is the filesystem type of {{ic|''device''}} (or auto).<br />
* {{ic|''path''}} is the absolute path of the keyfile within the device.<br />
<br />
Example: {{ic|1=cryptkey=/dev/usbstick:vfat:/secretkey}}<br />
<br />
For a bitstream on a device the key's location is specified with the following: <br />
<br />
cryptkey=''device'':''offset'':''size'' <br />
<br />
Example: {{ic|1=cryptkey=/dev/sdZ:0:512}} reads a 512 bit keyfile starting at the beginning of the device. <br />
<br />
For a file [[mkinitcpio#BINARIES and FILES|included]] in the initramfs the format is[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/encrypt_hook?h=packages/cryptsetup#n14]:<br />
<br />
cryptkey=rootfs:''path''<br />
<br />
Example: {{ic|1=cryptkey=rootfs:/secretkey}}<br />
<br />
Also note that if {{ic|cryptkey}} is not specified, it defaults to {{ic|/crypto_keyfile.bin}} (in the initramfs).[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/encrypt_hook?h=packages/cryptsetup#n8]<br />
<br />
See also [[Dm-crypt/Device encryption#Keyfiles]].<br />
<br />
=== crypto ===<br />
This parameter is specific to pass ''dm-crypt'' plain mode options to the ''encrypt'' hook. <br />
<br />
It takes the form<br />
{{bc|<nowiki>crypto=</nowiki><hash>:<cipher>:<keysize>:<offset>:<skip>}}<br />
<br />
The arguments relate directly to the ''cryptsetup'' options. See [[Dm-crypt/Device encryption#Encryption options for plain mode]].<br />
<br />
For a disk encrypted with just ''plain'' default options, the {{ic|crypto}} arguments must be specified, but each entry can be left blank: <br />
{{bc|<nowiki>crypto=::::</nowiki>}}<br />
A specific example of arguments is <br />
{{bc|<nowiki>crypto=sha512:twofish-xts-plain64:512:0:</nowiki>}}<br />
<br />
== crypttab ==<br />
The {{ic|/etc/crypttab}} (encrypted device table) file is similar to the [[fstab]] file and contains a list of encrypted devices to be unlocked during system boot up. This file can be used for automatically mounting encrypted swap devices or secondary file systems.<br />
<br />
{{ic|crypttab}} is read ''before'' {{ic|fstab}}, so that dm-crypt containers can be unlocked before the file system inside is mounted. Note that {{ic|crypttab}} is read ''after'' the system has booted up, therefore it is not a replacement for unlocking encrypted partitions by using [[#mkinitcpio|mkinitcpio]] hooks and [[#Boot loader|boot loader options]] as in the case of [[Dm-crypt/Encrypting an entire system|encrypting the root partition]]. {{ic|crypttab}} processing at boot time is made by the {{ic|systemd-cryptsetup-generator}} automatically.<br />
<br />
See the {{ic|crypttab}} [http://linux.die.net/man/5/crypttab man page] for details, read below for some examples, and the [[#Mounting at boot time]] section for instructions on how to use UUIDs to mount an encrypted device. <br />
<br />
{{Warning|There are issues with [[systemd]] when processing {{ic|crypttab}} entries for ''dm-crypt'' [[Dm-crypt/Device_encryption#Encryption options for plain mode|plain mode]] ({{ic|--type plain}}) devices: <br />
<br />
* For {{ic|--type plain}} devices with a keyfile, it is necessary to add the {{ic|1=hash=plain}} option to crypttab due to a [https://bugs.freedesktop.org/show_bug.cgi?id&#61;52630 systemd incompatibility]. '''Do not''' use {{ic|systemd-cryptsetup}} manually for device creation to work around it.<br />
<br />
* It may be further required to add the {{ic|plain}} option explicitly to force {{ic|systemd-cryptsetup}} to recognize a {{ic|--type plain}}) device at boot. [https://github.com/systemd/systemd/issues/442 GitHub issue in question.]}}<br />
<br />
{{hc|/etc/crypttab|<nowiki><br />
# Example crypttab file. Fields are: name, underlying device, passphrase, cryptsetup options.<br />
<br />
# Mount /dev/lvm/swap re-encrypting it with a fresh key each reboot<br />
swap /dev/lvm/swap /dev/urandom swap,cipher=aes-xts-plain64,size=256<br />
<br />
# Mount /dev/lvm/tmp as /dev/mapper/tmp using plain dm-crypt with a random passphrase, making its contents unrecoverable after it is dismounted.<br />
tmp /dev/lvm/tmp /dev/urandom tmp,cipher=aes-xts-plain64,size=256 <br />
<br />
# Mount /dev/lvm/home as /dev/mapper/home using LUKS, and prompt for the passphrase at boot time.<br />
home /dev/lvm/home<br />
<br />
# Mount /dev/sdb1 as /dev/mapper/backup using LUKS, with a passphrase stored in a file.<br />
backup /dev/sdb1 /home/alice/backup.key<br />
</nowiki>}}<br />
<br />
=== Mounting at boot time ===<br />
<br />
If you want to mount an encrypted drive at boot time, enter the device's UUID in {{ic|/etc/crypttab}}. You get the UUID (partition) by using the command {{ic|lsblk -f}} and adding it to {{ic|crypttab}} in the form:<br />
<br />
{{hc|/etc/crypttab|<nowiki><br />
externaldrive UUID=2f9a8428-ac69-478a-88a2-4aa458565431 none luks,timeout=180<br />
</nowiki>}}<br />
<br />
The first parameter is your preferred device mapper's name for the encrypted drive. The option {{ic|none}} will trigger a prompt during boot to type the passphrase for unlocking the partition. The {{ic|timeout}} option defines a timeout in seconds for entering the decryption password during boot.<br />
<br />
A [[Dm-crypt/Device_encryption#Keyfiles|keyfile]] can also be set up and referenced instead of {{ic|none}}. This results in an automatic unlocking, if the keyfile is accessible during boot. Since LUKS offers the option to have multiple keys, the chosen option can also be changed later.<br />
<br />
Use the device mapper's name you've defined in {{ic|/etc/crypttab}} in {{ic|/etc/fstab}} as follows:<br />
<br />
{{hc|/etc/fstab|<nowiki><br />
/dev/mapper/externaldrive /mnt/backup ext4 defaults,errors=remount-ro 0 2<br />
</nowiki>}}<br />
<br />
Since {{ic|/dev/mapper/externaldrive}} already is the result of a unique partition mapping, there is no need to specify an UUID for it. In any case, the mapper with the filesystem will have a different UUID than the partition it is encrypted in.<br />
<br />
==== Mounting a stacked blockdevice ==== <br />
<br />
The systemd generators also automatically process stacked block devices at boot. <br />
<br />
For example, you can create a [[RAID]] setup, use cryptsetup on it and create an [[LVM]] logical volume with respective filesystem inside the encrypted block device. A resulting: <br />
{{hc|$ lsblk -f|<br />
─sdXX linux_raid_member <br />
│ └─md0 crypto_LUKS <br />
│ └─cryptedbackup LVM2_member <br />
│ └─vgraid-lvraid ext4 /mnt/backup<br />
└─sdYY linux_raid_member <br />
└─md0 crypto_LUKS <br />
└─cryptedbackup LVM2_member <br />
└─vgraid-lvraid ext4 /mnt/backup<br />
}}<br />
will ask for the passphrase and mount automatically at boot. <br />
<br />
Given you specify the correct corresponding crypttab (e.g. UUID for the {{ic|crypto_LUKS}} device) and fstab ({{ic|/dev/mapper/vgraid-lvraid}}) entries, there is no need to add additional mkinitcpio hooks/configuration, because {{ic|/etc/crypttab}} processing applies to non-root mounts only. One exception is when the {{ic|mdadm_udev}} hook is used ''already'' (e.g. for the root device). In this case {{ic|/etc/madadm.conf}} and the initramfs need updating to achieve the correct root raid is picked first.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Dm-crypt/System_configuration&diff=438364
Dm-crypt/System configuration
2016-06-17T08:55:30Z
<p>Zatricky: Added mention of encrypt hook needing to be after udev. See https://bbs.archlinux.org/viewtopic.php?id=175143</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Encryption]]<br />
[[Category:File systems]]<br />
[[ja:Dm-crypt/システム設定]]<br />
{{Expansion|Aggregate here all the generic information on system configuration from the other sub-articles of [[Dm-crypt]].}}<br />
Back to [[Dm-crypt]].<br />
<br />
{{Tip|If in need to remotely unlock root or other early-boot filesystems (headless machine, distant servers...), follow the specific instructions from [[Dm-crypt/Specialties#Remote_unlocking_of_the_root_.28or_other.29_partition|Dm-crypt/Specialties#Remote unlocking of encrypted root]].}}<br />
<br />
== mkinitcpio ==<br />
When encrypting a system it is necessary to regenerate the initial ramdisk after properly configuring [[mkinitcpio]]. Depending on the particular scenarios, a subset of the following hooks will have to be enabled:<br />
<br />
* {{ic|encrypt}}: always needed when encrypting the root partition, or a partition that needs to be mounted ''before'' root. It is not needed in all the other cases, as system initialization scripts like {{ic|/etc/crypttab}} take care of unlocking other encrypted partitions. Note that, if used, this hook should always be placed ''after'' the '''udev''' hook.<br />
* {{ic|shutdown}}: recommended before ''mkinitcpio 0.16'' to ensure controlled unmounting during system shutdown. It is still functional, but not deemed necessary [https://mailman.archlinux.org/pipermail/arch-dev-public/2013-December/025742.html anymore]. <br />
* {{ic|keymap}}: provides support for foreign keymaps for typing encryption passwords; it must come ''before'' the {{ic|encrypt}} hook.<br />
* {{ic|keyboard}}: needed to make USB keyboards work in early userspace.<br />
** {{ic|usbinput}}: deprecated, but can be given a try in case {{ic|keyboard}} does not work.<br />
<br />
Other hooks needed should be clear from other manual steps followed during the installation of the system.<br />
<br />
== Boot loader ==<br />
In order to enable booting an encrypted root partition, a subset of the following kernel parameters need to be set: see [[kernel parameters]] for instructions specific to your [[boot loader]]. <br />
<br />
For example using [[GRUB#Root partition|GRUB]] the relevant parameters are best added to {{ic|/etc/default/grub}} before generating the boot configuration. See also [[GRUB#Warning when installing in chroot]] as another point to be aware of when installing the GRUB loader. <br />
<br />
=== cryptdevice ===<br />
This parameter will make the system prompt for the passphrase to unlock the device containing the encrypted root on a cold boot. It is parsed by the {{ic|encrypt}} hook to identify which device contains the encrypted system:<br />
<br />
cryptdevice=''device'':''dmname''<br />
<br />
* {{ic|''device''}} is the path to the raw encrypted device. Usage of [[Persistent block device naming]] is advisable.<br />
* {{ic|''dmname''}} is the '''d'''evice-'''m'''apper name given to the device after decryption, which will be available as {{ic|/dev/mapper/''dmname''}}.<br />
* If a LVM contains the [[Dm-crypt/Encrypting_an_entire_system#LUKS_on_LVM|encrypted root]], the LVM gets activated first and the volume group containing the logical volume of the encrypted root serves as ''device''. It is then followed by the respective volume group to be mapped to root. The parameter follows the form of {{ic|cryptdevice<nowiki>=</nowiki>''/dev/vgname/lvname'':''dmname''}}.<br />
<br />
=== root ===<br />
<br />
The {{ic|1=root=}} parameter specifies the {{ic|''device''}} of the actual (decrypted) root file system:<br />
<br />
root=''device''<br />
<br />
* If the file system is formatted directly on the decrypted device file this will be {{ic|/dev/mapper/''dmname''}}.<br />
* If a LVM gets activated first and contains an [[Dm-crypt/Encrypting_an_entire_system#LUKS_on_LVM|encrypted logical rootvolume]], the above form applies as well. <br />
* If the root file system is contained in a logical volume of a fully [[encrypted LVM]], the device mapper for it will be in the general form of {{ic|root<nowiki>=</nowiki>/dev/mapper/''volumegroup''-''logicalvolume''}}.<br />
<br />
{{Tip|This parameter is not needed to be specified manually when using [[GRUB]]. Executing ''grub-mkconfig'' is meant to determine the correct UUID of the decrypted root filesystem and specify it in the generated {{ic|grub.cfg}} automatically.}}<br />
<br />
=== resume ===<br />
resume=''device''<br />
<br />
* {{ic|''device''}} is the device file of the decrypted (swap) filesystem used for suspend2disk. If swap is on a separate partition, it will be in the form of {{ic|/dev/mapper/swap}}. See also [[Dm-crypt/Swap encryption]].<br />
<br />
=== cryptkey ===<br />
<br />
This parameter is required by the {{ic|''encrypt''}} hook for reading a keyfile to unlock the {{ic|''cryptdevice''}}. It can have three parameter sets, depending on whether the keyfile exists as a file in a particular device, a bitstream starting on a specific location, or a file in the initramfs. <br />
<br />
For a file in a device the format is:<br />
<br />
cryptkey=''device'':''fstype'':''path''<br />
<br />
* {{ic|''device''}} is the raw block device where the key exists.<br />
* {{ic|''fstype''}} is the filesystem type of {{ic|''device''}} (or auto).<br />
* {{ic|''path''}} is the absolute path of the keyfile within the device.<br />
<br />
Example: {{ic|1=cryptkey=/dev/usbstick:vfat:/secretkey}}<br />
<br />
For a bitstream on a device the key's location is specified with the following: <br />
<br />
cryptkey=''device'':''offset'':''size'' <br />
<br />
Example: {{ic|1=cryptkey=/dev/sdZ:0:512}} reads a 512 bit keyfile starting at the beginning of the device. <br />
<br />
For a file [[mkinitcpio#BINARIES and FILES|included]] in the initramfs the format is[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/encrypt_hook?h=packages/cryptsetup#n14]:<br />
<br />
cryptkey=rootfs:''path''<br />
<br />
Example: {{ic|1=cryptkey=rootfs:/secretkey}}<br />
<br />
Also note that if {{ic|cryptkey}} is not specified, it defaults to {{ic|/crypto_keyfile.bin}} (in the initramfs).[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/encrypt_hook?h=packages/cryptsetup#n8]<br />
<br />
See also [[Dm-crypt/Device encryption#Keyfiles]].<br />
<br />
=== crypto ===<br />
This parameter is specific to pass ''dm-crypt'' plain mode options to the ''encrypt'' hook. <br />
<br />
It takes the form<br />
{{bc|<nowiki>crypto=</nowiki><hash>:<cipher>:<keysize>:<offset>:<skip>}}<br />
<br />
The arguments relate directly to the ''cryptsetup'' options. See [[Dm-crypt/Device encryption#Encryption options for plain mode]].<br />
<br />
For a disk encrypted with just ''plain'' default options, the {{ic|crypto}} arguments must be specified, but each entry can be left blank: <br />
{{bc|<nowiki>crypto=::::</nowiki>}}<br />
A specific example of arguments is <br />
{{bc|<nowiki>crypto=sha512:twofish-xts-plain64:512:0:</nowiki>}}<br />
<br />
== crypttab ==<br />
The {{ic|/etc/crypttab}} (encrypted device table) file is similar to the [[fstab]] file and contains a list of encrypted devices to be unlocked during system boot up. This file can be used for automatically mounting encrypted swap devices or secondary file systems.<br />
<br />
{{ic|crypttab}} is read ''before'' {{ic|fstab}}, so that dm-crypt containers can be unlocked before the file system inside is mounted. Note that {{ic|crypttab}} is read ''after'' the system has booted up, therefore it is not a replacement for unlocking encrypted partitions by using [[#mkinitcpio|mkinitcpio]] hooks and [[#Boot loader|boot loader options]] as in the case of [[Dm-crypt/Encrypting an entire system|encrypting the root partition]]. {{ic|crypttab}} processing at boot time is made by the {{ic|systemd-cryptsetup-generator}} automatically.<br />
<br />
See the {{ic|crypttab}} [http://linux.die.net/man/5/crypttab man page] for details, read below for some examples, and the [[#Mounting at boot time]] section for instructions on how to use UUIDs to mount an encrypted device. <br />
<br />
{{Warning|There are issues with [[systemd]] when processing {{ic|crypttab}} entries for ''dm-crypt'' [[Dm-crypt/Device_encryption#Encryption options for plain mode|plain mode]] ({{ic|--type plain}}) devices: <br />
<br />
* For {{ic|--type plain}} devices with a keyfile, it is necessary to add the {{ic|1=hash=plain}} option to crypttab due to a [https://bugs.freedesktop.org/show_bug.cgi?id&#61;52630 systemd incompatibility]. '''Do not''' use {{ic|systemd-cryptsetup}} manually for device creation to work around it.<br />
<br />
* It may be further required to add the {{ic|plain}} option explicitly to force {{ic|systemd-cryptsetup}} to recognize a {{ic|--type plain}}) device at boot. [https://github.com/systemd/systemd/issues/442 GitHub issue in question.]}}<br />
<br />
{{hc|/etc/crypttab|<nowiki><br />
# Example crypttab file. Fields are: name, underlying device, passphrase, cryptsetup options.<br />
<br />
# Mount /dev/lvm/swap re-encrypting it with a fresh key each reboot<br />
swap /dev/lvm/swap /dev/urandom swap,cipher=aes-xts-plain64,size=256<br />
<br />
# Mount /dev/lvm/tmp as /dev/mapper/tmp using plain dm-crypt with a random passphrase, making its contents unrecoverable after it is dismounted.<br />
tmp /dev/lvm/tmp /dev/urandom tmp,cipher=aes-xts-plain64,size=256 <br />
<br />
# Mount /dev/lvm/home as /dev/mapper/home using LUKS, and prompt for the passphrase at boot time.<br />
home /dev/lvm/home<br />
<br />
# Mount /dev/sdb1 as /dev/mapper/backup using LUKS, with a passphrase stored in a file.<br />
backup /dev/sdb1 /home/alice/backup.key<br />
</nowiki>}}<br />
<br />
=== Mounting at boot time ===<br />
<br />
If you want to mount an encrypted drive at boot time, enter the device's UUID in {{ic|/etc/crypttab}}. You get the UUID (partition) by using the command {{ic|lsblk -f}} and adding it to {{ic|crypttab}} in the form:<br />
<br />
{{hc|/etc/crypttab|<nowiki><br />
externaldrive UUID=2f9a8428-ac69-478a-88a2-4aa458565431 none luks,timeout=180<br />
</nowiki>}}<br />
<br />
The first parameter is your preferred device mapper's name for the encrypted drive. The option {{ic|none}} will trigger a prompt during boot to type the passphrase for unlocking the partition. The {{ic|timeout}} option defines a timeout in seconds for entering the decryption password during boot.<br />
<br />
A [[Dm-crypt/Device_encryption#Keyfiles|keyfile]] can also be set up and referenced instead of {{ic|none}}. This results in an automatic unlocking, if the keyfile is accessible during boot. Since LUKS offers the option to have multiple keys, the chosen option can also be changed later.<br />
<br />
Use the device mapper's name you've defined in {{ic|/etc/crypttab}} in {{ic|/etc/fstab}} as follows:<br />
<br />
{{hc|/etc/fstab|<nowiki><br />
/dev/mapper/externaldrive /mnt/backup ext4 defaults,errors=remount-ro 0 2<br />
</nowiki>}}<br />
<br />
Since {{ic|/dev/mapper/externaldrive}} already is the result of a unique partition mapping, there is no need to specify an UUID for it. In any case, the mapper with the filesystem will have a different UUID than the partition it is encrypted in.<br />
<br />
==== Mounting a stacked blockdevice ==== <br />
<br />
The systemd generators also automatically process stacked block devices at boot. <br />
<br />
For example, you can create a [[RAID]] setup, use cryptsetup on it and create an [[LVM]] logical volume with respective filesystem inside the encrypted block device. A resulting: <br />
{{hc|$ lsblk -f|<br />
─sdXX linux_raid_member <br />
│ └─md0 crypto_LUKS <br />
│ └─cryptedbackup LVM2_member <br />
│ └─vgraid-lvraid ext4 /mnt/backup<br />
└─sdYY linux_raid_member <br />
└─md0 crypto_LUKS <br />
└─cryptedbackup LVM2_member <br />
└─vgraid-lvraid ext4 /mnt/backup<br />
}}<br />
will ask for the passphrase and mount automatically at boot. <br />
<br />
Given you specify the correct corresponding crypttab (e.g. UUID for the {{ic|crypto_LUKS}} device) and fstab ({{ic|/dev/mapper/vgraid-lvraid}}) entries, there is no need to add additional mkinitcpio hooks/configuration, because {{ic|/etc/crypttab}} processing applies to non-root mounts only. One exception is when the {{ic|mdadm_udev}} hook is used ''already'' (e.g. for the root device). In this case {{ic|/etc/madadm.conf}} and the initramfs need updating to achieve the correct root raid is picked first.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Benchmarking/Data_storage_devices&diff=363885
Benchmarking/Data storage devices
2015-03-04T13:39:25Z
<p>Zatricky: /* added 60GB Intel 330 to Table */</p>
<hr />
<div>[[Category:Storage]]<br />
{{Related articles start}}<br />
{{Related|Solid State Drives}}<br />
{{Related|Benchmarking}}<br />
{{Related articles end}}<br />
<br />
This article covers several Linux-native apps that benchmark I/O devices such as HDDs, SSDs, USB thumb drives, etc. There is also a "database" section specific to SSDs meant to capture user-entered benchmark results.<br />
<br />
==Introduction==<br />
Several I/O benchmark options exist under Linux.<br />
<br />
* Using hddparm with the -Tt switch, one can time sequential reads. This method is '''independent''' of partition alignment!<br />
* There is a graphical benchmark called gnome-disks contained in the {{pkg|gnome-disk-utility}} package that will give min/max/ave reads along with ave access time and a nice graphical display. This method is '''independent''' of partition alignment!'''<br />
* The dd utility can be used to measure both reads and writes. This method is '''dependent''' on partition alignment! In other words, if you failed to properly align your partitions, this fact will be seen here since you're writing and reading to a mounted filesystem.<br />
* [[Benchmarking#Bonnie.2B.2B|Bonnie++]]<br />
<br />
=== Using hdparm ===<br />
<br />
# hdparm -Tt /dev/sdX<br />
/dev/sdX:<br />
Timing cached reads: x MB in y seconds = z MB/sec<br />
Timing buffered disk reads: x MB in y seconds = z MB/sec<br />
<br />
{{Note|One should run the above command 4-5 times and manually average the results for an accurate evaluation of read speed per the hddparm man page.}}<br />
<br />
=== Using gnome-disks ===<br />
<br />
# gnome-disks<br />
<br />
Users will need to navigate through the GUI to the benchmark button ("More actions..." => "Benchmark Volume..."). [http://imgur.com/Ayv1B Example]<br />
<br />
=== Using systemd-analyze ===<br />
<br />
systemd-analyze plot > boot.svg<br />
<br />
Will plot a detailed graphic with the boot sequence: kernel time, userspace time, time taken by each service. [http://imgur.com/4ywt1 Example]<br />
<br />
=== Using dd ===<br />
<br />
{{Note|This method requires the command to be executed from a mounted partition on the device of interest!}}<br />
<br />
First, enter a directory on the SSD with at least 1.1 GB of free space (and one that obviously gives your user wrx permissions) and write a test file to measure write speeds and to give the device something to read:<br />
<br />
$ cd /path/to/SSD<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
w bytes (x GB) copied, y s, z MB/s<br />
<br />
Next, clear the buffer-cache to accurately measure read speeds directly from the device:<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
w bytes (x GB) copied, y s, z MB/s<br />
<br />
Now that the last file is in the buffer, repeat the command to see the speed of the buffer-cache:<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
w bytes (x GB) copied, y s, z GB/s<br />
<br />
{{Note|One should run the above command 4-5 times and manually average the results for an accurate evaluation of the buffer read speed.}}<br />
<br />
Finally, delete the temp file<br />
$ rm tempfile<br />
==== Caveats ====<br />
Some SSD controllers have compression hardware, which may skew benchmark results. See http://www.pugetsystems.com/labs/articles/SSDs-Advertised-vs-Actual-Performance-179/<br />
=== Model Specific Data ===<br />
Please contribute to this section using the template below to post results obtained.<br />
<br />
See [http://www.anandtech.com/bench/SSD/65 here] for a nice database of benchmarks.<br />
<br />
=== Template ===<br />
*SSD:<br />
*Model Number:<br />
*Firmware Version:<br />
*Capacity: x GB<br />
*Controller:<br />
*User:<br />
*Kernel:<br />
[*Filesystem: write something about your FS, optional]<br />
[*Notes: additional Notes, optional]<br />
<br />
# hdparm -Tt /dev/sdx<br />
<br />
Minimum Read Rate: x MB/s<br />
Maximum Read Rate: x MB/s<br />
Average Read Rate: x MS/s<br />
Average Access Time x ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
<br />
== Results ==<br />
<br />
=== Table ===<br />
<br />
All values are taken from the [https://wiki.archlinux.org/index.php/SSD_Benchmarking#Using_dd ''dd'' benchmark]. This is just an overview and has no scientific use.<br />
<br />
{| class="wikitable"<br />
! User !! Vendor !! Model !! Capacity [GB] !! Write [MB/sec] !! Read [MB/sec] !! Re-Read [MB/sec]<br />
|-<br />
| jac || Crucial || C300 || 128 || 138 || 372 || 6500<br />
|-<br />
| Fraoch || Crucial || M4 || 64 || 114 || 445 || 3800<br />
|-<br />
| lynix || Crucial || M4 || 128 || 193 || 268 || 6800<br />
|-<br />
| wzyboy || Crucial || M4 || 64 || 113 || 276 || 3400<br />
|-<br />
| gehidore || Crucial || M500 || 240 || 253 || 532 || 4700<br />
|-<br />
| digital || Crucial || MX100 || 512 || 455 || 506 || 3300<br />
|-<br />
| dundee || Intel || 310 Soda Creek || 40 || 44.2 || 197 || 4200<br />
|-<br />
| Zatricky || Intel || 330 || 60 || 523 || 568 || 666<br />
|-<br />
| bugflux || Intel || 330 || 120 || 44.2 || 242 || 4500<br />
|-<br />
| Cirk || Intel || X18-M (G2) || 160 || 103 || 263 || 2700<br />
|-<br />
| Graysky || Intel || X25-M (G2) || 80 || 80.6 || 268 || 6300<br />
|-<br />
| fackamato || Intel || X25-M (G2) || 160 || 98 || 262 || 3000<br />
|-<br />
| Cirk || Intel || X25-M (G2) || 80 || 70 || 208 || 4200<br />
|-<br />
| timo.hardebusch || Intel || X25-M (G2) || 120 || 106 || 265 || 2900<br />
|-<br />
| mloyer || Intel || 730 (SATA-II) || 240 || 232 || 249 || 4900<br />
|-<br />
| Musikolo || OCZ || Vertex 4 SATA 3 || 128 || 233 || 392 || 3600<br />
|-<br />
| Graysky || OCZ || Vertex 4 SATA 3 || 128 || 228 || 394 || -<br />
|-<br />
| Graysky || OCZ || Vertex 4 SATA 2 || 128 || 251 || 284 || -<br />
|-<br />
| Surfed || OCZ || Vertex || 60 || 142 || 236 || 5200<br />
|-<br />
| Sputnick || OCZ || Vertex 3 || 120 || 245 || 225 || 4600<br />
|-<br />
| ScottKidder || OCZ || Vertex Turbo || 30 || 49 || 115 || 2600<br />
|-<br />
| longint || OCZ || Vertex 2 || 240 || 852? || 241 || 3400<br />
|-<br />
| muflone || OCZ || Vertex 3 || 120 || 377 || 291 || 10300<br />
|-<br />
| bardo || OCZ || Agility 3 || 120 || 445 || 455 || 8200<br />
|-<br />
| Cirk || Samsung || MMCQE28GFMUP-MVA || 128 || 45 || 99 || 2300<br />
|-<br />
| skylinux || Samsung || 470 || 64 || 188 || 204 || 1000<br />
|-<br />
| kevincodux || Samsung || 830 || 128 || 313 || 525 || 9000<br />
|-<br />
| Earlz || Samsung || 840 || 250 || 242 || 282 || 9800<br />
|-<br />
| Ricky || Samsung || 840 evo|| 120 || 223 || 281 || 2200<br />
|-<br />
| Ricky || Samsung || 840 evo|| 500 || 428 || 538 || 7900<br />
|-<br />
| Ricky || Samsung || 840 evo|| 1TB || 413 || 528 || 8800<br />
|-<br />
| wzyboy || Samsung || 840 Pro || 256 || 481 || 547 || 7100<br />
|-<br />
| karamaz0v || Samsung || 840 Evo || 120 || 451 || 538 || 6600<br />
|-<br />
| csivanich || Samsung || 840 Evo || 120 || 480 || 530 || 6200<br />
|-<br />
| uleenucks || Samsung || 840 Evo || 250 || 503 || 538 || 8100<br />
|-<br />
| N30N || Samsung || 850 PRO || 512 || 459 || 552 || 11200<br />
|-<br />
| Dani || Sandisk || Extreme || 240 || 481 || 414 || 6000<br />
|-<br />
| kozaki || Sandisk || Extreme || 120 || 458 || 403 || 8200<br />
|-<br />
| Roshless || Sandisk || Ultra Plus || 64 || 150 || 193 || 1500<br />
|- <br />
| Fraoch || Seagate || 600 || 240 || 432 || 526 || 3700<br />
|-<br />
| Artsibash || Kingston || HyperX || 120 || 451 || 431 || 8600<br />
|- <br />
| WonderWoofy || Kingston || HyperX 3k || 120 || 518 || 316 || 7200<br />
|-<br />
| Tuxe || Kingston || SSDNow V+100 || 128 || 110 || 232 || 3300<br />
|-<br />
| Ricky || Kingston || SSDNow V300 || 128 || 216 || 234 || 2400<br />
|-<br />
| thof || Kingston || SNV425-S2BD || 128 || 164 || 260 || 3000<br />
|-<br />
| WonderWoofy || Mushkin || Atlas (mSATA II) || 128 || 262 || 242 || 7300<br />
|-<br />
| Wwwutz || Mushkin || Scorpion Deluxe (PCIe) || 1920 || 697 || 939 || 2100<br />
|-<br />
| AleksMK || Liteon || M3S || 256 || 336 || 432 || 4200<br />
|-<br />
| AsmundEr || WD mechanical drive || over gigE network (NFS) || 3000 || 48 || 117 || 7700<br />
|-<br />
| N30N || Plextor || PX-G256M6e || 256 || 483 || 690 || 9800<br />
|}<br />
<br />
=== Baseline: mechanical drive over ethernet ===<br />
*HDD: WD AV-GP 3TB (SATA 2)<br />
*Model number: WD30EURS<br />
*Firmware version: ?<br />
*Capacity: 2.7 TB<br />
*User: AsmundEr<br />
*Kernel: 3.9.9<br />
*Filesystem: ZFS (native) with mirroring onto two drives (i.e. RAID-1)<br />
*Notes: filesystem mounted over gigabit LAN network using NFSv4.<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 22.2138 s, 48.3 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.20926 s, 117 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.13901 s, 7.7 GB/s<br />
<br />
=== Corsair ===<br />
==== Corsair Force 3 ====<br />
*SSD: Corsair Force 3 120gb (SATA 3)<br />
*Model Number: Corsair Force 3 SSD<br />
*Firmware Version: 1.3.3 <br />
*Capacity: 120 GB<br />
*User: bserem<br />
*Kernel: 3.4.9<br />
*Filesystem: BTRFS<br />
*Notes: , Systemd, UEFI (with a small FAT uefi partition at the beggining of the disk)<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 28232 MB in 2.00 seconds = 14137.02 MB/sec<br />
Timing buffered disk reads: 1164 MB in 3.01 seconds = 387.33 MB/sec<br />
<br />
Minimum Read Rate: 388.04 MB/s<br />
Maximum Read Rate: 387.13 MB/s<br />
Average Read Rate: 387.252 MS/s<br />
<br />
<br />
=== Crucial ===<br />
==== Crucial C300 ====<br />
*SSD: Crucial C300 (SATA 3: 6Gb/s)<br />
*Model Number: CTFDDAC128MAG-1G1<br />
*Capacity: 128 GB<br />
*User: jac<br />
<br />
# hdparm -Tt /dev/sdb<br />
/dev/sda:<br />
Timing cached reads: 24112 MB in 2.00 seconds = 12072.84 MB/sec<br />
Timing buffered disk reads: 1056 MB in 3.00 seconds = 351.58 MB/sec<br />
<br />
Minimum Read Rate: 350.88 MB/s<br />
Maximum Read Rate: 351.58 MB/s<br />
Average Read Rate: 351.264 MB/s<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.77883 s, 138 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.88752 s, 372 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.164471 s, 6.5 GB/s<br />
<br />
==== Crucial M4 ====<br />
*SSD: Crucial M4 (SATA 3: 6Gb/s)<br />
*Model Number: M4-CT128M4SSD2 (Firmware: 0009)<br />
*Capacity: 128 GB<br />
*User: lynix<br />
*Filesystem: ext4 on LVM<br />
*Notes: connected to SATAII 3Gb/s port while benchmarking. firmware matters!<br />
<br />
# hdparm -Tt /dev/sde<br />
/dev/sde:<br />
Timing cached reads: 19094 MB in 2.00 seconds = 9559.40 MB/sec<br />
Timing buffered disk reads: 786 MB in 3.00 seconds = 261.63 MB/sec<br />
<br />
Minimum Read Rate: 271.7 MB/s<br />
Maximum Read Rate: 381.7 MB/s<br />
Average Read Rate: 279.0 MB/s<br />
<br />
Minimum Write Rate: 58.6 MB/s<br />
Maximum Write Rate: 258.9 MB/s<br />
Average Write Rate: 194.8 MB/s<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.57478 s, 193 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.00688 s, 268 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.157567 s, 6.8 GB/s<br />
<br />
*SSD: Crucial M4 (SATA III)<br />
*Model Number: M4-CT064M4SSD2<br />
*Firmware Version: 070H<br />
*Capacity: 64 GB<br />
*Controller: AMD SB950<br />
*User: Fraoch<br />
*Kernel: 3.8.0<br />
*Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sdb<br />
Timing cached reads: 7532 MB in 2.00 seconds = 3767.26 MB/sec<br />
Timing buffered disk reads: 1294 MB in 3.00 seconds = 431.20 MB/sec<br />
<br />
Average Read Rate: 506.9 MB/s<br />
Average Access Time: 0.08 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.44004 s, 114 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.41524 s, 445 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.295721 s, 3.6 GB/s<br />
<br />
==== Crucial MX100 ====<br />
*SSD: Crucial MX100<br />
*Model Number:Crucial CT512MX100SSD1<br />
*Firmware Version: MU01<br />
*Capacity: 512 GB<br />
*Controller: Marvel<br />
*User: digital<br />
*Kernel: 3.12.14<br />
<br />
Tested on a stock ext4 FS using the default kernel IO scheduler. <br />
Fresh SSD, no data. Connect to SATA III 6.0 Gb/s.<br />
<br />
# for i in 1 2 3; hdparm -Tt /dev/sdx; done<br />
Timing cached reads: 6810 MB in 2.00 seconds = 3406.75 MB/sec<br />
Timing buffered disk reads: 1520 MB in 3.00 seconds = 506.18 MB/sec<br />
Timing cached reads: 6872 MB in 2.00 seconds = 3437.75 MB/sec<br />
Timing buffered disk reads: 1520 MB in 3.00 seconds = 506.60 MB/sec<br />
Timing cached reads: 6784 MB in 2.00 seconds = 3394.36 MB/sec<br />
Timing buffered disk reads: 1520 MB in 3.00 seconds = 506.23 MB/sec<br />
<br />
Minimum Read Rate: 506.18 MB/s<br />
Maximum Read Rate: 506.60 MB/s<br />
Average Read Rate: 506.39 MS/s<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.36188 s, 455 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.78104 s, 386 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.322937 s, 3.3 GB/s<br />
<br />
=== Intel ===<br />
==== Intel 310 Soda Creek ====<br />
*SSD: Intel 310 Soda Creek<br />
*Model Number: SSDMAEMC040G2<br />
*Firmware Version: 2CV1023M<br />
*Capacity: 40 GB<br />
*User: dundee<br />
*Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 6278 MB in 2.00 seconds = 3141.39 MB/sec<br />
Timing buffered disk reads: 784 MB in 3.00 seconds = 260.96 MB/sec<br />
<br />
Minimum Read Rate: 189.7 MB/s<br />
Maximum Read Rate: 281.1 MB/s<br />
Average Read Rate: 277.1 MS/s<br />
Minimum Write Rate: 30.3 MB/s<br />
Maximum Write Rate: 44.6 MB/s<br />
Average Write Rate: 43.8 MS/s<br />
<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 24.3013 s, 44.2 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.45325 s, 197 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.255569 s, 4.2 GB/s<br />
<br />
==== Intel 330 60GB ====<br />
*SSD: Intel 330<br />
*Model Number: SSDSC2CT060A3<br />
*Firmware Version: 300i<br />
*Capacity: 60 GB<br />
*User: Zatricky<br />
*Filesystem: btrfs<br />
*{{Note|Nothing}}<br />
<br />
$ hdparm -tT /dev/sdc<br />
/dev/sdc:<br />
Timing cached reads: 2758 MB in 2.00 seconds = 1380.05 MB/sec<br />
Timing buffered disk reads: 670 MB in 3.00 seconds = 223.15 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.05431 s, 523 MB/s<br />
<br />
$ echo 3 > /proc/sys/vm/drop_caches ; dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.89014 s, 568 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.61149 s, 666 MB/s<br />
<br />
==== Intel 330 120GB ====<br />
*SSD: Intel 330<br />
*Model Number: SSDSC2CT120A3<br />
*Firmware Version: 300i<br />
*Capacity: 120 GB<br />
*User: bugflux<br />
*Filesystem: ext4<br />
*{{Note|Sata II computer}}<br />
<br />
# hdparm -tT /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 9222 MB in 2.00 seconds = 4612.61 MB/sec<br />
Timing buffered disk reads: 672 MB in 3.01 seconds = 223.40 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 24.3013 s, 44.2 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.43827 s, 242 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.240778 s, 4.5 GB/s<br />
<br />
==== Intel X18-M (G2) ====<br />
*SSD: Intel X18-M Generation 2<br />
*Model Number: SSDSA1M1602GN<br />
*Capacity: 160 GB<br />
*User: Cirk<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 2826 MB in 2.00 seconds = 1414.39 MB/sec<br />
Timing buffered disk reads: 694 MB in 3.00 seconds = 231.14 MB/sec<br />
<br />
Minimum Read Rate: 216.1 MB/s<br />
Maximum Read Rate: 283.5 MB/s<br />
Average Read Rate: 271.2 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 10.4608 s, 103 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.0866 s, 263 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.403244 s, 2.7 GB/s<br />
<br />
==== Intel X25-M (G2) ====<br />
*SSD: Intel X25-M Generation 2<br />
*Model Number: SSDSA2MH080G2R5<br />
*Capacity: 80 GB<br />
*User: Graysky<br />
<br />
# hdparm -Tt /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 15644 MB in 1.99 seconds = 7845.48 MB/sec<br />
Timing buffered disk reads: 788 MB in 3.00 seconds = 262.52 MB/sec<br />
<br />
Minimum Read Rate: 253.6 MB/s<br />
Maximum Read Rate: 286.1 MB/s<br />
Average Read Rate: 282.6 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 13.3236 s, 80.6 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.00297 s, 268 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.169713 s, 6.3 GB/s<br />
<br />
==== Intel X25-M (G2) ====<br />
*SSD: Intel X25-M Generation 2<br />
*Model Number: SSDSA2M160G2GC<br />
*Capacity: 160 GB<br />
*User: fackamato<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 2890 MB in 2.00 seconds = 1445.86 MB/sec<br />
Timing buffered disk reads: 738 MB in 3.00 seconds = 245.69 MB/sec<br />
<br />
Minimum Read Rate: 244.3 MB/s<br />
Maximum Read Rate: 278.6 MB/s<br />
Average Read Rate: 273.3 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 10.8582 s, 98.9 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.09679 s, 262 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.363709 s, 3.0 GB/s<br />
<br />
==== Intel X25-M (G2) ====<br />
*SSD: Intel X25-M Generation 2<br />
*Model Number: SSDSA2M080G2C<br />
*Capacity: 80 GB<br />
*User: Cirk<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 9384 MB in 2.00 seconds = 4694.29 MB/sec<br />
Timing buffered disk reads: 808 MB in 3.01 seconds = 268.64 MB/sec<br />
<br />
Minimum Read Rate: 229.9 MB/s<br />
Maximum Read Rate: 281.6 MB/s<br />
Average Read Rate: 272.4 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 15.1671 s, 70.8 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.15237 s, 208 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.256211 s, 4.2 GB/s<br />
<br />
==== Intel X25-M (G2) ====<br />
*SSD: Intel X25-M Generation 2<br />
*Model Number: SSDSA2MH120G2K5<br />
*Capacity: 120 GB<br />
*User: timo.hardebusch<br />
<br />
# hdparm -Tt /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 4358 MB in 2.00 seconds = 2178.89 MB/sec<br />
Timing buffered disk reads: 752 MB in 3.01 seconds = 250.07 MB/sec<br />
<br />
Minimum Read Rate: 259.1 MB/s<br />
Maximum Read Rate: 283.3 MB/s<br />
Average Read Rate: 280.6 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 10.1452 s, 106 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.05181 s, 265 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.369308 s, 2.9 GB/s<br />
<br />
==== Intel 730 ====<br />
*SSD: Intel 730<br />
*Model Number: SSDSC2BP240G4R5<br />
*Capacity: 240 GB<br />
*User: mloyer<br />
*Filesystem: ext4<br />
*{{Note|Sata II computer}}<br />
<br />
# hdparm -tT /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 13710 MB in 2.00 seconds = 6861.02 MB/sec<br />
Timing buffered disk reads: 794 MB in 3.00 seconds = 264.62 MB/sec<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.31867 s, 249 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.31867 s, 249 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.220314 s, 4.9 GB/s<br />
<br />
=== OCZ ===<br />
==== OCZ-VERTEX 4 128 GB ====<br />
*SSD:OCZ Vertex 4<br />
*Model Number: VTX4-25SAT3<br />
*Firmware Version: 1.5<br />
*Capacity: 128 GB<br />
*Controller: Marvell Technology Group Ltd. 88SE9128 PCIe SATA 6 Gb/s RAID controller (rev 11)<br />
*Kernel: 3.6.11-1<br />
*User: Musikolo<br />
*Notes: <br />
** Filesystem: ext4 with options ''defaults,relatime,discard''. <br />
** Partition: aligned (fist sector 2048 / 1MiB free space at the beginning). Additional info [https://bbs.archlinux.org/viewtopic.php?pid=1211245#p1211245 here].<br />
** Scheduler: deadline. Additional info [https://wiki.archlinux.org/index.php/Solid_State_Drives#Using_udev_for_one_device_or_HDD.2FSSD_mixed_environment here].<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 7752 MB in 2.00 seconds = 3877.19 MB/sec<br />
Timing buffered disk reads: 1122 MB in 3.00 seconds = 373.78 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.60766 s, 233 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.74071 s, 392 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.302118 s, 3.6 GB/s<br />
<br />
==== OCZ-VERTEX 4 128 GB ====<br />
*SSD:OCZ Vertex 4<br />
*Model Number: VTX4-25SAT3 - '''firmware 1.5'''<br />
*Capacity: 128 GB<br />
*User: [[User:Graysky]]<br />
===== In SATA 6.0 Gb/s Controller =====<br />
# hdparm -Tt /dev/sda<br />
<br />
/dev/sda:<br />
Timing cached reads: 33756 MB in 2.00 seconds = 16902.49 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.9279 s, 367 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.49942 s, 430 MB/s<br />
<br />
===== In SATA 3.0 Gb/s Controller =====<br />
# hdparm -Tt /dev/sda<br />
<br />
/dev/sda:<br />
Timing cached reads: 15842 MB in 2.00 seconds = 7930.79 MB/sec<br />
Timing buffered disk reads: 814 MB in 3.00 seconds = 271.02 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.28493 s, 251 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.78546 s, 284 MB/s<br />
<br />
==== OCZ-VERTEX 60gb ====<br />
*SSD:OCZ-VERTEX<br />
*Model Number:Firmware 1.5<br />
*Capacity: 60 GB<br />
*User:Surfed<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 16306 MB in 2.00 seconds = 8162.55 MB/sec<br />
Timing buffered disk reads: 646 MB in 3.00 seconds = 215.09 MB/sec<br />
<br />
<br />
Minimum Read Rate: 226.7 MB/s<br />
Maximum Read Rate: 275.2 MB/s<br />
Average Read Rate: 256.9 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.5581 s, 142 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.55881 s, 236 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.205299 s, 5.2 GB/s<br />
<br />
==== OCZ-VERTEX3 120 ====<br />
*SSD:OCZ-VERTEX3<br />
*Firmware Version:<br />
*Capacity: 6Gb/s SATA III<br />
*User:[[User:pingpong]]<br />
<br />
# hdpram -Tt /dev/sda<br />
<br />
/dev/sda:<br />
Timing cached reads: 11180 MB in 2.00 seconds = 5594.15 MB/sec<br />
Timing buffered disk reads: 736 MB in 3.00 seconds = 245.27 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.20024 s, 256 MB/s<br />
<br />
#echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.12454 s, 260 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.172948 s, 6.2 GB/s<br />
<br />
==== OCZ-VERTEX3 120GO ====<br />
*SSD:OCZ-VERTEX3<br />
*Firmware Version:2.06<br />
*Capacity: 6Gb/s SATA III<br />
*User:[[User:Sputnick]]<br />
*Notes: tested on '''SATA II 3Gb/s Dell Optiplex 780 motherboard''' 0C27VV <br />
<br />
# hdparm -Tt /dev/sdc<br />
<br />
/dev/sdc:<br />
Timing cached reads: 13702 MB in 2.00 seconds = 6859.89 MB/sec<br />
Timing buffered disk reads: 644 MB in 3.00 seconds = 214.40 MB/sec<br />
<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 enregistrements lus<br />
1024+0 enregistrements écrits<br />
1073741824 octets (1,1 GB) copiés, 4,37831 s, 245 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 enregistrements lus<br />
1024+0 enregistrements écrits<br />
1073741824 octets (1,1 GB) copiés, 4,76932 s, 225 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 enregistrements lus<br />
1024+0 enregistrements écrits<br />
1073741824 octets (1,1 GB) copiés, 0,234682 s, 4,6 GB/s<br />
<br />
==== OCZ-VERTEX-TURBO 30gb ====<br />
*SSD:OCZ-VERTEX-TURBO<br />
*Model Number:Firmware 1.5<br />
*Capacity: 30 GB<br />
*User:ScottKidder<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 6286 MB in 2.00 seconds = 3149.62 MB/sec<br />
Timing buffered disk reads: 630 MB in 3.01 seconds = 209.10 MB/sec<br />
<br />
Minimum Read Rate: 211.8 MB/s<br />
Maximum Read Rate: 254.1 MB/s<br />
Average Read Rate: 249.2 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 21.5437 s, 49.8 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.34704 s, 115 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.40667 s, 2.6 GB/s<br />
<br />
==== OCZ-VERTEX2 240GB ====<br />
*SSD: OCZ<br />
*Model Number: Vertex2<br />
*Capacity: 240GB<br />
*User: longint<br />
*Filesystem: btrfs compression=lzo,space_cache<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 10972 MB in 2.00 seconds = 5489.70 MB/sec<br />
Timing buffered disk reads: 648 MB in 3.00 seconds = 215.96 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.26013 s, 852 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.45112 s, 241 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.320492 s, 3.4 GB/s<br />
<br />
==== OCZ-VERTEX3 120GB ====<br />
*SSD:OCZ-VERTEX3 SATA III<br />
*Firmware Version:2.13<br />
*Capacity: 120 GB<br />
*Filesystem: ext4 with discard and commit=60<br />
*[[User:muflone]]<br />
<br />
# hdparm -Tt /dev/sdc<br />
/dev/sdc:<br />
Timing cached reads: 23870 MB in 2.00 seconds = 11950.12 MB/sec<br />
Timing buffered disk reads: 866 MB in 3.00 seconds = 288.36 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.85159 s, 377 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.6931 s, 291 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.10383 s, 10.3 GB/s<br />
<br />
==== OCZ-AGILITY3 120GB ====<br />
*SSD:OCZ-AGILITY3 SATA III<br />
*Firmware Version:2.15<br />
*Capacity: 120 GB<br />
*Filesystem: ext4 with discard<br />
*[[User:bardo]]<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 27738 MB in 2.00 seconds = 13889.38 MB/sec<br />
Timing buffered disk reads: 1158 MB in 3.01 seconds = 385.08 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.41537 s, 445 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.35961 s, 455 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.130664 s, 8.2 GB/s<br />
<br />
=== Samsung ===<br />
==== SAMSUNG 128GB / SATAII ====<br />
*SSD: SAMSUNG 128GB / SATAII<br />
*Model Number: MMCQE28GFMUP-MVA<br />
*Capacity: 128 GB<br />
*User: Cirk<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 2612 MB in 2.00 seconds = 1307.40 MB/sec<br />
Timing buffered disk reads: 294 MB in 3.01 seconds = 97.67 MB/sec<br />
<br />
Minimum Read Rate: 108.7 MB/s<br />
Maximum Read Rate: 114.5 MB/s<br />
Average Read Rate: 113.7 MB/s<br />
Average Access Time 0.2 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 23.7352 s, 45.2 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 10.7563 s, 99.8 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.464824 s, 2.3 GB/s<br />
<br />
==== SAMSUNG 470 64GB ====<br />
*SSD: SAMSUNG 470 64GB<br />
*Model Number: MZ-5PA064/US<br />
*Firmware: AXM070Q1<br />
*Capacity: 64 GB<br />
*User: skylinux<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 1736 MB in 2.00 seconds = 868.62 MB/sec<br />
Timing buffered disk reads: 516 MB in 3.00 seconds = 171.87 MB/sec<br />
<br />
Minimum Read Rate: 276.5 MB/s<br />
Maximum Read Rate: 278.8 MB/s<br />
Average Read Rate: 278.2 MB/s<br />
Average Access Time 0.2 ms<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.69714 s, 188 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.25116 s, 204 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.05824 s, 1.0 GB/s<br />
<br />
==== SAMSUNG 830 128GB SATAII ====<br />
*SSD: SAMSUNG 830 128GB<br />
*Model Number: MZ-7PC128D<br />
*Firmware: CXM03B1Q<br />
*Capacity: 128 GB<br />
*[[User: lockheed]]<br />
*Filesystem: ext4 defaults,noatime,commit=60<br />
*Notes: SATA II, partitions aligned, with swap, C2D 2.5 GHz<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 12616 MB in 1.99 seconds = 6334.84 MB/sec<br />
Timing buffered disk reads: 802 MB in 3.01 seconds = 266.78 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.82496 s, 226 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.84014 s, 280 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.300189 s, 3.6 GB/s<br />
<br />
==== SAMSUNG 830 128GB ====<br />
*SSD: SAMSUNG 830 128GB<br />
*Model Number: MZ-7PC128D<br />
*Firmware: CXM03B1Q<br />
*Capacity: 128 GB<br />
*[[User: kevincodux]]<br />
*Filesystem: ext4,discard,noatime<br />
*Notes: SATAIII, partitions aligned and no swap<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 22130 MB in 2.00 seconds = 11080.54 MB/sec<br />
Timing buffered disk reads: 1500 MB in 3.00 seconds = 499.38 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.42567 s, 313 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.04691 s, 525 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.119695 s, 9.0 GB/s<br />
<br />
==== SAMSUNG 830 256GB ====<br />
*SSD: SAMSUNG 830 256GB<br />
*Model Number: MZ-7PC256<br />
*Firmware Version: CXM03B1Q<br />
*Capacity: 256 GB<br />
*User: Revelation<br />
*Kernel: 3.5.4<br />
*Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 15888 MB in 2.00 seconds = 7952.13 MB/sec<br />
Timing buffered disk reads: 1464 MB in 3.00 seconds = 488.00 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3,15782 s, 340 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2,08421 s, 515 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.119695 s, 6.2 GB/s<br />
<br />
====SAMSUNG 840 120GB ====<br />
<br />
*SSD: Samsung SSD 840 Series<br />
*Model Number: 840 (non Pro)<br />
*Firmware Version: DXT08B0Q<br />
*Capacity: 120 GB<br />
*User: willybilly0101<br />
*Kernel: 3.10.10-1-ARCH #1 SMP PREEMPT<br />
*Filesystem: Btrfs - defaults,noatime,compress=lzo<br />
<br />
{{Note|1=There is a known fault with this drive identified in August 2014. The drive has a fault which means that it slows down with age. To fix this problem download the [http://www.samsung.com/global/business/semiconductor/samsungssd/downloads.html?gclid=COaEp9KfrsECFZTLtAodanEAIg Samsung SSD 840 EVO Performance Restoration Software and EXT0CB6Q firmware from Samsung's website].}}<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 11346 MB in 2.00 seconds = 5677.40 MB/sec<br />
Timing buffered disk reads: 1534 MB in 3.00 seconds = 511.24 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.05137 s, 523 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.08204 s, 992 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.232285 s, 4.6 GB/s<br />
<br />
==== SAMSUNG 840 250GB ====<br />
<br />
*SSD: SAMSUNG 840 250GB<br />
*Firmware: DXT07B0Q<br />
*Capacity: 250 GB<br />
*Filesystem: XFS(defaults,relatime,discard)<br />
*Kernel: 3.7.7-1-ARCH<br />
*Other details: SATA3 motherboard and hookups. Configured with hdparm to reserve 20% of the drive for over-provisioning<br />
*[[User: Earlz]]<br />
<br />
# hdparm -Tt /dev/sdc<br />
/dev/sdc:<br />
Timing cached reads: 21380 MB in 2.00 seconds = 10703.38 MB/sec<br />
Timing buffered disk reads: 810 MB in 3.00 seconds = 269.74 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.44147 s, 242 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.80874 s, 282 MB/s<br />
<br />
Notes:<br />
Firmware updating was a pain because they don't make it obvious you can update without using their Windows-only magician software. Go [http://www.samsung.com/global/business/semiconductor/samsungssd/downloads.html here] for ISO images of the updates pre-made and ready to download.<br />
<br />
{{Note|1=There is a known fault with this drive identified in August 2014. The drive has a fault which means that it slows down with age. To fix this problem download the [http://www.samsung.com/global/business/semiconductor/samsungssd/downloads.html?gclid=COaEp9KfrsECFZTLtAodanEAIg Samsung SSD 840 EVO Performance Restoration Software and EXT0CB6Q firmware from Samsung's website].}}<br />
<br />
==== SAMSUNG 840 evo 120GB ====<br />
*SSD: SAMSUNG 840 evo 120GB<br />
*Model Number: Samsung SSD 840 EVO 120GB<br />
*Firmware: EXT0BB6Q<br />
*Capacity: 128 GB<br />
*[[User: Ricky]]<br />
*Filesystem: ext4,discard,noatime<br />
*Notes: SATAII, partitions aligned, 10% over-provisioning and no swap<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 4588 MB in 1.99 seconds = 2299.87 MB/sec<br />
Timing buffered disk reads: 808 MB in 3.01 seconds = 268.80 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.82364 s, 223 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.8185 s, 281 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.496013 s, 2.2 GB/s<br />
<br />
==== SAMSUNG 840 Evo 120GB ====<br />
*SSD: SAMSUNG 840 Evo 120GB<br />
*Model Number: Samsung SSD 840 EVO 120GB<br />
*Firmware: EXT0BB6Q<br />
*Capacity: 120 GB<br />
*[[User: karamaz0v]]<br />
*Filesystem: ext4,relatime<br />
*Notes: SATA III, partitions aligned to 1536 KiB EBS (3072 sectors)<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.38095 s, 451 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.99437 s, 538 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.163231 s, 6.6 GB/s<br />
<br />
==== Samsung 840 evo 250 GB ====<br />
*SSD: Samsung 840 Evo 250 GB<br />
*Model Number: Samsung 840 Evo 250 GB<br />
*Firmware Version: EXT0BB6Q<br />
*Capacity: 250 GB<br />
*[[User: uleenucks]]<br />
*Kernel:3.18.2-2-ARCH<br />
*Filesystem: ext4 rw,noatime,nodiratime,discard<br />
<br />
# hdparm -Tt /dev/sdb<br />
Timing cached reads: 30606 MB in 2.00 seconds = 15319.57 MB/sec<br />
Timing buffered disk reads: 1558 MB in 3.00 seconds = 519.00 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.13545 s, 503 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.99491 s, 538 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.13152 s, 8.2 GB/s<br />
<br />
==== SAMSUNG 840 evo 500GB ====<br />
*SSD: SAMSUNG 840 evo 500GB<br />
*Model Number: Samsung SSD 840 EVO 500GB<br />
*Firmware: EXT0BB6Q<br />
*Capacity: 500 GB<br />
*[[User: Ricky]]<br />
*Filesystem: ext4, noatime<br />
*Kernel: 3.14.3-200.fc20.x86_64<br />
*Notes: SATAIII, partitions aligned with 1536KiB erase block, 6% over-provisioning<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 29328 MB in 2.00 seconds = 14686.69 MB/sec<br />
Timing buffered disk reads: 1550 MB in 3.00 seconds = 516.35 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.51136 s, 428 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.99533 s, 538 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.136775 s, 7.9 GB/s<br />
<br />
==== SAMSUNG 840 evo 1TB ====<br />
*SSD: SAMSUNG 840 evo 1TB<br />
*Model Number: Samsung SSD 840 EVO 1TB<br />
*Firmware: EXT0BB6Q<br />
*Capacity: 1 TB<br />
*[[User: Ricky]]<br />
*Filesystem: ext4<br />
*Notes: SATAIII, partitions aligned, 30GB over-provisioning and no swap<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 27018 MB in 2.00 seconds = 13523.27 MB/sec<br />
Timing buffered disk reads: 1526 MB in 3.00 seconds = 508.55 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.60038 s, 413 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.03471 s, 528 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.121486 s, 8.8 GB/s<br />
<br />
==== SAMSUNG 840 Pro 256 GB ====<br />
* SSD: Samsung 840 Pro 256 GB<br />
* Model Number: Samsung SSD 840 PRO Series<br />
* Firmware Version: DXM05B0Q<br />
* Capacity: 256 GB<br />
* Controller: SATA III<br />
* User: wzyboy<br />
* Kernel: 3.13.5-1-ARCH<br />
* Filesystem: Ext4 on aligned GPT, "discard" parameter enabled, no swap<br />
* Platform: ThinkPad X240s, i7-4500U, 8 GiB RAM<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 19334 MB in 2.00 seconds = 9677.52 MB/sec<br />
Timing buffered disk reads: 1562 MB in 3.00 seconds = 520.56 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 2,23356 s, 481 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 1,96205 s, 547 MB/s<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 0,15168 s, 7,1 GB/s<br />
<br />
==== Samsung 850 EVO 120GB ====<br />
*SSD: Samsung SSD 850 EVO<br />
*Firmware Version: EMT01B6Q<br />
*Capacity: 120GB<br />
*Kernel: 3.18.2<br />
*Filesystem: ext4 with noatime,data=ordered<br />
<br />
# sudo hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 14664 MB in 2.00 seconds = 7336.34 MB/sec<br />
Timing buffered disk reads: 1546 MB in 3.00 seconds = 515.17 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.21652 s, 484 MB/s<br />
<br />
# echo 3 > /prechooc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024 <br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.98136 s, 542 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024 <br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.157093 s, 6.8 GB/s<br />
<br />
==== Samsung 850 PRO 512GB ====<br />
*SSD: Samsung SSD 850 PRO<br />
*Firmware Version: EXM01B6Q<br />
*Capacity: 512GB<br />
*[[User: N30N]]<br />
*Kernel: 3.15.5-2<br />
*Filesystem: f2fs with noatime,discard<br />
<br />
# sudo hdparm -Tt /dev/sdc<br />
/dev/sdc:<br />
Timing cached reads: 36500 MB in 2.00 seconds = 18270.69 MB/sec<br />
Timing buffered disk reads: 1580 MB in 3.00 seconds = 526.53 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.33997 s, 459 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.94401 s, 552 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.095869 s, 11.2 GB/s<br />
<br />
=== Sandisk ===<br />
==== Sandisk Extreme 240 GB ====<br />
*SSD: Sandisk Extreme (SATA 3: 6Gb/s)<br />
*Model Number: SDSSDX240GG25<br />
*Capacity: 240 GB<br />
*User: Dani<br />
<br />
# sudo hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 11596 MB in 2.00 seconds = 5802.26 MB/sec<br />
Timing buffered disk reads: 1190 MB in 3.00 seconds = 396.16 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.23003 s, 481 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.5909 s, 414 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.177952 s, 6.0 GB/s<br />
<br />
==== Sandisk Extreme 120 GB ====<br />
* SSD: Sandisk Extreme 120 GB (SATA 3: 6 GB/s)<br />
* Model Number: SDSSDX-120G-G25<br />
* Firmware Version: R201<br />
* Capacity: 120 GB<br />
* User: ''hsngrms''<br />
* Kernel: 3.6.3-1-ARCH x86_64<br />
* Filesystem: EXT4<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 6824 MB in 2.00 seconds = 3413.53 MB/sec<br />
Timing buffered disk reads: 1332 MB in 3.00 seconds = 443.99 MB/sec <br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2,44496 s, 439 MB/s <br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2,64944 s, 405 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 0,163495 s, 6,6 GB/s<br />
<br />
* SSD: Sandisk Extreme 120 GB<br />
* Model Number: SDSSDX-120G-G25<br />
* Firmware Version: R211<br />
* Capacity: 120 GB<br />
* Controller: SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port [AHCI mode] (rev 04)<br />
* User: kozaki<br />
* Kernel: 3.7.4-1-ARCH x86_64<br />
* Filesystem: EXT4 (Arch 201301 Default: fstab: default)<br />
* Notes: SataIII, GPT partitions aligned on sectors, LVM2 (--dataalignment 1m), cfq I/O scheduler, Asrock B75Pro mobo<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 16913 MB in 2.00 seconds = 8464.76 MB/sec<br />
Timing buffered disk reads: 1414 MB in 3.00 seconds = 470.85 MB/sec <br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2.3301 s, 461.33 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2.65322 s, 403.67 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 0.137885 s, 7.87 GB/s<br />
<br />
* Note: Same model and config, but with the Filesystem mount options and the deadline I/O scheduler<br />
* Filesystem: EXT4 (fstab: noatime,discard)<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 17162 MB in 2.00 seconds = 8588.88 MB/sec<br />
Timing buffered disk reads: 1416 MB in 3.00 seconds = 471.76 MB/sec <br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2.3486 s, 458 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2.6593 s, 403.33 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 0.1312 s, 8.2 GB/sec<br />
<br />
====Sandisk Ultra Plus 64 GB====<br />
<br />
*SSD: Sandisk Ultra Plus 64GB SATA3<br />
*Model Number: SDSSDHP-064G-G25<br />
*Capacity: 64 GB<br />
*User: Roshless<br />
*Kernel: 3.12.9-2-ck<br />
*Filesystem: ext4 - defaults,noatime,discard<br />
*Notes: deadline scheduler, Dell 0M7CYJ mobo, notebook<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 2116 MB in 2.00 seconds = 1058.95 MB/sec<br />
Timing buffered disk reads: 582 MB in 3.00 seconds = 193.84 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.17104 s, 150 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.5608 s, 193 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.707444 s, 1.5 GB/s<br />
<br />
=== Seagate ===<br />
==== 600 ====<br />
<br />
* SSD: Seagate 600<br />
* Model Number: ST240HM000<br />
* Firmware Version: C675<br />
* Capacity: 240 GB<br />
* Controller: AMD SB950<br />
* User: Fraoch<br />
* Kernel: 3.11.0<br />
* Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 7436 MB in 2.00 seconds = 3719.76 MB/sec<br />
Timing buffered disk reads: 1526 MB in 3.00 seconds = 508.66 MB/sec<br />
<br />
Average read rate: 506.6 MB/s<br />
Average write rate: 299.3 MB/s<br />
Average access time: 0.13 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.48651 s, 432 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.03941 s, 526 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.308517 s, 3.5 GB/s<br />
<br />
=== Silicon Power ===<br />
==== Silicon Power Velox V55 60GB ====<br />
*SSD: Silicon Power Velox V55 60GB <br />
*Model Number: SP060GBSS3V55S25<br />
*Firmware: S8FM05.0<br />
*Capacity: 60GB<br />
*Controller: SATA controller: Intel Corporation Device 8c82<br />
*User: Adamovic<br />
*Kernel: 3.13.0<br />
*Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sdb<br />
<br />
/dev/sdb:<br />
Timing cached reads: 32042 MB in 1.99 seconds = 16116.51 MB/sec<br />
Timing buffered disk reads: 1412 MB in 3.00 seconds = 470.65 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
11073741824 bytes (1,1 GB) copied, 4,04966 s, 265 MB/s<br />
<br />
<br />
=== Kingston ===<br />
==== Kingston HyperX 120 GB ====<br />
*SSD: Kingston HyperX 120 GB<br />
*Model Number: SH100S3120G<br />
*Firmware: 320ABBF0<br />
*Capacity: 120 GB<br />
*User: Artsibash<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 26564 MB in 2.00 seconds = 13296.53 MB/sec<br />
Timing buffered disk reads: 1130 MB in 3.00 seconds = 376.16 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.37858 s, 451 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.48961 s, 431 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.125463 s, 8.6 GB/s<br />
<br />
==== Kingston HyperX 3K 120GB ====<br />
*SSD: Kingston HyperX 3K 120GB (MLC/Intel synchronous ONFi NAND/LSI SandForce SF-2281 25nm controller/SATA3/2.5")<br />
*Model Number: SH103S3120G<br />
*Firmware: 501ABBF0<br />
*Capacity: 120 GB<br />
*Misc: Intel DQ77MK mobo SATA3 port, linux 3.5.4-1, ext4 (has_journal + discard,noatime)<br />
*[[User: MajorTom]]<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 15382 MB in 2.00 seconds = 7702.01 MB/sec<br />
Timing buffered disk reads: 1442 MB in 3.00 seconds = 480.39 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.06937 s, 519 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.58996 s, 415 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.207434 s, 5.2 GB/s<br />
<br />
==== Kingston HyperX 3K 120GB ====<br />
*SSD: Kingston HyperX 3K 120GB<br />
*Model Number: SH103S3120G<br />
*Firmware: 503ABBF0<br />
*Capacity: 120 GB<br />
*Misc: SATA3 port, linux 3.6.4-1-ck, ext4 <br />
*User: WonderWoofy<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 16562 MB in 2.00 seconds = 8289.47 MB/sec<br />
Timing buffered disk reads: 1078 MB in 3.01 seconds = 358.53 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.07445 s, 518 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.40264 s, 316 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.149056 s, 7.2 GB/s<br />
<br />
==== Kingston SSDNow V+100 128 GB ====<br />
*SSD: Kingston SSDNow v+100 128 GB<br />
*Model Number: SVP100S2128G<br />
*Firmware: CJRA0202<br />
*Capacity: 128 GB<br />
*User: Tuxe<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 11598 MB in 1.99 seconds = 5822.73 MB/sec<br />
Timing buffered disk reads: 598 MB in 3.01 seconds = 198.90 MB/sec<br />
<br />
Minimum Read Rate: 145.8 MB/s<br />
Maximum Read Rate: 259.2 MB/s<br />
Average Read Rate: 243.5 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.74199 s, 110 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.62165 s, 232 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.330142 s, 3.3 GB/s<br />
<br />
==== Kingston SSDNow V300 128 GB ====<br />
*SSD: Kingston SSDNow V100 128 GB<br />
*Model Number: SV300S37A120G<br />
*Firmware: 521ABBF0<br />
*Capacity: 128 GB<br />
*User: Ricky<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 4970 MB in 1.99 seconds = 2491.32 MB/sec<br />
Timing buffered disk reads: 660 MB in 3.01 seconds = 219.53 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out <br />
1073741824 bytes (1.1 GB) copied, 4.96045 s, 216 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out <br />
1073741824 bytes (1.1 GB) copied, 4.58932 s, 234 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out <br />
1073741824 bytes (1.1 GB) copied, 0.45147 s, 2.4 GB/s<br />
<br />
==== Kingston SNV425-S2BD 128GB ====<br />
*SSD: Kingston SNV425-S2BD/128GB<br />
*Model Number: SNV425S2128GB<br />
*Firmware: C09112a6<br />
*Capacity: 128 GB<br />
*User: thof<br />
*Filesystem: ext4<br />
*Kernel: 3.3.4<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 3614 MB in 2.00 seconds = 1808.83 MB/sec<br />
Timing buffered disk reads: 736 MB in 3.01 seconds = 244.91 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 6.5301 s, 164 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.1377 s, 260 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.363142 s, 3.0 GB/s<br />
<br />
===Mushkin===<br />
==== Mushkin mSATA Atlas 128GB ====<br />
*SSD: Mushkin Atlas 128GB SATA III<br />
*Model Number: MKNSSDAT120GB-DX <br />
*Firmware: 504ABBF0<br />
*Capacity: 120 GB<br />
*Misc: SATA II Port (mSATA), linux 3.6.4-1-ck, ext4, Sandforce, <br />
*User: WonderWoofy<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sdb:<br />
Timing cached reads: 16116 MB in 2.00 seconds = 8065.82 MB/sec<br />
Timing buffered disk reads: 458 MB in 3.00 seconds = 152.53 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.09965 s, 262 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.4438 s, 242 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.143544 s, 7.5 GB/s<br />
<br />
==== Mushkin PCIe Scorpion Deluxe 1920 GB ====<br />
*SSD: Scorpion Deluxe PCIe<br />
*Model Number:MKNP44SC1920GB-DX<br />
*Firmware Version: n/a<br />
*Capacity: 1920 GB<br />
*Controller: PCIe 3.0<br />
*User: Wwwutz<br />
*Kernel: 3.10.29<br />
*Filesystem: xfs<br />
*Notes: 4x E7-4870 @ 2.40GHz DELL Poweredge R910<br />
<br />
# hdparm -Tt /dev/sde<br />
Timing cached reads: 17362 MB in 2.00 seconds = 8689.51 MB/sec<br />
Timing buffered disk reads: 2454 MB in 3.00 seconds = 817.81 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.53962 s, 697 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.14377 s, 939 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.509552 s, 2.1 GB/s<br />
<br />
===Liteon===<br />
====Liteon M3S====<br />
*SSD: Liteon M3S 256GB SATA III<br />
*Model Number: LCT-256M3S <br />
*Firmware: VRDC<br />
*Capacity: 256 GB<br />
*User: AleksMK<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 8406 MB in 2.00 seconds = 4206.12 MB/sec<br />
Timing buffered disk reads: 1212 MB in 3.00 seconds = 403.81 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.2338 s, 332 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.48531 s, 432 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.24457 s, 4.4 GB/s<br />
<br />
<br />
===IBM===<br />
==== IBM MLC 128GB ====<br />
*[[User: darkol]]<br />
*SSD: IBM 128GB SATA 2.5" MLC HS Enterprise Value SSD<br />
*Model Number: 90Y8648<br />
*Firmware Version: <br />
*Capacity: 128 GB<br />
*User: darkol<br />
*Kernel:<br />
*Filesystem: ext4<br />
*System: IBM x3650 M4<br />
<br />
# RAID1<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 17260 MB in 2.00 seconds = 8642.01 MB/sec<br />
Timing buffered disk reads: 1262 MB in 3.00 seconds = 420.27 MB/sec<br />
<br />
# RAID5<br />
# hdparm -Tt /dev/sdb<br />
/dev/sda:<br />
Timing cached reads: 17108 MB in 2.00 seconds = 8565.69 MB/sec<br />
Timing buffered disk reads: 3986 MB in 3.00 seconds = 1328.38 MB/sec<br />
<br />
<br />
=== Plextor ===<br />
==== Plextor PX-G256M6e ====<br />
*SSD: Plextor M6e M.2 PCI-E<br />
*Model Number: PX-G256M6e<br />
*Firmware Version: 1.03<br />
*Capacity: 256 GB<br />
*[[User: N30N]]<br />
*Kernel: 3.15.5-2<br />
*Filesystem: f2fs with noatime,discard<br />
<br />
# hdparm -Tt /dev/sdd<br />
/dev/sdd:<br />
Timing cached reads: 35466 MB in 2.00 seconds = 17752.85 MB/sec<br />
Timing buffered disk reads: 2024 MB in 3.00 seconds = 674.65 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.2233 s, 483 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.5561 s, 690 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.109914 s, 9.8 GB/s<br />
<br />
= Encrypted Partitions =<br />
<br />
This section should show some data for encrypted partitions.<br />
<br />
== dm-crypt with AES ==<br />
<br />
Please list your CPU and if you are using AES-NI. Without AES-NI support in the CPU, the processor will be the bottleneck long before you touch the >500MB/s SSD speeds. <br />
<br />
'''i7-620M Benchmark'''<br />
*~570 MB/s :With AES-NI<br />
*~100 MB/s :Without AES-NI<br />
<br />
'''i5-3210M'''<br />
*~500 MB/s :With AES-NI<br />
*~200 MB/s :Without AES-NI<br />
<br />
=== Crucial ===<br />
<br />
The crucial drive does not use any compression to reach its speeds, so it is expected to be fast.<br />
<br />
==== Crucial M4 256 Gb ====<br />
<br />
* User: crobe<br />
* Filesystem: ext4 on dm-crypt<br />
* Running Sata 6 Gbit/s on an older 3 Gbit/s controller<br />
* Comment: The drive is faster on writing ( on fresh space ), which has been observed on the internet. Maybe this is the maximum of my machine.<br />
<br />
# cryptsetup status<br />
type: LUKS1<br />
cipher: aes-xts-plain<br />
keysize: 256 bits<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 3012 MB in 2.00 seconds = 1507.62 MB/sec<br />
Timing buffered disk reads: 558 MB in 3.00 seconds = 185.93 MB/sec<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 7,86539 s, 137 MB/s<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 9,78325 s, 110 MB/s<br />
<br />
=== OCZ ===<br />
<br />
The OCZ Drives use compression on Data, so with uncompressible encrypted Data, speeds are expected to be way lower. Still, seek times should be as low as ever and the drive shouldn't get slower when it gets full, so there should be enough speed.<br />
<br />
==== OCZ-VERTEX2 180GB ====<br />
<br />
* SSD: OCZ <br />
* Model Number: Vertex2 <br />
* Capacity: 180Gb <br />
* User: crobe<br />
* Filesystem: ext4 on dm-crypt with AES, essiv, sha256<br />
* The bottleneck for the read/write speeds is definately the drive<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 2842 MB in 2.00 seconds = 1422.61 MB/sec<br />
Timing buffered disk reads: 550 MB in 3.00 seconds = 183.26 MB/sec<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 16,9194 s, 63,5 MB/s<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 14,5509 s, 73,8 MB/s<br />
<br />
Same values for bonnie++.<br />
<br />
=== Samsung ===<br />
<br />
==== SAMSUNG 470 128GB ====<br />
<br />
*SSD: SAMSUNG 470 128GB<br />
*Firmware: AXM09B1Q<br />
*Capacity: 128 GB<br />
*User: FredericChopin<br />
<br />
# cryptsetup status<br />
type: LUKS1<br />
cipher: aes-xts-plain<br />
keysize: 512 bits<br />
offset: 8192 sectors<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 3226 MB in 2.00 seconds = 1614.42 MB/sec<br />
Timing buffered disk reads: 570 MB in 3.00 seconds = 189.84 MB/sec<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.62518 s, 112 MB/s<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.34282 s, 115 MB/s<br />
<br />
==== SAMSUNG 830 256GB ====<br />
<br />
*SSD: Samsung 830 256GB<br />
*Model Number: MZ-7PC256B/WW<br />
*Firmware Version: CXM03BQ1<br />
*Capacity: 256 GB<br />
*User: stefseel<br />
*Kernel: 3.4.6-1-ARCH (with aesni_intel module)<br />
*Filesystem: ext4 (relatime,discard) over LVM2 over dm-crypt/LUKS (allow-discards)<br />
*System: Lenovo ThinkPad T430 (i5-3210M)<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 15000 MB in 2.00 seconds = 7500 MB/sec<br />
Timing buffered disk reads: 1470 MB in 3.00 seconds = 490 MB/sec<br />
<br />
With default Arch settings with installed pm-utils: JOURNAL_COMMIT_TIME_AC=0, DRIVE_READAHEAD_AC=256<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.62668 s, 300 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.07337 s, 170 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.154298 s, 7.0 GB/s<br />
<br />
What annoyed me was the poor read performance. I observed that in battery mode with unplugged AC the read rate was 500 MB/s. I did some research and found out that pm-utils is to blame. In AC mode it sets journal commit time to zero and readahead to 256 whereas in battery mode it sets journal commit time to 600 and readahead to 3072. See scripts /usr/lib/pm-utils/power.d/journal-commit and /usr/lib/pm-utils/power.d/readahead. So I added a custom config to set journal commit time always to 600 and readahead always to 4096, the result made me happy :)<br />
<br />
# cat /etc/pm/config.d/config<br />
DRIVE_READAHEAD_AC=4096<br />
DRIVE_READAHEAD_BAT=4096<br />
JOURNAL_COMMIT_TIME_AC=600<br />
JOURNAL_COMMIT_TIME_BAT=600<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.15534 s, 500 MB/s<br />
<br />
However there is still an issue: after resuming from suspend read rate goes down to 270 MB/s.<br />
<br />
<br />
==== SAMSUNG 830 256GB ====<br />
*[[User: hunterthompson]]<br />
*SSD: SAMSUNG 830 256GB<br />
*Firmware: CXM03B1Q<br />
*Capacity: 256 GB<br />
*System: Thinkpad X230, 16GB PC-1600 CL9 Kingston HyperX<br />
*CPU: i7-3520M, AES-NI, Hyper-Threaded, 2.9GHz-3.6GHz, Steady 3.4GHz with all 4 threads 100%<br />
*Kernel: x86_64 linux-grsec 3.5.4-1-grsec (Desktop, Virt, Host, KVM, Security)<br />
*Encryption: Full Disk, LVM2 on LUKS dm-crypt, Allow-Discards<br />
*Cryptsetup: -h sha512 -c aes-xts-plain64 -y -s 512 luksFormat --align-payload=8192<br />
*Filesystem: mkfs.ext4 -b 4096 -E stride=128,stripe-width=128 /dev/mapper/VolGroup00-lvolhome<br />
*fstab: ext4,rw,noatime,nodiratime,discard,stripe=128,data=ordered,errors=remount-ro<br />
*Notes: SATAIII, partitions aligned and no swap<br />
<br />
% dd bs=1M count=1024 if=7600_Retail_Ultimate_DVD.iso of=/dev/null conv=fdatasync<br />
dd: fsync failed for ‘/dev/null’: Invalid argument<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.42075 s, 314 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.48574 s, 308 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.45361 s, 311 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.44276 s, 312 MB/s<br />
<br />
=== Plextor ===<br />
==== Plextor M5M 128GB ====<br />
*[[User: ror191505]]<br />
*SSD: Plextor M5M 128GB<br />
*Firmware: 1.04<br />
*Capacity: 128 GB<br />
*System: ASUS K56CB, 8Gb RAM<br />
*CPU: i7-3517U, AES-NI, Hyper-Threaded, 1.9GHz-3.0GHz<br />
*Kernel: x86_64 3.13.5-1-ARCH<br />
*Encryption: LVM2 on LUKS dm-crypt<br />
*Cryptsetup: -h sha512 -c aes-xts-plain64 -y -s 512 luksFormat --align-payload=8192<br />
*Filesystem: EXT4<br />
<br />
# cryptsetup status /dev/mapper/crypted <br />
/dev/mapper/crypted is active and is in use.<br />
type: LUKS1<br />
cipher: aes-xts-plain64<br />
keysize: 256 bits<br />
device: /dev/sdb2<br />
offset: 4096 sectors<br />
size: 249041517 sectors<br />
mode: read/write<br />
<br />
<br />
% dd bs=1M count=1024 if=film.mkv of=/dev/null conv=fdatasync<br />
dd: fsync failed for '/dev/null': Invalid argument<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.65242 s, 405 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.69877 s, 290 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.67513 s, 292 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.68793 s, 291 MB/s<br />
<br />
% sudo hdparm -Tt /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 12774 MB in 2.00 seconds = 6394.84 MB/sec<br />
Timing buffered disk reads: 1264 MB in 3.00 seconds = 420.68 MB/sec<br />
== Truecrypt ==<br />
<br />
= Comparison - high end SCSI RAID 0 hard drive benchmark =<br />
== LSI 320-2X Megaraid SCSI == <br />
<br />
* SSD: N/A<br />
* Model Number: LSI MegaRAID 320-2x RAID 0 x 2 Seagate Cheetah ST373455LC 15,000 RPM 146GB drives<br />
* Capacity: 292Gb <br />
* User: rabinnh<br />
* Filesystem: ext4 on x86_64<br />
* Comment: No, this is not an SSD, but Googlers should have a reasonable basis for comparison to a high end hard drive system, and you won't get much higher end for an individual workstation. The cost of this disk subsystem is conservatively $760, and it gives at best half the performance of most SSDs.<br />
<br />
<pre>$sudo hdparm -Tt /dev/sda2<br />
/dev/sda2:<br />
Timing cached reads: 6344 MB in 2.00 seconds = 3174.02 MB/sec<br />
Timing buffered disk reads: 442 MB in 3.01 seconds = 146.97 MB/sec</pre><br />
<br />
<pre>$dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.13482 s, 150 MB/s<br />
</pre><br />
<pre><br />
$echo 3 > /proc/sys/vm/drop_caches<br />
$dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.24267 s, 148 MB/s</pre><br />
<br />
<pre>$dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.459814 s, 2.3 GB/s</pre></div>
Zatricky
https://wiki.archlinux.org/index.php?title=Benchmarking/Data_storage_devices&diff=363883
Benchmarking/Data storage devices
2015-03-04T13:05:21Z
<p>Zatricky: /* Added Intel 330 60GB */</p>
<hr />
<div>[[Category:Storage]]<br />
{{Related articles start}}<br />
{{Related|Solid State Drives}}<br />
{{Related|Benchmarking}}<br />
{{Related articles end}}<br />
<br />
This article covers several Linux-native apps that benchmark I/O devices such as HDDs, SSDs, USB thumb drives, etc. There is also a "database" section specific to SSDs meant to capture user-entered benchmark results.<br />
<br />
==Introduction==<br />
Several I/O benchmark options exist under Linux.<br />
<br />
* Using hddparm with the -Tt switch, one can time sequential reads. This method is '''independent''' of partition alignment!<br />
* There is a graphical benchmark called gnome-disks contained in the {{pkg|gnome-disk-utility}} package that will give min/max/ave reads along with ave access time and a nice graphical display. This method is '''independent''' of partition alignment!'''<br />
* The dd utility can be used to measure both reads and writes. This method is '''dependent''' on partition alignment! In other words, if you failed to properly align your partitions, this fact will be seen here since you're writing and reading to a mounted filesystem.<br />
* [[Benchmarking#Bonnie.2B.2B|Bonnie++]]<br />
<br />
=== Using hdparm ===<br />
<br />
# hdparm -Tt /dev/sdX<br />
/dev/sdX:<br />
Timing cached reads: x MB in y seconds = z MB/sec<br />
Timing buffered disk reads: x MB in y seconds = z MB/sec<br />
<br />
{{Note|One should run the above command 4-5 times and manually average the results for an accurate evaluation of read speed per the hddparm man page.}}<br />
<br />
=== Using gnome-disks ===<br />
<br />
# gnome-disks<br />
<br />
Users will need to navigate through the GUI to the benchmark button ("More actions..." => "Benchmark Volume..."). [http://imgur.com/Ayv1B Example]<br />
<br />
=== Using systemd-analyze ===<br />
<br />
systemd-analyze plot > boot.svg<br />
<br />
Will plot a detailed graphic with the boot sequence: kernel time, userspace time, time taken by each service. [http://imgur.com/4ywt1 Example]<br />
<br />
=== Using dd ===<br />
<br />
{{Note|This method requires the command to be executed from a mounted partition on the device of interest!}}<br />
<br />
First, enter a directory on the SSD with at least 1.1 GB of free space (and one that obviously gives your user wrx permissions) and write a test file to measure write speeds and to give the device something to read:<br />
<br />
$ cd /path/to/SSD<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
w bytes (x GB) copied, y s, z MB/s<br />
<br />
Next, clear the buffer-cache to accurately measure read speeds directly from the device:<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
w bytes (x GB) copied, y s, z MB/s<br />
<br />
Now that the last file is in the buffer, repeat the command to see the speed of the buffer-cache:<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
w bytes (x GB) copied, y s, z GB/s<br />
<br />
{{Note|One should run the above command 4-5 times and manually average the results for an accurate evaluation of the buffer read speed.}}<br />
<br />
Finally, delete the temp file<br />
$ rm tempfile<br />
==== Caveats ====<br />
Some SSD controllers have compression hardware, which may skew benchmark results. See http://www.pugetsystems.com/labs/articles/SSDs-Advertised-vs-Actual-Performance-179/<br />
=== Model Specific Data ===<br />
Please contribute to this section using the template below to post results obtained.<br />
<br />
See [http://www.anandtech.com/bench/SSD/65 here] for a nice database of benchmarks.<br />
<br />
=== Template ===<br />
*SSD:<br />
*Model Number:<br />
*Firmware Version:<br />
*Capacity: x GB<br />
*Controller:<br />
*User:<br />
*Kernel:<br />
[*Filesystem: write something about your FS, optional]<br />
[*Notes: additional Notes, optional]<br />
<br />
# hdparm -Tt /dev/sdx<br />
<br />
Minimum Read Rate: x MB/s<br />
Maximum Read Rate: x MB/s<br />
Average Read Rate: x MS/s<br />
Average Access Time x ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
<br />
== Results ==<br />
<br />
=== Table ===<br />
<br />
All values are taken from the [https://wiki.archlinux.org/index.php/SSD_Benchmarking#Using_dd ''dd'' benchmark]. This is just an overview and has no scientific use.<br />
<br />
{| class="wikitable"<br />
! User !! Vendor !! Model !! Capacity [GB] !! Write [MB/sec] !! Read [MB/sec] !! Re-Read [MB/sec]<br />
|-<br />
| jac || Crucial || C300 || 128 || 138 || 372 || 6500<br />
|-<br />
| Fraoch || Crucial || M4 || 64 || 114 || 445 || 3800<br />
|-<br />
| lynix || Crucial || M4 || 128 || 193 || 268 || 6800<br />
|-<br />
| wzyboy || Crucial || M4 || 64 || 113 || 276 || 3400<br />
|-<br />
| gehidore || Crucial || M500 || 240 || 253 || 532 || 4700<br />
|-<br />
| digital || Crucial || MX100 || 512 || 455 || 506 || 3300<br />
|-<br />
| dundee || Intel || 310 Soda Creek || 40 || 44.2 || 197 || 4200<br />
|-<br />
| bugflux || Intel || 330 || 120 || 44.2 || 242 || 4500<br />
|-<br />
| Cirk || Intel || X18-M (G2) || 160 || 103 || 263 || 2700<br />
|-<br />
| Graysky || Intel || X25-M (G2) || 80 || 80.6 || 268 || 6300<br />
|-<br />
| fackamato || Intel || X25-M (G2) || 160 || 98 || 262 || 3000<br />
|-<br />
| Cirk || Intel || X25-M (G2) || 80 || 70 || 208 || 4200<br />
|-<br />
| timo.hardebusch || Intel || X25-M (G2) || 120 || 106 || 265 || 2900<br />
|-<br />
| mloyer || Intel || 730 (SATA-II) || 240 || 232 || 249 || 4900<br />
|-<br />
| Musikolo || OCZ || Vertex 4 SATA 3 || 128 || 233 || 392 || 3600<br />
|-<br />
| Graysky || OCZ || Vertex 4 SATA 3 || 128 || 228 || 394 || -<br />
|-<br />
| Graysky || OCZ || Vertex 4 SATA 2 || 128 || 251 || 284 || -<br />
|-<br />
| Surfed || OCZ || Vertex || 60 || 142 || 236 || 5200<br />
|-<br />
| Sputnick || OCZ || Vertex 3 || 120 || 245 || 225 || 4600<br />
|-<br />
| ScottKidder || OCZ || Vertex Turbo || 30 || 49 || 115 || 2600<br />
|-<br />
| longint || OCZ || Vertex 2 || 240 || 852? || 241 || 3400<br />
|-<br />
| muflone || OCZ || Vertex 3 || 120 || 377 || 291 || 10300<br />
|-<br />
| bardo || OCZ || Agility 3 || 120 || 445 || 455 || 8200<br />
|-<br />
| Cirk || Samsung || MMCQE28GFMUP-MVA || 128 || 45 || 99 || 2300<br />
|-<br />
| skylinux || Samsung || 470 || 64 || 188 || 204 || 1000<br />
|-<br />
| kevincodux || Samsung || 830 || 128 || 313 || 525 || 9000<br />
|-<br />
| Earlz || Samsung || 840 || 250 || 242 || 282 || 9800<br />
|-<br />
| Ricky || Samsung || 840 evo|| 120 || 223 || 281 || 2200<br />
|-<br />
| Ricky || Samsung || 840 evo|| 500 || 428 || 538 || 7900<br />
|-<br />
| Ricky || Samsung || 840 evo|| 1TB || 413 || 528 || 8800<br />
|-<br />
| wzyboy || Samsung || 840 Pro || 256 || 481 || 547 || 7100<br />
|-<br />
| karamaz0v || Samsung || 840 Evo || 120 || 451 || 538 || 6600<br />
|-<br />
| csivanich || Samsung || 840 Evo || 120 || 480 || 530 || 6200<br />
|-<br />
| uleenucks || Samsung || 840 Evo || 250 || 503 || 538 || 8100<br />
|-<br />
| N30N || Samsung || 850 PRO || 512 || 459 || 552 || 11200<br />
|-<br />
| Dani || Sandisk || Extreme || 240 || 481 || 414 || 6000<br />
|-<br />
| kozaki || Sandisk || Extreme || 120 || 458 || 403 || 8200<br />
|-<br />
| Roshless || Sandisk || Ultra Plus || 64 || 150 || 193 || 1500<br />
|- <br />
| Fraoch || Seagate || 600 || 240 || 432 || 526 || 3700<br />
|-<br />
| Artsibash || Kingston || HyperX || 120 || 451 || 431 || 8600<br />
|- <br />
| WonderWoofy || Kingston || HyperX 3k || 120 || 518 || 316 || 7200<br />
|-<br />
| Tuxe || Kingston || SSDNow V+100 || 128 || 110 || 232 || 3300<br />
|-<br />
| Ricky || Kingston || SSDNow V300 || 128 || 216 || 234 || 2400<br />
|-<br />
| thof || Kingston || SNV425-S2BD || 128 || 164 || 260 || 3000<br />
|-<br />
| WonderWoofy || Mushkin || Atlas (mSATA II) || 128 || 262 || 242 || 7300<br />
|-<br />
| Wwwutz || Mushkin || Scorpion Deluxe (PCIe) || 1920 || 697 || 939 || 2100<br />
|-<br />
| AleksMK || Liteon || M3S || 256 || 336 || 432 || 4200<br />
|-<br />
| AsmundEr || WD mechanical drive || over gigE network (NFS) || 3000 || 48 || 117 || 7700<br />
|-<br />
| N30N || Plextor || PX-G256M6e || 256 || 483 || 690 || 9800<br />
|}<br />
<br />
=== Baseline: mechanical drive over ethernet ===<br />
*HDD: WD AV-GP 3TB (SATA 2)<br />
*Model number: WD30EURS<br />
*Firmware version: ?<br />
*Capacity: 2.7 TB<br />
*User: AsmundEr<br />
*Kernel: 3.9.9<br />
*Filesystem: ZFS (native) with mirroring onto two drives (i.e. RAID-1)<br />
*Notes: filesystem mounted over gigabit LAN network using NFSv4.<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 22.2138 s, 48.3 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.20926 s, 117 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.13901 s, 7.7 GB/s<br />
<br />
=== Corsair ===<br />
==== Corsair Force 3 ====<br />
*SSD: Corsair Force 3 120gb (SATA 3)<br />
*Model Number: Corsair Force 3 SSD<br />
*Firmware Version: 1.3.3 <br />
*Capacity: 120 GB<br />
*User: bserem<br />
*Kernel: 3.4.9<br />
*Filesystem: BTRFS<br />
*Notes: , Systemd, UEFI (with a small FAT uefi partition at the beggining of the disk)<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 28232 MB in 2.00 seconds = 14137.02 MB/sec<br />
Timing buffered disk reads: 1164 MB in 3.01 seconds = 387.33 MB/sec<br />
<br />
Minimum Read Rate: 388.04 MB/s<br />
Maximum Read Rate: 387.13 MB/s<br />
Average Read Rate: 387.252 MS/s<br />
<br />
<br />
=== Crucial ===<br />
==== Crucial C300 ====<br />
*SSD: Crucial C300 (SATA 3: 6Gb/s)<br />
*Model Number: CTFDDAC128MAG-1G1<br />
*Capacity: 128 GB<br />
*User: jac<br />
<br />
# hdparm -Tt /dev/sdb<br />
/dev/sda:<br />
Timing cached reads: 24112 MB in 2.00 seconds = 12072.84 MB/sec<br />
Timing buffered disk reads: 1056 MB in 3.00 seconds = 351.58 MB/sec<br />
<br />
Minimum Read Rate: 350.88 MB/s<br />
Maximum Read Rate: 351.58 MB/s<br />
Average Read Rate: 351.264 MB/s<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.77883 s, 138 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.88752 s, 372 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.164471 s, 6.5 GB/s<br />
<br />
==== Crucial M4 ====<br />
*SSD: Crucial M4 (SATA 3: 6Gb/s)<br />
*Model Number: M4-CT128M4SSD2 (Firmware: 0009)<br />
*Capacity: 128 GB<br />
*User: lynix<br />
*Filesystem: ext4 on LVM<br />
*Notes: connected to SATAII 3Gb/s port while benchmarking. firmware matters!<br />
<br />
# hdparm -Tt /dev/sde<br />
/dev/sde:<br />
Timing cached reads: 19094 MB in 2.00 seconds = 9559.40 MB/sec<br />
Timing buffered disk reads: 786 MB in 3.00 seconds = 261.63 MB/sec<br />
<br />
Minimum Read Rate: 271.7 MB/s<br />
Maximum Read Rate: 381.7 MB/s<br />
Average Read Rate: 279.0 MB/s<br />
<br />
Minimum Write Rate: 58.6 MB/s<br />
Maximum Write Rate: 258.9 MB/s<br />
Average Write Rate: 194.8 MB/s<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.57478 s, 193 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.00688 s, 268 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.157567 s, 6.8 GB/s<br />
<br />
*SSD: Crucial M4 (SATA III)<br />
*Model Number: M4-CT064M4SSD2<br />
*Firmware Version: 070H<br />
*Capacity: 64 GB<br />
*Controller: AMD SB950<br />
*User: Fraoch<br />
*Kernel: 3.8.0<br />
*Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sdb<br />
Timing cached reads: 7532 MB in 2.00 seconds = 3767.26 MB/sec<br />
Timing buffered disk reads: 1294 MB in 3.00 seconds = 431.20 MB/sec<br />
<br />
Average Read Rate: 506.9 MB/s<br />
Average Access Time: 0.08 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.44004 s, 114 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.41524 s, 445 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.295721 s, 3.6 GB/s<br />
<br />
==== Crucial MX100 ====<br />
*SSD: Crucial MX100<br />
*Model Number:Crucial CT512MX100SSD1<br />
*Firmware Version: MU01<br />
*Capacity: 512 GB<br />
*Controller: Marvel<br />
*User: digital<br />
*Kernel: 3.12.14<br />
<br />
Tested on a stock ext4 FS using the default kernel IO scheduler. <br />
Fresh SSD, no data. Connect to SATA III 6.0 Gb/s.<br />
<br />
# for i in 1 2 3; hdparm -Tt /dev/sdx; done<br />
Timing cached reads: 6810 MB in 2.00 seconds = 3406.75 MB/sec<br />
Timing buffered disk reads: 1520 MB in 3.00 seconds = 506.18 MB/sec<br />
Timing cached reads: 6872 MB in 2.00 seconds = 3437.75 MB/sec<br />
Timing buffered disk reads: 1520 MB in 3.00 seconds = 506.60 MB/sec<br />
Timing cached reads: 6784 MB in 2.00 seconds = 3394.36 MB/sec<br />
Timing buffered disk reads: 1520 MB in 3.00 seconds = 506.23 MB/sec<br />
<br />
Minimum Read Rate: 506.18 MB/s<br />
Maximum Read Rate: 506.60 MB/s<br />
Average Read Rate: 506.39 MS/s<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.36188 s, 455 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.78104 s, 386 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.322937 s, 3.3 GB/s<br />
<br />
=== Intel ===<br />
==== Intel 310 Soda Creek ====<br />
*SSD: Intel 310 Soda Creek<br />
*Model Number: SSDMAEMC040G2<br />
*Firmware Version: 2CV1023M<br />
*Capacity: 40 GB<br />
*User: dundee<br />
*Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 6278 MB in 2.00 seconds = 3141.39 MB/sec<br />
Timing buffered disk reads: 784 MB in 3.00 seconds = 260.96 MB/sec<br />
<br />
Minimum Read Rate: 189.7 MB/s<br />
Maximum Read Rate: 281.1 MB/s<br />
Average Read Rate: 277.1 MS/s<br />
Minimum Write Rate: 30.3 MB/s<br />
Maximum Write Rate: 44.6 MB/s<br />
Average Write Rate: 43.8 MS/s<br />
<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 24.3013 s, 44.2 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.45325 s, 197 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.255569 s, 4.2 GB/s<br />
<br />
==== Intel 330 60GB ====<br />
*SSD: Intel 330<br />
*Model Number: SSDSC2CT060A3<br />
*Firmware Version: 300i<br />
*Capacity: 60 GB<br />
*User: Zatricky<br />
*Filesystem: btrfs<br />
*{{Note|Nothing}}<br />
<br />
$ hdparm -tT /dev/sdc<br />
/dev/sdc:<br />
Timing cached reads: 2758 MB in 2.00 seconds = 1380.05 MB/sec<br />
Timing buffered disk reads: 670 MB in 3.00 seconds = 223.15 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.05431 s, 523 MB/s<br />
<br />
$ echo 3 > /proc/sys/vm/drop_caches ; dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.89014 s, 568 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.61149 s, 666 MB/s<br />
<br />
==== Intel 330 120GB ====<br />
*SSD: Intel 330<br />
*Model Number: SSDSC2CT120A3<br />
*Firmware Version: 300i<br />
*Capacity: 120 GB<br />
*User: bugflux<br />
*Filesystem: ext4<br />
*{{Note|Sata II computer}}<br />
<br />
# hdparm -tT /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 9222 MB in 2.00 seconds = 4612.61 MB/sec<br />
Timing buffered disk reads: 672 MB in 3.01 seconds = 223.40 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 24.3013 s, 44.2 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.43827 s, 242 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.240778 s, 4.5 GB/s<br />
<br />
==== Intel X18-M (G2) ====<br />
*SSD: Intel X18-M Generation 2<br />
*Model Number: SSDSA1M1602GN<br />
*Capacity: 160 GB<br />
*User: Cirk<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 2826 MB in 2.00 seconds = 1414.39 MB/sec<br />
Timing buffered disk reads: 694 MB in 3.00 seconds = 231.14 MB/sec<br />
<br />
Minimum Read Rate: 216.1 MB/s<br />
Maximum Read Rate: 283.5 MB/s<br />
Average Read Rate: 271.2 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 10.4608 s, 103 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.0866 s, 263 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.403244 s, 2.7 GB/s<br />
<br />
==== Intel X25-M (G2) ====<br />
*SSD: Intel X25-M Generation 2<br />
*Model Number: SSDSA2MH080G2R5<br />
*Capacity: 80 GB<br />
*User: Graysky<br />
<br />
# hdparm -Tt /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 15644 MB in 1.99 seconds = 7845.48 MB/sec<br />
Timing buffered disk reads: 788 MB in 3.00 seconds = 262.52 MB/sec<br />
<br />
Minimum Read Rate: 253.6 MB/s<br />
Maximum Read Rate: 286.1 MB/s<br />
Average Read Rate: 282.6 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 13.3236 s, 80.6 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.00297 s, 268 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.169713 s, 6.3 GB/s<br />
<br />
==== Intel X25-M (G2) ====<br />
*SSD: Intel X25-M Generation 2<br />
*Model Number: SSDSA2M160G2GC<br />
*Capacity: 160 GB<br />
*User: fackamato<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 2890 MB in 2.00 seconds = 1445.86 MB/sec<br />
Timing buffered disk reads: 738 MB in 3.00 seconds = 245.69 MB/sec<br />
<br />
Minimum Read Rate: 244.3 MB/s<br />
Maximum Read Rate: 278.6 MB/s<br />
Average Read Rate: 273.3 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 10.8582 s, 98.9 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.09679 s, 262 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.363709 s, 3.0 GB/s<br />
<br />
==== Intel X25-M (G2) ====<br />
*SSD: Intel X25-M Generation 2<br />
*Model Number: SSDSA2M080G2C<br />
*Capacity: 80 GB<br />
*User: Cirk<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 9384 MB in 2.00 seconds = 4694.29 MB/sec<br />
Timing buffered disk reads: 808 MB in 3.01 seconds = 268.64 MB/sec<br />
<br />
Minimum Read Rate: 229.9 MB/s<br />
Maximum Read Rate: 281.6 MB/s<br />
Average Read Rate: 272.4 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 15.1671 s, 70.8 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.15237 s, 208 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.256211 s, 4.2 GB/s<br />
<br />
==== Intel X25-M (G2) ====<br />
*SSD: Intel X25-M Generation 2<br />
*Model Number: SSDSA2MH120G2K5<br />
*Capacity: 120 GB<br />
*User: timo.hardebusch<br />
<br />
# hdparm -Tt /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 4358 MB in 2.00 seconds = 2178.89 MB/sec<br />
Timing buffered disk reads: 752 MB in 3.01 seconds = 250.07 MB/sec<br />
<br />
Minimum Read Rate: 259.1 MB/s<br />
Maximum Read Rate: 283.3 MB/s<br />
Average Read Rate: 280.6 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 10.1452 s, 106 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.05181 s, 265 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.369308 s, 2.9 GB/s<br />
<br />
==== Intel 730 ====<br />
*SSD: Intel 730<br />
*Model Number: SSDSC2BP240G4R5<br />
*Capacity: 240 GB<br />
*User: mloyer<br />
*Filesystem: ext4<br />
*{{Note|Sata II computer}}<br />
<br />
# hdparm -tT /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 13710 MB in 2.00 seconds = 6861.02 MB/sec<br />
Timing buffered disk reads: 794 MB in 3.00 seconds = 264.62 MB/sec<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.31867 s, 249 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.31867 s, 249 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.220314 s, 4.9 GB/s<br />
<br />
=== OCZ ===<br />
==== OCZ-VERTEX 4 128 GB ====<br />
*SSD:OCZ Vertex 4<br />
*Model Number: VTX4-25SAT3<br />
*Firmware Version: 1.5<br />
*Capacity: 128 GB<br />
*Controller: Marvell Technology Group Ltd. 88SE9128 PCIe SATA 6 Gb/s RAID controller (rev 11)<br />
*Kernel: 3.6.11-1<br />
*User: Musikolo<br />
*Notes: <br />
** Filesystem: ext4 with options ''defaults,relatime,discard''. <br />
** Partition: aligned (fist sector 2048 / 1MiB free space at the beginning). Additional info [https://bbs.archlinux.org/viewtopic.php?pid=1211245#p1211245 here].<br />
** Scheduler: deadline. Additional info [https://wiki.archlinux.org/index.php/Solid_State_Drives#Using_udev_for_one_device_or_HDD.2FSSD_mixed_environment here].<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 7752 MB in 2.00 seconds = 3877.19 MB/sec<br />
Timing buffered disk reads: 1122 MB in 3.00 seconds = 373.78 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.60766 s, 233 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.74071 s, 392 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.302118 s, 3.6 GB/s<br />
<br />
==== OCZ-VERTEX 4 128 GB ====<br />
*SSD:OCZ Vertex 4<br />
*Model Number: VTX4-25SAT3 - '''firmware 1.5'''<br />
*Capacity: 128 GB<br />
*User: [[User:Graysky]]<br />
===== In SATA 6.0 Gb/s Controller =====<br />
# hdparm -Tt /dev/sda<br />
<br />
/dev/sda:<br />
Timing cached reads: 33756 MB in 2.00 seconds = 16902.49 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.9279 s, 367 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.49942 s, 430 MB/s<br />
<br />
===== In SATA 3.0 Gb/s Controller =====<br />
# hdparm -Tt /dev/sda<br />
<br />
/dev/sda:<br />
Timing cached reads: 15842 MB in 2.00 seconds = 7930.79 MB/sec<br />
Timing buffered disk reads: 814 MB in 3.00 seconds = 271.02 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.28493 s, 251 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.78546 s, 284 MB/s<br />
<br />
==== OCZ-VERTEX 60gb ====<br />
*SSD:OCZ-VERTEX<br />
*Model Number:Firmware 1.5<br />
*Capacity: 60 GB<br />
*User:Surfed<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 16306 MB in 2.00 seconds = 8162.55 MB/sec<br />
Timing buffered disk reads: 646 MB in 3.00 seconds = 215.09 MB/sec<br />
<br />
<br />
Minimum Read Rate: 226.7 MB/s<br />
Maximum Read Rate: 275.2 MB/s<br />
Average Read Rate: 256.9 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.5581 s, 142 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.55881 s, 236 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.205299 s, 5.2 GB/s<br />
<br />
==== OCZ-VERTEX3 120 ====<br />
*SSD:OCZ-VERTEX3<br />
*Firmware Version:<br />
*Capacity: 6Gb/s SATA III<br />
*User:[[User:pingpong]]<br />
<br />
# hdpram -Tt /dev/sda<br />
<br />
/dev/sda:<br />
Timing cached reads: 11180 MB in 2.00 seconds = 5594.15 MB/sec<br />
Timing buffered disk reads: 736 MB in 3.00 seconds = 245.27 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.20024 s, 256 MB/s<br />
<br />
#echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.12454 s, 260 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.172948 s, 6.2 GB/s<br />
<br />
==== OCZ-VERTEX3 120GO ====<br />
*SSD:OCZ-VERTEX3<br />
*Firmware Version:2.06<br />
*Capacity: 6Gb/s SATA III<br />
*User:[[User:Sputnick]]<br />
*Notes: tested on '''SATA II 3Gb/s Dell Optiplex 780 motherboard''' 0C27VV <br />
<br />
# hdparm -Tt /dev/sdc<br />
<br />
/dev/sdc:<br />
Timing cached reads: 13702 MB in 2.00 seconds = 6859.89 MB/sec<br />
Timing buffered disk reads: 644 MB in 3.00 seconds = 214.40 MB/sec<br />
<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 enregistrements lus<br />
1024+0 enregistrements écrits<br />
1073741824 octets (1,1 GB) copiés, 4,37831 s, 245 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 enregistrements lus<br />
1024+0 enregistrements écrits<br />
1073741824 octets (1,1 GB) copiés, 4,76932 s, 225 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 enregistrements lus<br />
1024+0 enregistrements écrits<br />
1073741824 octets (1,1 GB) copiés, 0,234682 s, 4,6 GB/s<br />
<br />
==== OCZ-VERTEX-TURBO 30gb ====<br />
*SSD:OCZ-VERTEX-TURBO<br />
*Model Number:Firmware 1.5<br />
*Capacity: 30 GB<br />
*User:ScottKidder<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 6286 MB in 2.00 seconds = 3149.62 MB/sec<br />
Timing buffered disk reads: 630 MB in 3.01 seconds = 209.10 MB/sec<br />
<br />
Minimum Read Rate: 211.8 MB/s<br />
Maximum Read Rate: 254.1 MB/s<br />
Average Read Rate: 249.2 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 21.5437 s, 49.8 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.34704 s, 115 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.40667 s, 2.6 GB/s<br />
<br />
==== OCZ-VERTEX2 240GB ====<br />
*SSD: OCZ<br />
*Model Number: Vertex2<br />
*Capacity: 240GB<br />
*User: longint<br />
*Filesystem: btrfs compression=lzo,space_cache<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 10972 MB in 2.00 seconds = 5489.70 MB/sec<br />
Timing buffered disk reads: 648 MB in 3.00 seconds = 215.96 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.26013 s, 852 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.45112 s, 241 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.320492 s, 3.4 GB/s<br />
<br />
==== OCZ-VERTEX3 120GB ====<br />
*SSD:OCZ-VERTEX3 SATA III<br />
*Firmware Version:2.13<br />
*Capacity: 120 GB<br />
*Filesystem: ext4 with discard and commit=60<br />
*[[User:muflone]]<br />
<br />
# hdparm -Tt /dev/sdc<br />
/dev/sdc:<br />
Timing cached reads: 23870 MB in 2.00 seconds = 11950.12 MB/sec<br />
Timing buffered disk reads: 866 MB in 3.00 seconds = 288.36 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.85159 s, 377 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.6931 s, 291 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.10383 s, 10.3 GB/s<br />
<br />
==== OCZ-AGILITY3 120GB ====<br />
*SSD:OCZ-AGILITY3 SATA III<br />
*Firmware Version:2.15<br />
*Capacity: 120 GB<br />
*Filesystem: ext4 with discard<br />
*[[User:bardo]]<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 27738 MB in 2.00 seconds = 13889.38 MB/sec<br />
Timing buffered disk reads: 1158 MB in 3.01 seconds = 385.08 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.41537 s, 445 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.35961 s, 455 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.130664 s, 8.2 GB/s<br />
<br />
=== Samsung ===<br />
==== SAMSUNG 128GB / SATAII ====<br />
*SSD: SAMSUNG 128GB / SATAII<br />
*Model Number: MMCQE28GFMUP-MVA<br />
*Capacity: 128 GB<br />
*User: Cirk<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 2612 MB in 2.00 seconds = 1307.40 MB/sec<br />
Timing buffered disk reads: 294 MB in 3.01 seconds = 97.67 MB/sec<br />
<br />
Minimum Read Rate: 108.7 MB/s<br />
Maximum Read Rate: 114.5 MB/s<br />
Average Read Rate: 113.7 MB/s<br />
Average Access Time 0.2 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 23.7352 s, 45.2 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 10.7563 s, 99.8 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.464824 s, 2.3 GB/s<br />
<br />
==== SAMSUNG 470 64GB ====<br />
*SSD: SAMSUNG 470 64GB<br />
*Model Number: MZ-5PA064/US<br />
*Firmware: AXM070Q1<br />
*Capacity: 64 GB<br />
*User: skylinux<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 1736 MB in 2.00 seconds = 868.62 MB/sec<br />
Timing buffered disk reads: 516 MB in 3.00 seconds = 171.87 MB/sec<br />
<br />
Minimum Read Rate: 276.5 MB/s<br />
Maximum Read Rate: 278.8 MB/s<br />
Average Read Rate: 278.2 MB/s<br />
Average Access Time 0.2 ms<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.69714 s, 188 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.25116 s, 204 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.05824 s, 1.0 GB/s<br />
<br />
==== SAMSUNG 830 128GB SATAII ====<br />
*SSD: SAMSUNG 830 128GB<br />
*Model Number: MZ-7PC128D<br />
*Firmware: CXM03B1Q<br />
*Capacity: 128 GB<br />
*[[User: lockheed]]<br />
*Filesystem: ext4 defaults,noatime,commit=60<br />
*Notes: SATA II, partitions aligned, with swap, C2D 2.5 GHz<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 12616 MB in 1.99 seconds = 6334.84 MB/sec<br />
Timing buffered disk reads: 802 MB in 3.01 seconds = 266.78 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.82496 s, 226 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.84014 s, 280 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.300189 s, 3.6 GB/s<br />
<br />
==== SAMSUNG 830 128GB ====<br />
*SSD: SAMSUNG 830 128GB<br />
*Model Number: MZ-7PC128D<br />
*Firmware: CXM03B1Q<br />
*Capacity: 128 GB<br />
*[[User: kevincodux]]<br />
*Filesystem: ext4,discard,noatime<br />
*Notes: SATAIII, partitions aligned and no swap<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 22130 MB in 2.00 seconds = 11080.54 MB/sec<br />
Timing buffered disk reads: 1500 MB in 3.00 seconds = 499.38 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.42567 s, 313 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.04691 s, 525 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.119695 s, 9.0 GB/s<br />
<br />
==== SAMSUNG 830 256GB ====<br />
*SSD: SAMSUNG 830 256GB<br />
*Model Number: MZ-7PC256<br />
*Firmware Version: CXM03B1Q<br />
*Capacity: 256 GB<br />
*User: Revelation<br />
*Kernel: 3.5.4<br />
*Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 15888 MB in 2.00 seconds = 7952.13 MB/sec<br />
Timing buffered disk reads: 1464 MB in 3.00 seconds = 488.00 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3,15782 s, 340 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2,08421 s, 515 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.119695 s, 6.2 GB/s<br />
<br />
====SAMSUNG 840 120GB ====<br />
<br />
*SSD: Samsung SSD 840 Series<br />
*Model Number: 840 (non Pro)<br />
*Firmware Version: DXT08B0Q<br />
*Capacity: 120 GB<br />
*User: willybilly0101<br />
*Kernel: 3.10.10-1-ARCH #1 SMP PREEMPT<br />
*Filesystem: Btrfs - defaults,noatime,compress=lzo<br />
<br />
{{Note|1=There is a known fault with this drive identified in August 2014. The drive has a fault which means that it slows down with age. To fix this problem download the [http://www.samsung.com/global/business/semiconductor/samsungssd/downloads.html?gclid=COaEp9KfrsECFZTLtAodanEAIg Samsung SSD 840 EVO Performance Restoration Software and EXT0CB6Q firmware from Samsung's website].}}<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 11346 MB in 2.00 seconds = 5677.40 MB/sec<br />
Timing buffered disk reads: 1534 MB in 3.00 seconds = 511.24 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.05137 s, 523 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.08204 s, 992 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.232285 s, 4.6 GB/s<br />
<br />
==== SAMSUNG 840 250GB ====<br />
<br />
*SSD: SAMSUNG 840 250GB<br />
*Firmware: DXT07B0Q<br />
*Capacity: 250 GB<br />
*Filesystem: XFS(defaults,relatime,discard)<br />
*Kernel: 3.7.7-1-ARCH<br />
*Other details: SATA3 motherboard and hookups. Configured with hdparm to reserve 20% of the drive for over-provisioning<br />
*[[User: Earlz]]<br />
<br />
# hdparm -Tt /dev/sdc<br />
/dev/sdc:<br />
Timing cached reads: 21380 MB in 2.00 seconds = 10703.38 MB/sec<br />
Timing buffered disk reads: 810 MB in 3.00 seconds = 269.74 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.44147 s, 242 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.80874 s, 282 MB/s<br />
<br />
Notes:<br />
Firmware updating was a pain because they don't make it obvious you can update without using their Windows-only magician software. Go [http://www.samsung.com/global/business/semiconductor/samsungssd/downloads.html here] for ISO images of the updates pre-made and ready to download.<br />
<br />
{{Note|1=There is a known fault with this drive identified in August 2014. The drive has a fault which means that it slows down with age. To fix this problem download the [http://www.samsung.com/global/business/semiconductor/samsungssd/downloads.html?gclid=COaEp9KfrsECFZTLtAodanEAIg Samsung SSD 840 EVO Performance Restoration Software and EXT0CB6Q firmware from Samsung's website].}}<br />
<br />
==== SAMSUNG 840 evo 120GB ====<br />
*SSD: SAMSUNG 840 evo 120GB<br />
*Model Number: Samsung SSD 840 EVO 120GB<br />
*Firmware: EXT0BB6Q<br />
*Capacity: 128 GB<br />
*[[User: Ricky]]<br />
*Filesystem: ext4,discard,noatime<br />
*Notes: SATAII, partitions aligned, 10% over-provisioning and no swap<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 4588 MB in 1.99 seconds = 2299.87 MB/sec<br />
Timing buffered disk reads: 808 MB in 3.01 seconds = 268.80 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.82364 s, 223 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.8185 s, 281 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.496013 s, 2.2 GB/s<br />
<br />
==== SAMSUNG 840 Evo 120GB ====<br />
*SSD: SAMSUNG 840 Evo 120GB<br />
*Model Number: Samsung SSD 840 EVO 120GB<br />
*Firmware: EXT0BB6Q<br />
*Capacity: 120 GB<br />
*[[User: karamaz0v]]<br />
*Filesystem: ext4,relatime<br />
*Notes: SATA III, partitions aligned to 1536 KiB EBS (3072 sectors)<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.38095 s, 451 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.99437 s, 538 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.163231 s, 6.6 GB/s<br />
<br />
==== Samsung 840 evo 250 GB ====<br />
*SSD: Samsung 840 Evo 250 GB<br />
*Model Number: Samsung 840 Evo 250 GB<br />
*Firmware Version: EXT0BB6Q<br />
*Capacity: 250 GB<br />
*[[User: uleenucks]]<br />
*Kernel:3.18.2-2-ARCH<br />
*Filesystem: ext4 rw,noatime,nodiratime,discard<br />
<br />
# hdparm -Tt /dev/sdb<br />
Timing cached reads: 30606 MB in 2.00 seconds = 15319.57 MB/sec<br />
Timing buffered disk reads: 1558 MB in 3.00 seconds = 519.00 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.13545 s, 503 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.99491 s, 538 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.13152 s, 8.2 GB/s<br />
<br />
==== SAMSUNG 840 evo 500GB ====<br />
*SSD: SAMSUNG 840 evo 500GB<br />
*Model Number: Samsung SSD 840 EVO 500GB<br />
*Firmware: EXT0BB6Q<br />
*Capacity: 500 GB<br />
*[[User: Ricky]]<br />
*Filesystem: ext4, noatime<br />
*Kernel: 3.14.3-200.fc20.x86_64<br />
*Notes: SATAIII, partitions aligned with 1536KiB erase block, 6% over-provisioning<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 29328 MB in 2.00 seconds = 14686.69 MB/sec<br />
Timing buffered disk reads: 1550 MB in 3.00 seconds = 516.35 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.51136 s, 428 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.99533 s, 538 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.136775 s, 7.9 GB/s<br />
<br />
==== SAMSUNG 840 evo 1TB ====<br />
*SSD: SAMSUNG 840 evo 1TB<br />
*Model Number: Samsung SSD 840 EVO 1TB<br />
*Firmware: EXT0BB6Q<br />
*Capacity: 1 TB<br />
*[[User: Ricky]]<br />
*Filesystem: ext4<br />
*Notes: SATAIII, partitions aligned, 30GB over-provisioning and no swap<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 27018 MB in 2.00 seconds = 13523.27 MB/sec<br />
Timing buffered disk reads: 1526 MB in 3.00 seconds = 508.55 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.60038 s, 413 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.03471 s, 528 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.121486 s, 8.8 GB/s<br />
<br />
==== SAMSUNG 840 Pro 256 GB ====<br />
* SSD: Samsung 840 Pro 256 GB<br />
* Model Number: Samsung SSD 840 PRO Series<br />
* Firmware Version: DXM05B0Q<br />
* Capacity: 256 GB<br />
* Controller: SATA III<br />
* User: wzyboy<br />
* Kernel: 3.13.5-1-ARCH<br />
* Filesystem: Ext4 on aligned GPT, "discard" parameter enabled, no swap<br />
* Platform: ThinkPad X240s, i7-4500U, 8 GiB RAM<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 19334 MB in 2.00 seconds = 9677.52 MB/sec<br />
Timing buffered disk reads: 1562 MB in 3.00 seconds = 520.56 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 2,23356 s, 481 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 1,96205 s, 547 MB/s<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 0,15168 s, 7,1 GB/s<br />
<br />
==== Samsung 850 EVO 120GB ====<br />
*SSD: Samsung SSD 850 EVO<br />
*Firmware Version: EMT01B6Q<br />
*Capacity: 120GB<br />
*Kernel: 3.18.2<br />
*Filesystem: ext4 with noatime,data=ordered<br />
<br />
# sudo hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 14664 MB in 2.00 seconds = 7336.34 MB/sec<br />
Timing buffered disk reads: 1546 MB in 3.00 seconds = 515.17 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.21652 s, 484 MB/s<br />
<br />
# echo 3 > /prechooc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024 <br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.98136 s, 542 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024 <br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.157093 s, 6.8 GB/s<br />
<br />
==== Samsung 850 PRO 512GB ====<br />
*SSD: Samsung SSD 850 PRO<br />
*Firmware Version: EXM01B6Q<br />
*Capacity: 512GB<br />
*[[User: N30N]]<br />
*Kernel: 3.15.5-2<br />
*Filesystem: f2fs with noatime,discard<br />
<br />
# sudo hdparm -Tt /dev/sdc<br />
/dev/sdc:<br />
Timing cached reads: 36500 MB in 2.00 seconds = 18270.69 MB/sec<br />
Timing buffered disk reads: 1580 MB in 3.00 seconds = 526.53 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.33997 s, 459 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.94401 s, 552 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.095869 s, 11.2 GB/s<br />
<br />
=== Sandisk ===<br />
==== Sandisk Extreme 240 GB ====<br />
*SSD: Sandisk Extreme (SATA 3: 6Gb/s)<br />
*Model Number: SDSSDX240GG25<br />
*Capacity: 240 GB<br />
*User: Dani<br />
<br />
# sudo hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 11596 MB in 2.00 seconds = 5802.26 MB/sec<br />
Timing buffered disk reads: 1190 MB in 3.00 seconds = 396.16 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.23003 s, 481 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.5909 s, 414 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.177952 s, 6.0 GB/s<br />
<br />
==== Sandisk Extreme 120 GB ====<br />
* SSD: Sandisk Extreme 120 GB (SATA 3: 6 GB/s)<br />
* Model Number: SDSSDX-120G-G25<br />
* Firmware Version: R201<br />
* Capacity: 120 GB<br />
* User: ''hsngrms''<br />
* Kernel: 3.6.3-1-ARCH x86_64<br />
* Filesystem: EXT4<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 6824 MB in 2.00 seconds = 3413.53 MB/sec<br />
Timing buffered disk reads: 1332 MB in 3.00 seconds = 443.99 MB/sec <br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2,44496 s, 439 MB/s <br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2,64944 s, 405 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 0,163495 s, 6,6 GB/s<br />
<br />
* SSD: Sandisk Extreme 120 GB<br />
* Model Number: SDSSDX-120G-G25<br />
* Firmware Version: R211<br />
* Capacity: 120 GB<br />
* Controller: SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port [AHCI mode] (rev 04)<br />
* User: kozaki<br />
* Kernel: 3.7.4-1-ARCH x86_64<br />
* Filesystem: EXT4 (Arch 201301 Default: fstab: default)<br />
* Notes: SataIII, GPT partitions aligned on sectors, LVM2 (--dataalignment 1m), cfq I/O scheduler, Asrock B75Pro mobo<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 16913 MB in 2.00 seconds = 8464.76 MB/sec<br />
Timing buffered disk reads: 1414 MB in 3.00 seconds = 470.85 MB/sec <br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2.3301 s, 461.33 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2.65322 s, 403.67 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 0.137885 s, 7.87 GB/s<br />
<br />
* Note: Same model and config, but with the Filesystem mount options and the deadline I/O scheduler<br />
* Filesystem: EXT4 (fstab: noatime,discard)<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 17162 MB in 2.00 seconds = 8588.88 MB/sec<br />
Timing buffered disk reads: 1416 MB in 3.00 seconds = 471.76 MB/sec <br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2.3486 s, 458 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 2.6593 s, 403.33 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1,1 GB) copied, 0.1312 s, 8.2 GB/sec<br />
<br />
====Sandisk Ultra Plus 64 GB====<br />
<br />
*SSD: Sandisk Ultra Plus 64GB SATA3<br />
*Model Number: SDSSDHP-064G-G25<br />
*Capacity: 64 GB<br />
*User: Roshless<br />
*Kernel: 3.12.9-2-ck<br />
*Filesystem: ext4 - defaults,noatime,discard<br />
*Notes: deadline scheduler, Dell 0M7CYJ mobo, notebook<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 2116 MB in 2.00 seconds = 1058.95 MB/sec<br />
Timing buffered disk reads: 582 MB in 3.00 seconds = 193.84 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.17104 s, 150 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 5.5608 s, 193 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.707444 s, 1.5 GB/s<br />
<br />
=== Seagate ===<br />
==== 600 ====<br />
<br />
* SSD: Seagate 600<br />
* Model Number: ST240HM000<br />
* Firmware Version: C675<br />
* Capacity: 240 GB<br />
* Controller: AMD SB950<br />
* User: Fraoch<br />
* Kernel: 3.11.0<br />
* Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 7436 MB in 2.00 seconds = 3719.76 MB/sec<br />
Timing buffered disk reads: 1526 MB in 3.00 seconds = 508.66 MB/sec<br />
<br />
Average read rate: 506.6 MB/s<br />
Average write rate: 299.3 MB/s<br />
Average access time: 0.13 ms<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.48651 s, 432 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.03941 s, 526 MB/s<br />
<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.308517 s, 3.5 GB/s<br />
<br />
=== Silicon Power ===<br />
==== Silicon Power Velox V55 60GB ====<br />
*SSD: Silicon Power Velox V55 60GB <br />
*Model Number: SP060GBSS3V55S25<br />
*Firmware: S8FM05.0<br />
*Capacity: 60GB<br />
*Controller: SATA controller: Intel Corporation Device 8c82<br />
*User: Adamovic<br />
*Kernel: 3.13.0<br />
*Filesystem: ext4<br />
<br />
# hdparm -Tt /dev/sdb<br />
<br />
/dev/sdb:<br />
Timing cached reads: 32042 MB in 1.99 seconds = 16116.51 MB/sec<br />
Timing buffered disk reads: 1412 MB in 3.00 seconds = 470.65 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
11073741824 bytes (1,1 GB) copied, 4,04966 s, 265 MB/s<br />
<br />
<br />
=== Kingston ===<br />
==== Kingston HyperX 120 GB ====<br />
*SSD: Kingston HyperX 120 GB<br />
*Model Number: SH100S3120G<br />
*Firmware: 320ABBF0<br />
*Capacity: 120 GB<br />
*User: Artsibash<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 26564 MB in 2.00 seconds = 13296.53 MB/sec<br />
Timing buffered disk reads: 1130 MB in 3.00 seconds = 376.16 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.37858 s, 451 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.48961 s, 431 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.125463 s, 8.6 GB/s<br />
<br />
==== Kingston HyperX 3K 120GB ====<br />
*SSD: Kingston HyperX 3K 120GB (MLC/Intel synchronous ONFi NAND/LSI SandForce SF-2281 25nm controller/SATA3/2.5")<br />
*Model Number: SH103S3120G<br />
*Firmware: 501ABBF0<br />
*Capacity: 120 GB<br />
*Misc: Intel DQ77MK mobo SATA3 port, linux 3.5.4-1, ext4 (has_journal + discard,noatime)<br />
*[[User: MajorTom]]<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 15382 MB in 2.00 seconds = 7702.01 MB/sec<br />
Timing buffered disk reads: 1442 MB in 3.00 seconds = 480.39 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.06937 s, 519 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.58996 s, 415 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.207434 s, 5.2 GB/s<br />
<br />
==== Kingston HyperX 3K 120GB ====<br />
*SSD: Kingston HyperX 3K 120GB<br />
*Model Number: SH103S3120G<br />
*Firmware: 503ABBF0<br />
*Capacity: 120 GB<br />
*Misc: SATA3 port, linux 3.6.4-1-ck, ext4 <br />
*User: WonderWoofy<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 16562 MB in 2.00 seconds = 8289.47 MB/sec<br />
Timing buffered disk reads: 1078 MB in 3.01 seconds = 358.53 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.07445 s, 518 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.40264 s, 316 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.149056 s, 7.2 GB/s<br />
<br />
==== Kingston SSDNow V+100 128 GB ====<br />
*SSD: Kingston SSDNow v+100 128 GB<br />
*Model Number: SVP100S2128G<br />
*Firmware: CJRA0202<br />
*Capacity: 128 GB<br />
*User: Tuxe<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 11598 MB in 1.99 seconds = 5822.73 MB/sec<br />
Timing buffered disk reads: 598 MB in 3.01 seconds = 198.90 MB/sec<br />
<br />
Minimum Read Rate: 145.8 MB/s<br />
Maximum Read Rate: 259.2 MB/s<br />
Average Read Rate: 243.5 MB/s<br />
Average Access Time 0.1 ms<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.74199 s, 110 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.62165 s, 232 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.330142 s, 3.3 GB/s<br />
<br />
==== Kingston SSDNow V300 128 GB ====<br />
*SSD: Kingston SSDNow V100 128 GB<br />
*Model Number: SV300S37A120G<br />
*Firmware: 521ABBF0<br />
*Capacity: 128 GB<br />
*User: Ricky<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 4970 MB in 1.99 seconds = 2491.32 MB/sec<br />
Timing buffered disk reads: 660 MB in 3.01 seconds = 219.53 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out <br />
1073741824 bytes (1.1 GB) copied, 4.96045 s, 216 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out <br />
1073741824 bytes (1.1 GB) copied, 4.58932 s, 234 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out <br />
1073741824 bytes (1.1 GB) copied, 0.45147 s, 2.4 GB/s<br />
<br />
==== Kingston SNV425-S2BD 128GB ====<br />
*SSD: Kingston SNV425-S2BD/128GB<br />
*Model Number: SNV425S2128GB<br />
*Firmware: C09112a6<br />
*Capacity: 128 GB<br />
*User: thof<br />
*Filesystem: ext4<br />
*Kernel: 3.3.4<br />
<br />
# hdparm -Tt /dev/sda<br />
Timing cached reads: 3614 MB in 2.00 seconds = 1808.83 MB/sec<br />
Timing buffered disk reads: 736 MB in 3.01 seconds = 244.91 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 6.5301 s, 164 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.1377 s, 260 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.363142 s, 3.0 GB/s<br />
<br />
===Mushkin===<br />
==== Mushkin mSATA Atlas 128GB ====<br />
*SSD: Mushkin Atlas 128GB SATA III<br />
*Model Number: MKNSSDAT120GB-DX <br />
*Firmware: 504ABBF0<br />
*Capacity: 120 GB<br />
*Misc: SATA II Port (mSATA), linux 3.6.4-1-ck, ext4, Sandforce, <br />
*User: WonderWoofy<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sdb:<br />
Timing cached reads: 16116 MB in 2.00 seconds = 8065.82 MB/sec<br />
Timing buffered disk reads: 458 MB in 3.00 seconds = 152.53 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.09965 s, 262 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.4438 s, 242 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.143544 s, 7.5 GB/s<br />
<br />
==== Mushkin PCIe Scorpion Deluxe 1920 GB ====<br />
*SSD: Scorpion Deluxe PCIe<br />
*Model Number:MKNP44SC1920GB-DX<br />
*Firmware Version: n/a<br />
*Capacity: 1920 GB<br />
*Controller: PCIe 3.0<br />
*User: Wwwutz<br />
*Kernel: 3.10.29<br />
*Filesystem: xfs<br />
*Notes: 4x E7-4870 @ 2.40GHz DELL Poweredge R910<br />
<br />
# hdparm -Tt /dev/sde<br />
Timing cached reads: 17362 MB in 2.00 seconds = 8689.51 MB/sec<br />
Timing buffered disk reads: 2454 MB in 3.00 seconds = 817.81 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.53962 s, 697 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.14377 s, 939 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.509552 s, 2.1 GB/s<br />
<br />
===Liteon===<br />
====Liteon M3S====<br />
*SSD: Liteon M3S 256GB SATA III<br />
*Model Number: LCT-256M3S <br />
*Firmware: VRDC<br />
*Capacity: 256 GB<br />
*User: AleksMK<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 8406 MB in 2.00 seconds = 4206.12 MB/sec<br />
Timing buffered disk reads: 1212 MB in 3.00 seconds = 403.81 MB/sec<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.2338 s, 332 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches <br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.48531 s, 432 MB/s<br />
<br />
# dd if=/tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.24457 s, 4.4 GB/s<br />
<br />
<br />
===IBM===<br />
==== IBM MLC 128GB ====<br />
*[[User: darkol]]<br />
*SSD: IBM 128GB SATA 2.5" MLC HS Enterprise Value SSD<br />
*Model Number: 90Y8648<br />
*Firmware Version: <br />
*Capacity: 128 GB<br />
*User: darkol<br />
*Kernel:<br />
*Filesystem: ext4<br />
*System: IBM x3650 M4<br />
<br />
# RAID1<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 17260 MB in 2.00 seconds = 8642.01 MB/sec<br />
Timing buffered disk reads: 1262 MB in 3.00 seconds = 420.27 MB/sec<br />
<br />
# RAID5<br />
# hdparm -Tt /dev/sdb<br />
/dev/sda:<br />
Timing cached reads: 17108 MB in 2.00 seconds = 8565.69 MB/sec<br />
Timing buffered disk reads: 3986 MB in 3.00 seconds = 1328.38 MB/sec<br />
<br />
<br />
=== Plextor ===<br />
==== Plextor PX-G256M6e ====<br />
*SSD: Plextor M6e M.2 PCI-E<br />
*Model Number: PX-G256M6e<br />
*Firmware Version: 1.03<br />
*Capacity: 256 GB<br />
*[[User: N30N]]<br />
*Kernel: 3.15.5-2<br />
*Filesystem: f2fs with noatime,discard<br />
<br />
# hdparm -Tt /dev/sdd<br />
/dev/sdd:<br />
Timing cached reads: 35466 MB in 2.00 seconds = 17752.85 MB/sec<br />
Timing buffered disk reads: 2024 MB in 3.00 seconds = 674.65 MB/sec<br />
<br />
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.2233 s, 483 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
$ dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 1.5561 s, 690 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.109914 s, 9.8 GB/s<br />
<br />
= Encrypted Partitions =<br />
<br />
This section should show some data for encrypted partitions.<br />
<br />
== dm-crypt with AES ==<br />
<br />
Please list your CPU and if you are using AES-NI. Without AES-NI support in the CPU, the processor will be the bottleneck long before you touch the >500MB/s SSD speeds. <br />
<br />
'''i7-620M Benchmark'''<br />
*~570 MB/s :With AES-NI<br />
*~100 MB/s :Without AES-NI<br />
<br />
'''i5-3210M'''<br />
*~500 MB/s :With AES-NI<br />
*~200 MB/s :Without AES-NI<br />
<br />
=== Crucial ===<br />
<br />
The crucial drive does not use any compression to reach its speeds, so it is expected to be fast.<br />
<br />
==== Crucial M4 256 Gb ====<br />
<br />
* User: crobe<br />
* Filesystem: ext4 on dm-crypt<br />
* Running Sata 6 Gbit/s on an older 3 Gbit/s controller<br />
* Comment: The drive is faster on writing ( on fresh space ), which has been observed on the internet. Maybe this is the maximum of my machine.<br />
<br />
# cryptsetup status<br />
type: LUKS1<br />
cipher: aes-xts-plain<br />
keysize: 256 bits<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 3012 MB in 2.00 seconds = 1507.62 MB/sec<br />
Timing buffered disk reads: 558 MB in 3.00 seconds = 185.93 MB/sec<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 7,86539 s, 137 MB/s<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 9,78325 s, 110 MB/s<br />
<br />
=== OCZ ===<br />
<br />
The OCZ Drives use compression on Data, so with uncompressible encrypted Data, speeds are expected to be way lower. Still, seek times should be as low as ever and the drive shouldn't get slower when it gets full, so there should be enough speed.<br />
<br />
==== OCZ-VERTEX2 180GB ====<br />
<br />
* SSD: OCZ <br />
* Model Number: Vertex2 <br />
* Capacity: 180Gb <br />
* User: crobe<br />
* Filesystem: ext4 on dm-crypt with AES, essiv, sha256<br />
* The bottleneck for the read/write speeds is definately the drive<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 2842 MB in 2.00 seconds = 1422.61 MB/sec<br />
Timing buffered disk reads: 550 MB in 3.00 seconds = 183.26 MB/sec<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 16,9194 s, 63,5 MB/s<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 Datensätze ein<br />
1024+0 Datensätze aus<br />
1073741824 Bytes (1,1 GB) kopiert, 14,5509 s, 73,8 MB/s<br />
<br />
Same values for bonnie++.<br />
<br />
=== Samsung ===<br />
<br />
==== SAMSUNG 470 128GB ====<br />
<br />
*SSD: SAMSUNG 470 128GB<br />
*Firmware: AXM09B1Q<br />
*Capacity: 128 GB<br />
*User: FredericChopin<br />
<br />
# cryptsetup status<br />
type: LUKS1<br />
cipher: aes-xts-plain<br />
keysize: 512 bits<br />
offset: 8192 sectors<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 3226 MB in 2.00 seconds = 1614.42 MB/sec<br />
Timing buffered disk reads: 570 MB in 3.00 seconds = 189.84 MB/sec<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.62518 s, 112 MB/s<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 9.34282 s, 115 MB/s<br />
<br />
==== SAMSUNG 830 256GB ====<br />
<br />
*SSD: Samsung 830 256GB<br />
*Model Number: MZ-7PC256B/WW<br />
*Firmware Version: CXM03BQ1<br />
*Capacity: 256 GB<br />
*User: stefseel<br />
*Kernel: 3.4.6-1-ARCH (with aesni_intel module)<br />
*Filesystem: ext4 (relatime,discard) over LVM2 over dm-crypt/LUKS (allow-discards)<br />
*System: Lenovo ThinkPad T430 (i5-3210M)<br />
<br />
# hdparm -Tt /dev/sda<br />
/dev/sda:<br />
Timing cached reads: 15000 MB in 2.00 seconds = 7500 MB/sec<br />
Timing buffered disk reads: 1470 MB in 3.00 seconds = 490 MB/sec<br />
<br />
With default Arch settings with installed pm-utils: JOURNAL_COMMIT_TIME_AC=0, DRIVE_READAHEAD_AC=256<br />
<br />
# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.62668 s, 300 MB/s<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 4.07337 s, 170 MB/s<br />
<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.154298 s, 7.0 GB/s<br />
<br />
What annoyed me was the poor read performance. I observed that in battery mode with unplugged AC the read rate was 500 MB/s. I did some research and found out that pm-utils is to blame. In AC mode it sets journal commit time to zero and readahead to 256 whereas in battery mode it sets journal commit time to 600 and readahead to 3072. See scripts /usr/lib/pm-utils/power.d/journal-commit and /usr/lib/pm-utils/power.d/readahead. So I added a custom config to set journal commit time always to 600 and readahead always to 4096, the result made me happy :)<br />
<br />
# cat /etc/pm/config.d/config<br />
DRIVE_READAHEAD_AC=4096<br />
DRIVE_READAHEAD_BAT=4096<br />
JOURNAL_COMMIT_TIME_AC=600<br />
JOURNAL_COMMIT_TIME_BAT=600<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.15534 s, 500 MB/s<br />
<br />
However there is still an issue: after resuming from suspend read rate goes down to 270 MB/s.<br />
<br />
<br />
==== SAMSUNG 830 256GB ====<br />
*[[User: hunterthompson]]<br />
*SSD: SAMSUNG 830 256GB<br />
*Firmware: CXM03B1Q<br />
*Capacity: 256 GB<br />
*System: Thinkpad X230, 16GB PC-1600 CL9 Kingston HyperX<br />
*CPU: i7-3520M, AES-NI, Hyper-Threaded, 2.9GHz-3.6GHz, Steady 3.4GHz with all 4 threads 100%<br />
*Kernel: x86_64 linux-grsec 3.5.4-1-grsec (Desktop, Virt, Host, KVM, Security)<br />
*Encryption: Full Disk, LVM2 on LUKS dm-crypt, Allow-Discards<br />
*Cryptsetup: -h sha512 -c aes-xts-plain64 -y -s 512 luksFormat --align-payload=8192<br />
*Filesystem: mkfs.ext4 -b 4096 -E stride=128,stripe-width=128 /dev/mapper/VolGroup00-lvolhome<br />
*fstab: ext4,rw,noatime,nodiratime,discard,stripe=128,data=ordered,errors=remount-ro<br />
*Notes: SATAIII, partitions aligned and no swap<br />
<br />
% dd bs=1M count=1024 if=7600_Retail_Ultimate_DVD.iso of=/dev/null conv=fdatasync<br />
dd: fsync failed for ‘/dev/null’: Invalid argument<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.42075 s, 314 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.48574 s, 308 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.45361 s, 311 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.44276 s, 312 MB/s<br />
<br />
=== Plextor ===<br />
==== Plextor M5M 128GB ====<br />
*[[User: ror191505]]<br />
*SSD: Plextor M5M 128GB<br />
*Firmware: 1.04<br />
*Capacity: 128 GB<br />
*System: ASUS K56CB, 8Gb RAM<br />
*CPU: i7-3517U, AES-NI, Hyper-Threaded, 1.9GHz-3.0GHz<br />
*Kernel: x86_64 3.13.5-1-ARCH<br />
*Encryption: LVM2 on LUKS dm-crypt<br />
*Cryptsetup: -h sha512 -c aes-xts-plain64 -y -s 512 luksFormat --align-payload=8192<br />
*Filesystem: EXT4<br />
<br />
# cryptsetup status /dev/mapper/crypted <br />
/dev/mapper/crypted is active and is in use.<br />
type: LUKS1<br />
cipher: aes-xts-plain64<br />
keysize: 256 bits<br />
device: /dev/sdb2<br />
offset: 4096 sectors<br />
size: 249041517 sectors<br />
mode: read/write<br />
<br />
<br />
% dd bs=1M count=1024 if=film.mkv of=/dev/null conv=fdatasync<br />
dd: fsync failed for '/dev/null': Invalid argument<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 2.65242 s, 405 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.69877 s, 290 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.67513 s, 292 MB/s<br />
<br />
% dd bs=1M count=1024 if=/dev/zero of=test conv=fdatasync<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 3.68793 s, 291 MB/s<br />
<br />
% sudo hdparm -Tt /dev/sdb<br />
/dev/sdb:<br />
Timing cached reads: 12774 MB in 2.00 seconds = 6394.84 MB/sec<br />
Timing buffered disk reads: 1264 MB in 3.00 seconds = 420.68 MB/sec<br />
== Truecrypt ==<br />
<br />
= Comparison - high end SCSI RAID 0 hard drive benchmark =<br />
== LSI 320-2X Megaraid SCSI == <br />
<br />
* SSD: N/A<br />
* Model Number: LSI MegaRAID 320-2x RAID 0 x 2 Seagate Cheetah ST373455LC 15,000 RPM 146GB drives<br />
* Capacity: 292Gb <br />
* User: rabinnh<br />
* Filesystem: ext4 on x86_64<br />
* Comment: No, this is not an SSD, but Googlers should have a reasonable basis for comparison to a high end hard drive system, and you won't get much higher end for an individual workstation. The cost of this disk subsystem is conservatively $760, and it gives at best half the performance of most SSDs.<br />
<br />
<pre>$sudo hdparm -Tt /dev/sda2<br />
/dev/sda2:<br />
Timing cached reads: 6344 MB in 2.00 seconds = 3174.02 MB/sec<br />
Timing buffered disk reads: 442 MB in 3.01 seconds = 146.97 MB/sec</pre><br />
<br />
<pre>$dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.13482 s, 150 MB/s<br />
</pre><br />
<pre><br />
$echo 3 > /proc/sys/vm/drop_caches<br />
$dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 7.24267 s, 148 MB/s</pre><br />
<br />
<pre>$dd if=tempfile of=/dev/null bs=1M count=1024<br />
1024+0 records in<br />
1024+0 records out<br />
1073741824 bytes (1.1 GB) copied, 0.459814 s, 2.3 GB/s</pre></div>
Zatricky
https://wiki.archlinux.org/index.php?title=Improving_performance/Boot_process&diff=331014
Improving performance/Boot process
2014-08-19T08:23:46Z
<p>Zatricky: Improved formatting, added notes regarding questionable future and SSD use</p>
<hr />
<div>[[Category:Boot process]]<br />
[[ar:Improve Boot Performance]]<br />
[[cs:Improve Boot Performance]]<br />
[[es:Improve Boot Performance]]<br />
[[ja:Improve Boot Performance]]<br />
[[it:Improve Boot Performance]]<br />
[[ru:Improve Boot Performance]]<br />
[[zh-CN:Improve Boot Performance]]<br />
{{Related articles start}}<br />
{{Related|Maximizing performance}}<br />
{{Related|Silent boot}}<br />
{{Related|Daemon}}<br />
{{Related|e4rat}}<br />
{{Related|Kexec}}<br />
{{Related articles end}}<br />
<br />
Improving the boot performance of a system can provide reduced boot wait times and a means to learn more about how certain system files and scripts interact with one another. This article attempts to aggregate methods on how to improve the boot performance of an Arch Linux system.<br />
<br />
== Analyzing the boot process ==<br />
<br />
=== Using systemd-analyze ===<br />
<br />
[[systemd]] provides a tool called {{ic|systemd-analyze}} that can be used to show timing details about the boot process, including an svg plot showing units waiting for their dependencies. You can see which unit files are causing your boot process to slow down. You can then optimize your system accordingly.<br />
<br />
To see how much time was spent in kernelspace and userspace on boot, simply use:<br />
<br />
$ systemd-analyze<br />
<br />
{{Tip|If you boot via [[UEFI]] and use a boot loader which implements systemds' [http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface Boot Loader Interface] (which currently only [[Gummiboot]] does), '''systemd-analyze''' can additionally show you how much time was spent in the EFI firmware and the boot loader itself.}}<br />
<br />
To list the started unit files, sorted by the time each of them took to start up:<br />
<br />
$ systemd-analyze blame<br />
<br />
At some points of the boot process, things can not proceed until a given unit succeeds. To see which units find themselves at these critical points in the startup chain, do:<br />
<br />
$ systemd-analyze critical-chain<br />
<br />
You can also create a SVG file which describes your boot process graphically, similiar to [[Bootchart]]:<br />
<br />
$ systemd-analyze plot > plot.svg<br />
<br />
See {{ic|man systemd-analyze}} for details.<br />
<br />
=== Using systemd-bootchart ===<br />
<br />
Bootchart has been merged into '''systemd''' since Oct. 2012, and you can use it to boot just as you would with the original bootchart. Add this to your kernel line:<br />
<br />
initcall_debug printk.time=y init=/usr/lib/systemd/systemd-bootchart<br />
<br />
See the [http://www.freedesktop.org/software/systemd/man/systemd-bootchart.html manpage] for more information.<br />
<br />
=== Using bootchart2 ===<br />
<br />
{{Merge|Bootchart#Running Bootchart2|different instructions from the main page}}<br />
<br />
You could also use a version of bootchart to visualize the boot sequence. Since you are not able to put a second init into the kernel command line you won't be able to use any of the standard bootchart setups. However the {{AUR|bootchart2-git}} package from [[AUR]] comes with an undocumented '''systemd''' service. After you've installed bootchart2 do:<br />
<br />
# systemctl enable bootchart<br />
<br />
Read the [https://github.com/mmeeks/bootchart bootchart2 documentation] for further details on using this version of bootchart.<br />
<br />
== Readahead ==<br />
<br />
[[Systemd]] comes with its own readahead implementation that should in principle improve boot time - two services, systemd-readahead-collect (which collects information on what files are used during boot) and systemd-readahead-replay (which pulls these files into cache early in the boot process)<br />
<br />
To enable this, do:<br />
<br />
# systemctl enable systemd-readahead-collect systemd-readahead-replay<br />
<br />
Caveats:<br />
* You need to reboot a few times for systemd-readahead-collect to collect enough information for systemd-readahead-replay to work effectively.<br />
* Depending on your kernel version and the type of your hard drive, your mileage may vary (for example, with an SSD you will see little to no benefit or may even see worse performance).<br />
* This feature's future is questionable due to a lack of attention. The majority of the developers make use of SSDs and thus don't use the feature. See https://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg21693.html<br />
<br />
== Compiling a custom kernel ==<br />
<br />
Compiling a custom kernel can reduce boot time and memory usage. Though with the standardization of the 64 bit architecture and the modular nature of the Linux kernel, these benefits may not be as great as expected. [[Kernel Compilation|Read more about compiling a kernel]].<br />
<br />
== Early start for services ==<br />
<br />
One central feature of systemd is [[D-Bus]] and socket activation. This causes services to be started when they are first accessed and is generally a good thing. However, if you know that a service (like [[UPower]]) will always be started during boot, then the overall boot time might be reduced by starting it as early as possible. This can be achieved (if the service file is set up for it, which in most cases it is) by issuing:<br />
<br />
# systemctl enable upower<br />
<br />
This will cause systemd to start UPower as soon as possible, without causing races with the socket or D-Bus activation.<br />
<br />
== Staggered spin-up ==<br />
<br />
Some hardware implements [[Wikipedia:Spin-up#Staggered spin-up|staggered spin-up]], which causes the OS to probe ATA interfaces serially, which can spin up the drives one-by-one and reduce the peak power usage. This slows down the boot speed, and on most consumer hardware provides no benefits at all since the drives will already spin-up immediately when the power is turned on. To check if SSS is being used:<br />
<br />
$ dmesg | grep SSS<br />
<br />
If it wasn't used during boot, there will be no output.<br />
<br />
To disable it, add {{ic|1=libahci.ignore_sss=1}} to the [[kernel line]].<br />
<br />
== Filesystem mounts ==<br />
<br />
Thanks to [[mkinitcpio]]'s {{ic|fsck}} hook, you can avoid a possibly costly remount of the root partition by changing {{ic|ro}} to {{ic|rw}} on the kernel line and removing it from {{ic|/etc/fstab}}. Options can be set with {{ic|1=rootflags=mount options...}} on the kernel line. Remember to remove the entry from your /etc/fstab file, else the systemd-remount-fs.service will continue to try to apply those settings. Alternatively, one could try to mask that unit.<br />
<br />
If btrfs is in use for the root filesystem, there is no need for a fsck on every boot like other filesystems. If this is the case, [[mkinitcpio]]'s {{ic|fsck}} hook can be removed. You may also want to mask the {{ic|systemd-fsck-root.service}}, or tell it not to fsck the root filesystem from the kernel command line using {{ic|fsck.mode&#61;skip}}. Without [[mkinitcpio]]'s {{ic|fsck}} hook, systemd will still fsck any relevant filesystems with the {{ic|systemd-fsck@.service}}<br />
<br />
You can also remove API filesystems from {{ic|/etc/fstab}}, as systemd will mount them itself (see {{ic|pacman -Ql systemd <nowiki>|</nowiki> grep '\.mount$'}} for a list). It is not uncommon for users to have a /tmp entry carried over from sysvinit, but you may have noticed from the command above that systemd already takes care of this. Ergo, it may be safely removed.<br />
<br />
Other filesystems like {{ic|/home}} can be mounted with custom mount units. Adding {{ic|noauto,x-systemd.automount}} will buffer all access to that partition, and will fsck and mount it on first access, reducing the number of filesystems it must fsck/mount during the boot process.<br />
<br />
{{Note|this will make your {{ic|/home}} filesystem type {{ic|autofs}}, which is ignored by [[mlocate]] by default. The speedup of automounting {{ic|/home}} may not be more than a second or two, depending on your system, so this trick may not be worth it.}}<br />
<br />
== Initramfs ==<br />
<br />
As mentioned above, boot time can be decreased by slimming the kernel, thereby reducing the amount of data that must be loaded. This is also true for your initramfs (result of mkinitcpio), as this is loaded immediately after the kernel, and takes care of recognizing your root filesystem and mounting it. To boot, very little is actually needed and includes the storage bus, block device, and filesystem. Falconindy (Dave Reisner) has begrudgingly created a [http://blog.falconindy.com/articles/optmizing-bootup-with-mkinitcpio.html short tutorial] on how to achieve this on his blog.<br />
<br />
{{Note|If you are using anything that requires [[udev]] to be included in the initramfs (for example, lvm2, mdadm_udev, or even just specifying the filesystem label with {{ic|/dev/disk/by-label}}), trying to strip down your initramfs will not be a worthwhile endeavor.}}<br />
<br />
== Less output during boot ==<br />
<br />
Change {{ic|verbose}} to {{ic|quiet}} on the bootloader's kernel line. For some systems, particularly those with an SSD, the slow performance of the TTY is actually a bottleneck, and so less output means faster booting.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=188199
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-07T22:39:34Z
<p>Zatricky: /* Overview */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
<br />
Also see:<br />
https://wiki.archlinux.org/index.php/Deltup<br />
https://github.com/sabooky/archdelta<br />
https://bbs.archlinux.org/viewtopic.php?id=92085<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-* do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
* 10. update lastsync<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete<br />
<br />
9. remove old irrelevant deltas:<br />
find /srv/ftp/pub/archlinux-delta -ctime +90 -name \*.delta -exec repo-remove {} \;<br />
<br />
10. Update lastsync<br />
rsync /srv/ftp/.hidden/archlinux/lastsync /srv/ftp/pub/archlinux-delta/</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=188198
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-07T22:39:22Z
<p>Zatricky: /* Overview */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
<br />
Also see:<br />
https://wiki.archlinux.org/index.php/Deltup<br />
https://github.com/sabooky/archdelta<br />
https://bbs.archlinux.org/viewtopic.php?id=92085<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-* do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
* 10. update lastsync<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete<br />
<br />
9. remove old irrelevant deltas:<br />
find /srv/ftp/pub/archlinux-delta -ctime +90 -name \*.delta -exec repo-remove {} \;<br />
<br />
10. Update lastsync<br />
rsync /srv/ftp/.hidden/archlinux/lastsync /srv/ftp/pub/archlinux-delta/</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=188192
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-07T22:18:32Z
<p>Zatricky: /* Detail */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-* do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
* 10. update lastsync<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete<br />
<br />
9. remove old irrelevant deltas:<br />
find /srv/ftp/pub/archlinux-delta -ctime +90 -name \*.delta -exec repo-remove {} \;<br />
<br />
10. Update lastsync<br />
rsync /srv/ftp/.hidden/archlinux/lastsync /srv/ftp/pub/archlinux-delta/</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=188191
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-07T22:17:42Z
<p>Zatricky: /* Detail */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-* do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
* 10. update lastsync<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete<br />
<br />
9. remove old irrelevant deltas:<br />
find /srv/ftp/pub/archlinux-delta -ctime +90 -name \*.delta<br />
<br />
10. Update lastsync<br />
rsync /srv/ftp/.hidden/archlinux/lastsync /srv/ftp/pub/archlinux-delta/</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187963
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T07:12:12Z
<p>Zatricky: /* Detail */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-* do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
* 10. update lastsync<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete<br />
<br />
9. ???<br />
<br />
10. Update lastsync<br />
rsync /srv/ftp/.hidden/archlinux/lastsync /srv/ftp/pub/archlinux-delta/</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187962
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T07:11:51Z
<p>Zatricky: /* Detail */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-* do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
* 10. update lastsync<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete<br />
<br />
9. ???<br />
<br />
10. rsync /srv/ftp/.hidden/archlinux/lastsync /srv/ftp/pub/archlinux-delta/</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187961
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T07:11:14Z
<p>Zatricky: /* Subsequent syncs: */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-* do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
* 10. update lastsync<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187960
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T07:09:45Z
<p>Zatricky: /* Detail */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-* do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187958
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T07:06:25Z
<p>Zatricky: /* Subsequent syncs: */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-* do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync only package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187957
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T07:04:08Z
<p>Zatricky: /* Detail */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-elephant do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync only package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> $repo.db *.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187956
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T06:58:33Z
<p>Zatricky: /* Detail */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-elephant do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync only package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude '*.db' --exclude '*.db.tar.gz' --exclude '*.abs.tar.gz' --exclude '*.files' --exclude '*.files.tar.gz' /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
repo-add -s -k <key> /srv/ftp/pub/archlinux-delta/$repo/os/$arch/$repo.db /srv/ftp/pub/archlinux-delta/$repo/os/$arch/*.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk '{print $2 " " $8}' | grep ^1\ | awk '{print $2}'` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187955
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T06:57:28Z
<p>Zatricky: /* Questions still unanswered: */</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-elephant do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages wasting mirror diskspace? Should we follow the symlinks in /$repo/os/$arch/ to /pool/packages/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync only package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude ‘*.db’ --exclude ‘*.db.tar.gz’ --exclude ‘*.abs.tar.gz’ --exclude ‘*.files’ --exclude ‘*.files.tar.gz’ /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
repo-add -s -k <key> /srv/ftp/pub/archlinux-delta/$repo/os/$arch/$repo.db /srv/ftp/pub/archlinux-delta/$repo/os/$arch/*.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk ‘{print $2 “ “ $8}’ | grep ^1\ | awk ‘{print $2}’` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187953
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T06:47:01Z
<p>Zatricky: </p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
* 1. configure a separate mirror path for the delta *version* of the mirror<br />
* 2. use the standard rsync method to an “offline” path<br />
* 3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
* 5. (As with 2 above). Complete normal sync to the offline path.<br />
* 6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
* 7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
* 8. remove old .pkg files<br />
* 9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-elephant do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages? Should we follow the symlinks in /$repo/os/$arch/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync only package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude ‘*.db’ --exclude ‘*.db.tar.gz’ --exclude ‘*.abs.tar.gz’ --exclude ‘*.files’ --exclude ‘*.files.tar.gz’ /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
repo-add -s -k <key> /srv/ftp/pub/archlinux-delta/$repo/os/$arch/$repo.db /srv/ftp/pub/archlinux-delta/$repo/os/$arch/*.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk ‘{print $2 “ “ $8}’ | grep ^1\ | awk ‘{print $2}’` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete</div>
Zatricky
https://wiki.archlinux.org/index.php?title=User:Zatricky/DeltaMirrorFromNonDelta&diff=187952
User:Zatricky/DeltaMirrorFromNonDelta
2012-03-06T06:45:07Z
<p>Zatricky: Draft Procedure Doc</p>
<hr />
<div>=Overview=<br />
Make a mirror available with deltas where the source repository is *not* available with deltas:<br />
<br />
After basic testing, will create ba/sh-form script<br />
<br />
=Summary of procedure=<br />
==On first sync:==<br />
<br />
1. configure a separate mirror path for the delta *version* of the mirror<br />
2. use the standard rsync method to an “offline” path<br />
3. configure hard links from the delta mirror to the same locations in the main mirror only for package files<br />
4. use repo-add to add all .pkg files to new $repo.db files (how does the signing work? Does it create a new .sig for the package or does it only sign the .db?), security of signing previously unsigned packages or automatically rejecting invalid packages/signatures<br />
<br />
==Subsequent syncs:==<br />
<br />
5. (As with 2 above). Complete normal sync to the offline path.<br />
6. (As with 3 above). Sync hard links from the delta mirror to the same locations in the main mirror only for package files<br />
7. use repo-add to add only the new files. Use -d switch to automatically create deltas (as above, signed??)<br />
8. remove old .pkg files<br />
9. remove old deltas? Find an easy/KISS way to determine when old deltas are using up too much disk that pacman won’t bother using them. Can repo-elephant do this part automatically? If it does, would repo-add *only* remove the db entry or would it also delete the .delta file?<br />
<br />
==Questions still unanswered:==<br />
<br />
By creating lots of .delta files in /$repo/os/$arch/ might there be duplicates for multilib packages? Should we follow the symlinks in /$repo/os/$arch/ and mv && ln -s as is done with the .pkg files?<br />
<br />
What is repo-elephant?? lol.<br />
<br />
=Detail=<br />
<br />
1. configure a separate mirror path for the delta version of the mirror without the dbs:<br />
mkdir -p /srv/ftp/pub/archlinux-delta<br />
<br />
2. use standard rsync method with delete:<br />
rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=1000 rsync://source-server/archlinux/ /srv/ftp/.hidden/archlinux/<br />
<br />
3a. get lists of all new package files for each repo/os/arch:<br />
comm -23 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $newlist<br />
comm -13 <(cd /srv/ftp/.hidden/archlinux/ ; find) <(cd /srv/ftp/pub/archlinux-delta; find) | grep \.pkg > $oldlist<br />
<br />
3b. sync only package files across via hard links only:<br />
rsync -aplx --link-dest=/srv/ftp/.hidden/archlinux/ --exclude lastsync --exclude ‘*.db’ --exclude ‘*.db.tar.gz’ --exclude ‘*.abs.tar.gz’ --exclude ‘*.files’ --exclude ‘*.files.tar.gz’ /srv/ftp/.hidden/archlinux/ /srv/ftp/pub/archlinux-delta/<br />
<br />
4. Create new $repo.db as appropriate:<br />
repo-add -s -k <key> /srv/ftp/pub/archlinux-delta/$repo/os/$arch/$repo.db /srv/ftp/pub/archlinux-delta/$repo/os/$arch/*.pkg{,.tar{,.{bz2,gz,xz,Z}}}<br />
<br />
5. As with 2 above<br />
<br />
6. As with 3 above<br />
<br />
7. For each .pkg applicable in newlist, run repo-add with with “-d” to automatically create a delta:<br />
cd /srv/ftp/pub/archlinux-delta/$repo/os/$arch/ ; repo-add -s -k <key> -d $repo.db <package.pkg.ext><br />
<br />
Cannot use the original $repo.db every time as the original $repo.db will not contain any delta data<br />
<br />
8a. remove all old package files:<br />
for i in `grep pool\/packages oldlist` ; do rm -f $i ; done<br />
AND/OR??<br />
for i in `ls -l /srv/ftp/pub/archlinux-delta/pool/packages/ | awk ‘{print $2 “ “ $8}’ | grep ^1\ | awk ‘{print $2}’` ; do rm -f $i ; done<br />
<br />
Both methods have edge cases where files might be “missed” however both edge cases are covered by their alternative method.<br />
<br />
8b. remove all broken symlinks:<br />
find -L /srv/ftp/pub/archlinux-delta -type l -delete</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Mirrors&diff=186943
Mirrors
2012-02-29T09:23:24Z
<p>Zatricky: /* South Africa */</p>
<hr />
<div>[[Category:About Arch (English)]] [[Category:Package management (English)]] <br />
{{i18n|Mirrors}}<br />
[[fr:Miroirs]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Updating and managing package mirrors}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|pacman}}<br />
{{Article summary wiki|reflector}}<br />
{{Article summary end}}<br />
<br />
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.<br />
<br />
== Enabling a specific mirror ==<br />
<br />
To enable mirrors, open {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use.<br />
{{Note | ftp.archlinux.org is [http://www.archlinux.org/news/302/ throttled at 50KB/s]}} Example:<br />
<br />
# Any<br />
# Server = <nowiki>ftp://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki><br />
'''Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''<br />
<br />
See [[#Mirror status]] and [[#List by speed]] for tools that help choosing mirrors.<br />
<br />
{{Tip|Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.}}<br />
<br />
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
To use the ''HostEurope'' mirror as a default mirror, add it before the {{Ic|Include}} line:<br />
[core]<br />
'''Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
pacman will now try to connect to this mirror first. Proceed to do the same for ''[testing]'', ''[extra]'', and ''[community]'', if applicable.<br />
<br />
{{Note|If mirrors have been stated directly in {{ic|pacman.conf}}, remember to use the same mirror for all repositories. Otherwise packages that are incompatible to each other may be installed, like linux from ''[core]'' and an older kernel module from ''[extra]''.}}<br />
<br />
==Mirror status==<br />
Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or http://www.archlinux.org/mirrors/status/.<br />
<br />
You can generate an up to date mirrorlist [http://www.archlinux.org/mirrorlist/ here], automate the process with a [[#Script to automate use of Pacman Mirrorlist Generator|script]], or install [[Reflector]], a utility that generates a mirrorlist using Mirrorcheck's list; you can also manually check how up-to-date a mirror is by:<br />
#picking a server and browsing to "extra/os/";<br />
#accessing http://www.archlinux.org/ in another browser tab or window; and<br />
#comparing the last-modified date of the {{ic|i686}} directory on the mirror to the ''[extra]'' date on the homepage, in the ''Package Repositories'' box to the right.<br />
<br />
==Sorting mirrors==<br />
If not using reflector, which has the ability to sort mirrors by both how updated they are and their speed, follow this demonstration of manual mirror sorting.<br />
<br />
===List by speed===<br />
Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, {{ic|/usr/bin/rankmirrors}}.<br />
<br />
Use {{Ic|cd}} to switch to the {{ic|/etc/pacman.d}} directory:<br />
# cd /etc/pacman.d<br />
<br />
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:<br />
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup<br />
<br />
Edit {{ic|/etc/pacman.d/mirrorlist.backup}} and uncomment mirrors for testing with {{ic|rankmirrors}}.<br />
<br />
Optionally run the following {{Ic|sed}} line to uncomment every mirror:<br />
# sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup<br />
<br />
Finally, rank the mirrors. Operand {{Ic|-n 6}} means only output the 6 fastest mirrors: <br />
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist<br />
<br />
Run {{Ic|rankmirrors -h}} for a list of all the available options.<br />
<br />
'''Force pacman to refresh the package lists'''<br><br />
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, (manually or by using {{Ic|rankmirrors}}) issue the following command:<br />
# pacman -Syy<br />
<br />
{{Tip|Passing two {{Ic|--refresh}} or {{Ic|-y}} flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing {{Ic|pacman -Syy}} ''whenever changing to a new mirror'' is good practice and will avoid possible issues.}}<br />
<br />
===Combined listing by speed and status===<br />
It is not a good idea to just use the fastest mirrors, since the fastest mirrors might be out of date. The preferred way would be to use [[#List by speed]], then sorting those 6 fastest mirrors by their [[#Mirror status]]. <br />
<br />
Simply visit either one or both [[#Mirror status]] links and sort them by the ones that are more up to date. Move the more up to date mirrors to the top of {{ic|/etc/pacman.d/mirrorlist}} and if the mirrors are way out of date simply do not use those; repeat the process leaving out the outdated mirrors. So this ends up with a total of 6 mirrors that are sorted by speed and status, leaving out outdated mirrors. <br />
<br />
When having mirror issues the above should be repeated. Or repeat once in a while even if not having mirror problems, to keep {{ic|/etc/pacman.d/mirrorlist}} up to date.<br />
<br />
===Script to automate use of Pacman Mirrorlist Generator===<br />
You can use the following shell script to update your mirrors based on the rankings produced by the [http://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator]. If you do not live in the United States, you can change the country variable.<br />
<br />
{{hc|updatemirrors.sh|2=<nowiki>#!/bin/sh<br />
<br />
[ "$UID" != 0 ] && su=sudo<br />
<br />
country='United+States'<br />
url="http://www.archlinux.org/mirrorlist/?country=$country&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on"<br />
<br />
tmpfile=$(mktemp --suffix=-mirrorlist)<br />
<br />
# Get latest mirror list and save to tmpfile<br />
wget -qO- "$url" | sed 's/^#Server/Server/g' > "$tmpfile"<br />
<br />
# Backup and replace current mirrorlist file<br />
{ echo "Backing up the original mirrorlist..."<br />
$su mv -i /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig; } &&<br />
{ echo "Rotating the new list into place..."<br />
$su mv -i "$tmpfile" /etc/pacman.d/mirrorlist; }</nowiki>}}<br />
<br />
{{Note|You will need to copy the text above, place it into a file, and run {{Ic|chmod +x}} on the file. If you are not currently logged in as root, the script will invoke sudo for you when it needs to rotate the new mirrorlist into place.}}<br />
<br />
===Using Reflector===<br />
<br />
Alternatively, you can use [[Reflector]] to automatically retrieve the latest mirrorlist from the [http://www.archlinux.org/mirrors/status/ MirrorStatus] page, filter the most up-to-date mirrors, sort them by speed and overwrite the file {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
==Official mirrors==<br />
The official Arch Linux mirror list is available from the {{pkg|pacman-mirrorlist}} package. To get an even more up-to-date list of mirrors, use the [https://www.archlinux.org/mirrorlist/ Pacman Mirror List Generator] page on the main site.<br />
<br />
In the unlikely scenario that you are without any configured mirrors and {{Ic|pacman-mirrorlist}} is not installed, run the following command:<br />
# wget -O /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
Be sure to uncomment a preferred mirror as described above, then:<br />
# pacman -Syy<br />
# pacman -Sf pacman-mirrorlist<br />
<br />
If you want your mirror to be added to the official list, file a feature request. In the meantime, add it to the [[#Unofficial mirrors]] list at the end of this page.<br />
<br />
If you get an error stating that the {{ic|$arch}} variable is used but not defined, add the following to your {{ic|/etc/pacman.conf}}:<br />
Architecture = x86_64<br />
<br />
{{Note|You can also use the values {{Ic|auto}} and {{Ic|i686}} for the {{ic|Architecture}} variable.}}<br />
<br />
==Unofficial mirrors==<br />
These mirrors are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
===Global===<br />
* http://sourceforge.net/projects/archlinux/files/ - ''Does not have recent ISO releases. Use it only if for getting older ISOs.''<br />
<br />
===Bulgaria===<br />
*http://mirror.telepoint.bg/archlinux/ <br />
*ftp://mirror.telepoint.bg/archlinux/<br />
<br />
===Viet Nam===<br />
'''FPT TELECOM'''<br />
*http://mirror-fpt-telecom.fpt.net/archlinux/<br />
<br />
===China===<br />
'''CHINA TELECOM'''<br />
*http://mirror.lupaworld.com/archlinux/<br />
<br />
'''CHINA UNICOM'''<br />
*http://mirrors.sohu.com/archlinux/<br />
<br />
'''Cernet'''<br />
*http://ftp.sjtu.edu.cn/archlinux/ - ''Shanghai Jiaotong University''<br />
*ftp://ftp.sjtu.edu.cn/archlinux/<br />
*http://mirrors.ustc.edu.cn/archlinux/ - ''University of Science and Technology of China''<br />
*ftp://mirrors.ustc.edu.cn/archlinux/<br />
*http://mirrors.tuna.tsinghua.edu.cn/archlinux/ - ''Tsinghua University''<br />
*http://mirrors.4.tuna.tsinghua.edu.cn/archlinux/ ''(ipv4 only)''<br />
*http://mirrors.6.tuna.tsinghua.edu.cn/archlinux/ ''(ipv6 only)''<br />
*http://mirror.lzu.edu.cn/archlinux/ - ''Lanzhou University''<br />
<br />
===France===<br />
*http://delta.archlinux.fr/ - ''With Delta package support. Needs xdelta3 package from extra to run.''<br />
<br />
===Germany===<br />
*http://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*ftp://ftp.uni-erlangen.de/mirrors/archlinux/<br />
*http://ftp.u-tx.net/archlinux/<br />
*ftp://ftp.u-tx.net/archlinux/<br />
<br />
===Indonesia===<br />
*http://mirror.kavalinux.com/archlinux/ - ''only from Indonesia''<br />
*http://kambing.ui.ac.id/archlinux/<br />
*http://repo.ukdw.ac.id/archlinux/<br />
<br />
===Kazakhstan===<br />
*http://archlinux.kz/<br />
*http://mirror.neolabs.kz/archlinux/<br />
*http://mirror-kt.neolabs.kz/archlinux/<br />
<br />
===Lithuania===<br />
*http://edacval.homelinux.org/mirrors/archlinux/ - ''Only from LT, without ISO''<br />
<br />
===Malaysia===<br />
*http://mirror.oscc.org.my/archlinux/<br />
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''<br />
<br />
===New Zealand===<br />
*http://mirror.ihug.co.nz/archlinux/<br />
*http://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
===Poland===<br />
*ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW<br />
*http://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW<br />
*rsync://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW<br />
<br />
===Russia===<br />
*http://hatred.homelinux.net/archlinux/ - ''Vladivostok, without iso, with <sub>[http://hatred.homelinux.net/wiki/proekty:3spy:start 3SPY]</sub> project repos and [http://hatred.homelinux.net/archlinux/mingw32/os/i686 '''mingw32'''] repo''<br />
<br />
===South Africa===<br />
*http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/ - ''Stellenbosch University''<br />
*ftp://ftp.sun.ac.za/pub/mirrors/archlinux/<br />
*http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town''<br />
*ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
*http://mirror.ufs.ac.za/archlinux/ - ''University of the Free State''<br />
*ftp://mirror.ufs.ac.za/os/linux/distros/archlinux/<br />
*http://ftp.wa.co.za/pub/archlinux/ - ''Web Africa Networks''<br />
*ftp://ftp.wa.co.za/pub/archlinux/<br />
<br />
===United States===<br />
* http://archlinux.linuxfreedom.com - ''Contains numerous ISO images but does not contain the ISO dated 2011.08.19''<br />
* http://mirror.pointysoftware.net/archlinux/<br />
<br />
==IPv6-ready mirrors==<br />
*http://mirror.bytemark.co.uk/archlinux/ (Great Britain)<br />
*rsync://mirror.bytemark.co.uk/archlinux/ (Great Britain)<br />
*ftp://mirror.bytemark.co.uk/archlinux/ (Great Britain)<br />
*ftp.free.fr (France)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*http://mirror6.bjtu.edu.cn/archlinux/ (China)<br />
*http://mirrors.6.tuna.tsinghua.edu.cn/archlinux/ (China)<br />
*http://mirrors.inetutils.net/archlinux/ (Malaysia)<br />
*http://mirror.ece.vt.edu/archlinux/ (Virginia, US)<br />
*ftp://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
*http://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
*rsync://ftp.icm.edu.pl/pub/Linux/disk/archlinux/ (Poland)<br />
<br />
==Troubleshooting==<br />
<br />
===Out-of-sync mirrors: corrupted packages/file not found===<br />
<!-- Here or [[pacman]]? Seems like a mirror issue more than pacman... --><br />
Issues regarding out-of-sync mirrors pointed out in [https://www.archlinux.org/news/482/ this news post] may have already been sorted out for most users, but in the event that problems of this nature present themselves again, simply try to see if the packages are present in the [testing] repository.<br />
<br />
After having synced with {{Ic|pacman -Sy}}, use this command:<br />
# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
<br />
Doing so could help in any occasion where packages in the mirror have not been synced to [core] or [extra], and are still residing in [testing]. It is perfectly safe to install from [testing] in this case since the packages are being matched by version and release numbers.<br />
<br />
In any event, it is best to switch mirrors and sync with {{Ic|pacman -Syy}} than resorting to an alternate repository. However, all or some of the mirrors may at times be out-of-sync to some degree.<br />
<br />
====Using all mirrors====<br />
To emulate {{Ic|pacman -Su}}'s behavior of going through the entire mirror list, use this script:<br />
{{hc|~/bin/pacup|<nowiki><br />
#!/bin/bash<br />
<br />
# Pacman will not exit on the first error. Comment the line below to<br />
# try from [testing] directly.<br />
pacman -Su "$@" && exit<br />
<br />
while read -r pkg; do<br />
if pacman -Ud "$pkg"; then<br />
continue<br />
else<br />
while read -r mirror; do<br />
pacman -Ud $(sed "s,.*\(/\(community-\)*testing/os/\(i686\|x86_64\)/\),$mirror\1," <<<"$pkg") &&<br />
break<br />
done < <(sed -ne 's,^ *Server *= *\|/$repo/os/\(i686\|x86_64\).*,,gp' \<br />
</etc/pacman.d/mirrorlist | tail -n +2 )<br />
fi<br />
done < <(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
</nowiki>}}<br />
<br />
===Checking multiple mirrors with paccheck===<br />
The paccheck script can be used:<br />
* to compare pacman sync databases and package desc files to different mirrors,<br />
* to verify size of packages in pacman cache<br />
* to optionally compare packages in pacman cache to selected mirror(s).<br />
<br />
The script is intended to help to detect compromised mirrors, before the official implementation of [[package signing]]. It is destined for those who may want a little more assurance against some possible hacking scenarios of mirror servers.<br />
<br />
The Full System Update Procedure is:<br />
# Run ''paccheck'' as a non-root user. Pacman will be synchronised and the needed packages will be downloaded.<br />
# Examine report<br />
# If no package ''mismatch'', then run {{ic|pacman -Su}} as root to update your system<br />
<br />
The script can be found in the [[Arch User Repository|AUR]]: {{AUR|paccheck}}<br />
<br />
== See Also ==<br />
* [[http://wiki.gotux.net/code:bash:mirup MirUp]] -- pacman mirrorlist downloader/checker</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Convert_a_single_drive_system_to_RAID&diff=116566
Convert a single drive system to RAID
2010-09-07T13:53:55Z
<p>Zatricky: /* Config mdadm.conf */</p>
<hr />
<div>[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
You already have a fully functional system setup on a single drive, but you would like to add some redundancy to the setup by using RAID-1 to mirror your data across 2 drives. This guide follows the following steps to make the required changes, without losing data.<br />
* Create a single-disk RAID-1 array with our new disk<br />
* Move all your data from the old-disk to the new RAID-1 array<br />
* Verify the data move was successful<br />
* Wipe the old disk and add it to the new RAID-1 array<br />
<br />
{{Warning | Make a backup first. Even though our aim is to convert to a RAID setup without losing data, there's no guarantees the process will be perfect, and there is a high risk of accidents happening.}}<br />
<br />
<br />
== Assumptions ==<br />
* I will assume for the sake of the guide that the disk currently in your system is {{Filename|/dev/sda}} and your new disk is {{Filename|/dev/sdb}}.<br />
* We will create the following configuration:<br />
** 1 x RAID-1 array for the file-system (using 2 x partitions, 1 on each disk)<br />
** 2 x Swap Partitions using 1 partition on each disk.<br />
The swap partitions will not be in a RAID array as having swap on RAID serves no purpose. Refer to [http://unthought.net/Software-RAID.HOWTO/Software-RAID.HOWTO-2.html#ss2.3 this article] for reasons why.<br />
<br />
* To minimize the risk of Data on Disk (DoD) changing in the middle of our changes, I suggest you drop to single user mode before you start by using the {{Codeline|telinit 1}} command.<br />
<br />
* You will need to be the root user for the entire process.<br />
<br />
== Create new RAID array ==<br />
First we need to create a single-disk RAID array using the new disk.<br />
=== Partition the Disk ===<br />
Use fdisk or your partitioning program of choice to setup 2 primary partitions on your new disk. Make the swap partition half the size of the total swap you want (the other half will go on the other disk).<br />
<br />
Drop to single user mode:<br />
telinit 1<br />
<br />
To see the current partitions:<br />
fdisk -l<br />
<br />
To partition the new disk<br />
fdisk /dev/sdb<br />
<br />
Then the fdisk commands to partition the new disk. Note that everything after the "#" is an explanation of what the command is doing:<br />
c # Turn off DOS compatibility (optional).<br />
n # new<br />
p # primary<br />
1 # first partition<br />
1 # start at first cylinder<br />
101 # end cylinder, 0.1% of the disk. Note: update this number as appropriate for your disk.<br />
n # new<br />
p # primary<br />
2 # second partition<br />
press enter # Uses the default start from the end of the first partition<br />
press enter # Uses the default of using all the remain space on the disk.<br />
t # set the partition type<br />
1 # for partition number 1<br />
82 # ... and set it to be swap<br />
t # set the partition type<br />
2 # for partition number 2 ...<br />
fd # ... and set it to be "linux raid auto"<br />
a # Toggle the bootable flag to be "on"<br />
2 # for partition number 2.<br />
p # print what the partition table will look like<br />
w # now write all of the above changes to disk<br />
<br />
At the end of partitioning, your partitions should look something like this:<br />
[root@arch ~]# fdisk -l /dev/sdb<br />
Disk /dev/sdb: 80.0 GB, 80025280000 bytes<br />
255 heads, 63 sectors/track, 9729 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0x00000000<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 1 66 530113+ 82 Linux swap / Solaris<br />
/dev/sdb2 67 9729 77618047+ fd Linux raid autodetect<br />
<br />
Make sure your your partition types are set correctly. {{Codeline|"Linux Swap"}} is type {{Codeline|82}} and {{Codeline|"Linux raid autodetect"}} is type {{Codeline|FD}}.<br />
<br />
=== Create the RAID device ===<br />
Next, create the single-disk RAID-1 array. Note the {{Codeline|"missing"}} keyword is specified as one of our devices. We are going to fill this missing device later.<br />
[root@arch ~]# mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Note: If the above command causes mdadm to say "no such device /dev/sdb2", then reboot, and run the command again.<br />
<br />
If you want to use Grub 0.97 (default in the Arch Linux 2010.05 release) on RAID 1, you need to specify an older version of metadata than the default. Add the option "--metadata=0.90" to the above command. Otherwise Grub will respond with "Filesystem type unknown, partition type 0xfd" and refuse to install. This is supposedly not necessary with Grub 2.<br />
[root@arch ~]# mdadm --create /dev/md0 --metadata=0.90 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Make sure the array has been created correctly by checking {{Filename|/proc/mdstat}}:<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
The devices are intact, however in a degraded state. (Because it's missing half the array!)<br />
<br />
=== Make file systems ===<br />
Use the file system of your preference here. I'll use ext3 for this guide.<br />
[root@arch ~]# mkfs -t ext3 -j -L RAID-ONE /dev/md0<br />
mke2fs 1.38 (30-Jun-2005)<br />
Filesystem label=<br />
OS type: Linux<br />
Block size=4096 (log=2)<br />
Fragment size=4096 (log=2)<br />
10027008 inodes, 20027008 blocks<br />
1001350 blocks (5.00%) reserved for the super user<br />
First data block=0<br />
612 block groups<br />
32768 blocks per group, 32768 fragments per group<br />
16384 inodes per group<br />
Superblock backups stored on blocks:<br />
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br />
4096000, 7962624, 11239424<br />
<br />
Writing inode tables: done<br />
Creating journal (32768 blocks): done<br />
Writing superblocks and filesystem accounting information: done<br />
<br />
This filesystem will be automatically checked every 25 mounts or<br />
180 days, whichever comes first. Use tune2fs -c or -i to override.<br />
<br />
Make a file system on the swap partition:<br />
[root@arch ~]# mkswap -L NEW-SWAP /dev/sdb1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=NEW-SWAP, UUID=9d746813-2d6b-4706-a56a-ecfd108f3fe9<br />
<br />
== Copy data ==<br />
The new RAID-1 array is ready to start accepting data! So now we need to mount the array, and copy everything from the old system to the new system<br />
<br />
=== Mount the array ===<br />
[root@arch ~]# mkdir /mnt/new-raid<br />
[root@arch ~]# mount /dev/md0 /mnt/new-raid<br />
<br />
=== Copy the data ===<br />
[root@arch ~]# rsync -avxHAXS --delete --progress / /mnt/new-raid<br />
<br />
Note that by using the '''-x''' option you are limiting rsync to a single file system. If you have a more traditional file system layout, with different partitions for /boot, /home, and perhaps others, you will need to rsync those file systems separately. For example:<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /boot /mnt/new-raid/boot<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /home /mnt/new-raid/home<br />
<br />
Alternatively, you can use tar instead of the above rsync command if you prefer. rsync will, however, be quicker if you are only copying over changes. The tar command is: <code>tar -C / -clspf - . | tar -xlspvf -</code><br />
<br />
=== Update GRUB ===<br />
Use your preferred text editor to open {{Filename|/mnt/new-raid/boot/grub/menu.lst}}.<br />
<br />
--- SNIP ---<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
## fallback<br />
fallback 1<br />
<br />
# (0) Arch Linux<br />
title Arch Linux - Original Disc<br />
root (hd0,0)<br />
kernel /vmlinuz26 root=/dev/sda1<br />
<br />
# (1) Arch Linux<br />
title Arch Linux - New RAID<br />
root (hd1,0)<br />
#kernel /vmlinuz26 root=/dev/sda1 ro<br />
kernel /vmlinuz26 root=/dev/md0 md=0,/dev/sda2,/dev/sdb2<br />
--- SNIP ---<br />
Notice we added the {{Codeline|fallback}} line and duplicated the Arch Linux entry with a different {{Codeline|root}} directive on the kernel line.<br />
<br />
Also update the "kopt" and "groot" sections, as shown below, if they are in your {{Filename|/mnt/new-raid/boot/grub/menu.lst}} file, because it will make applying distribution kernel updates easier:<br />
- # kopt=root=UUID=fbafab1a-18f5-4bb9-9e66-a71c1b00977e ro<br />
+ # kopt=root=/dev/md0 ro md=0,/dev/sda2,/dev/sdb2<br />
<br />
## default grub root device<br />
## e.g. groot=(hd0,0)<br />
- # groot=(hd0,0)<br />
+ # groot=(hd0,1)<br />
<br />
=== Alter fstab ===<br />
You need to tell fstab on the '''new''' disk where to find the new devices. It's better to use UUID codes here, which should not change, even if our partition detection order changes or a drive gets removed.<br />
<br />
To find the UUID to use:<br />
[root@arch ~]# blkid<br />
/dev/sda1: TYPE="swap" UUID="34656682b-34ad-8ed5-9233-dfab42272212" <br />
/dev/sdb1: UUID="9ff5682b-d5a1-4ed5-8d63-d1df911e0142" TYPE="swap" LABEL="NEW-SWAP" <br />
/dev/md0: UUID="6f2ea3d3-d7be-4c9d-adfa-dbeeedaf128e" SEC_TYPE="ext2" TYPE="ext3" LABEL="RAID-ONE" <br />
/dev/sda2: UUID="13dd2227-6592-403b-931a-7f3e14a23e1f" TYPE="ext2" <br />
/dev/sdb2: UUID="b28813e7-15fc-d4aa-dc8a-e2c1de641df1" TYPE="mdraid" <br />
<br />
Look for the partition labeled "NEW-SWAP", on /dev/sdb1, that we created above. Copy your swap partition's UUID into the new fstab, as shown below. Of course we also add /dev/md0, as our root mount point.<br />
<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<!-- /dev/sdb1 swap swap defaults 0 0 --><br />
<br />
=== Rebuild initcpio or initramfs ===<br />
<br />
==== First chroot into the RAID system ====<br />
<br />
[root@arch ~]# mount --bind /sys /mnt/new-raid/sys<br />
[root@arch ~]# mount --bind /proc /mnt/new-raid/proc<br />
[root@arch ~]# mount --bind /dev /mnt/new-raid/dev<br />
[root@arch ~]# chroot /mnt/new-raid/<br />
[root /]# <br />
<br />
If the chroot command gives you an error like <code>chroot: failed to run command `/bin/zsh': No such file or directory</code>, then use <code>chroot /mnt/new-raid/ /bin/bash</code> instead.<br />
<br />
You are now chrooted in what will become the root of your RAID-1 system. Complete the appropriate section below for your distribution (almost every other step is identical, regardless of the Linux variant).<br />
<br />
==== Record mdadm's config ====<br />
<br />
For Arch Linux, use "/etc/mdadm.conf", for Ubuntu or Debian, use "/etc/mdadm/mdadm.conf"<br />
nano /etc/mdadm.conf<br />
... and change the "MAILADDR" line to be your email address, if you want emailed alerts of problems with the RAID-1.<br />
<br />
Then save the array configuration with UUIDs to make it easier for the system to find /dev/md0 on boot-up. If you don't do this, you can get an "ALERT! /dev/md0 does not exist" error when booting :<br />
mdadm --detail --scan >> /etc/mdadm.conf<br />
<br />
==== For Arch Linux: Rebuild initcpio ====<br />
<br />
Edit {{Filename|/etc/mkinitcpio.conf}} to include {{Codeline|mdadm}} in the HOOKS array. Place it after {{Codeline|autodetect}}, {{Codeline|sata}}, {{Codeline|scsi}} and {{Codeline|pata}} (whichever is appropriate for your hardware).<br />
[root /]# mkinitcpio -g /boot/kernel26.img<br />
[root /]# exit<br />
<br />
==== For Ubuntu or Debian: Rebuild initramfs ====<br />
<br />
Then rebuild initramfs, incorporating the two above changes:<br />
update-initramfs -k `uname -r` -c -t<br />
<br />
This will rebuild your running version - to rebuild others, this will show a listing (in Ubuntu):<br />
ls /boot/ | perl -lne "/^[A-z\.\-]+/m && print $'" | egrep -e 'openvz$|generic$|server$' | sort -u<br />
Then substitute/script in these others so that all are available for use with the new RAID setup.<br />
<br />
=== Install GRUB on the RAID array ===<br />
Start grub:<br />
<br />
[root@arch ~]# grub --no-floppy<br />
<br />
Then we find our two partitions - the current one (hd0,0) (I.e. first disk, first partition), and (hd1,1) (i.e. the partition we just added above, on the second partition of the second drive). Check you get two results here:<br />
<br />
grub> find /boot/grub/stage1<br />
(hd0,0)<br />
(hd1,1)<br />
<br />
Then we tell grub to assume the new second drive is (hd0), i.e. the first disk in the system (when it is not currently the case). If your first disk fails, however, and you remove it, or you change the order disks are detected in the BIOS so that you can boot from your second disk, then your second disk will become the first disk in the system. The MBR will then be correct, your new second drive will have become your first drive, and you will be able to boot from this disk.<br />
<br />
grub> device (hd0) /dev/sdb<br />
<br />
Then we install GRUB onto the MBR of our new second drive. Check that the "partition type" is detected as "0xfd", as shown below, to make sure you have the right partition:<br />
<br />
grub> root (hd0,1)<br />
Filesystem type is ext2fs, partition type 0xfd<br />
grub> setup (hd0)<br />
Checking if "/boot/grub/stage1" exists... yes<br />
Checking if "/boot/grub/stage2" exists... yes<br />
Checking if "/boot/grub/e2fs_stage1_5" exists... yes<br />
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded<br />
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,1)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded<br />
Done<br />
grub> quit<br />
<br />
== Verify success ==<br />
Reboot your computer, making sure it boots from the new RAID disk ({{Filename|/dev/sdb}}) and not the original disk ({{Filename|/dev/sda}}). You may need to change the boot device priorities in your BIOS to do this.<br />
<br />
Once the GRUB on the '''new''' disk loads, make sure you select to boot the new entry you created in {{Filename|menu.lst}} earlier.<br />
<br />
Verify you have booted from the RAID array by looking at the output of mount. Also check mdstat again only to confirm which disk is in the array.<br />
[root@arch ~]# mount<br />
/dev/md0 on / type ext3 (rw)<br />
<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
<br />
Also {{Codeline|swapon -s}}:<br />
[root@arch ~]# swapon -s<br />
Filename Type Size Used Priority<br />
/dev/sdb1 partition 4000144 16 -1<br />
Note it is the swap partition on {{Filename|sdb}} that is in use, nothing from {{Filename|sda}}.<br />
<br />
If system boots fine, and the output of the above commands is correct, then congratulations! You're now running off the degraded RAID array. We can add the original disk to the array now to bring it up to full performance.<br />
<br />
== Add original disk to array ==<br />
<br />
=== Partition original disk ===<br />
<br />
Copy the partition table from /dev/sdb (newly implemented RAID disk) to /dev/sda (second disk we are adding to the array) so that both disks have exactly the same layout.<br />
[root@arch ~]# sfdisk -d /dev/sdb | sfdisk /dev/sda<br />
<br />
Alternate method - this will output the /dev/sdb partition layout to a file, then it's used as input for partitioning /dev/sda.<br />
[root@arch ~]# sfdisk -d /dev/sdb > raidinfo-partitions.sdb<br />
[root@arch ~]# sfdisk /dev/sda < raidinfo-partitions.sdb<br />
Use the --force if needed.<br />
[root@arch ~]# sfdisk --force /dev/sda < raidinfo-partitions.sdb<br />
<br />
Verify that the partitioning is identical:<br />
[root@arch ~]# fdisk -l<br />
<br />
==== Note ====<br />
If you get an error when attempting to add the parition to the array: <br />
mdadm: /dev/sda1 not large enough to join array<br />
You might have seen an earlier warning message when partitioning this disk that the kernel<br />
still sees the old disk size - a reboot ought to fix this, then try adding again to the array.<br />
<br />
=== Add disk partition to array ===<br />
[root@arch ~]# mdadm /dev/md0 -a /dev/sda2<br />
mdadm: hot added /dev/sda2<br />
<br />
Verify that the RAID array is being rebuilt.<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sda2[2] sdb2[1]<br />
80108032 blocks [2/1] [_U]<br />
[>....................] recovery = 1.2% (1002176/80108032) finish=42.0min speed=31318K/sec<br />
<br />
unused devices: <none><br />
<br />
=== Add second swap partition ===<br />
The partition was created with sfdisk, but it still has to be formatted for swap.<br />
[root@arch ~]# mkswap -L SWAP /dev/sda1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=SWAP, UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9<br />
<br />
Then add this UUID to the fstab exactly like the other one earlier. When done, it should look similar to this:<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9 none swap sw 0 0<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<br />
It can be activated immediately:<br />
[root@arch ~]# swapon /dev/sda1<br />
<br />
=== Verify that email alerts are working ===<br />
<br />
If you run this command, then you should get a notification email showing the contents of /proc/mdstat :<br />
[root@arch ~]# mdadm --monitor --test --oneshot /dev/md0<br />
Check that you get the test email notification. This way you can be aware if one of the disks in the array fails (otherwise it may fail silently, putting you at risk of data loss if another drive should also fail). If you don't get an email notification, check the "MAILADDR" line in mdadm.conf, and also check that sending an email to this address from the command line (e.g. using the "mail" command) works.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Convert_a_single_drive_system_to_RAID&diff=116565
Convert a single drive system to RAID
2010-09-07T13:53:15Z
<p>Zatricky: </p>
<hr />
<div>[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
You already have a fully functional system setup on a single drive, but you would like to add some redundancy to the setup by using RAID-1 to mirror your data across 2 drives. This guide follows the following steps to make the required changes, without losing data.<br />
* Create a single-disk RAID-1 array with our new disk<br />
* Move all your data from the old-disk to the new RAID-1 array<br />
* Verify the data move was successful<br />
* Wipe the old disk and add it to the new RAID-1 array<br />
<br />
{{Warning | Make a backup first. Even though our aim is to convert to a RAID setup without losing data, there's no guarantees the process will be perfect, and there is a high risk of accidents happening.}}<br />
<br />
<br />
== Assumptions ==<br />
* I will assume for the sake of the guide that the disk currently in your system is {{Filename|/dev/sda}} and your new disk is {{Filename|/dev/sdb}}.<br />
* We will create the following configuration:<br />
** 1 x RAID-1 array for the file-system (using 2 x partitions, 1 on each disk)<br />
** 2 x Swap Partitions using 1 partition on each disk.<br />
The swap partitions will not be in a RAID array as having swap on RAID serves no purpose. Refer to [http://unthought.net/Software-RAID.HOWTO/Software-RAID.HOWTO-2.html#ss2.3 this article] for reasons why.<br />
<br />
* To minimize the risk of Data on Disk (DoD) changing in the middle of our changes, I suggest you drop to single user mode before you start by using the {{Codeline|telinit 1}} command.<br />
<br />
* You will need to be the root user for the entire process.<br />
<br />
== Create new RAID array ==<br />
First we need to create a single-disk RAID array using the new disk.<br />
=== Partition the Disk ===<br />
Use fdisk or your partitioning program of choice to setup 2 primary partitions on your new disk. Make the swap partition half the size of the total swap you want (the other half will go on the other disk).<br />
<br />
Drop to single user mode:<br />
telinit 1<br />
<br />
To see the current partitions:<br />
fdisk -l<br />
<br />
To partition the new disk<br />
fdisk /dev/sdb<br />
<br />
Then the fdisk commands to partition the new disk. Note that everything after the "#" is an explanation of what the command is doing:<br />
c # Turn off DOS compatibility (optional).<br />
n # new<br />
p # primary<br />
1 # first partition<br />
1 # start at first cylinder<br />
101 # end cylinder, 0.1% of the disk. Note: update this number as appropriate for your disk.<br />
n # new<br />
p # primary<br />
2 # second partition<br />
press enter # Uses the default start from the end of the first partition<br />
press enter # Uses the default of using all the remain space on the disk.<br />
t # set the partition type<br />
1 # for partition number 1<br />
82 # ... and set it to be swap<br />
t # set the partition type<br />
2 # for partition number 2 ...<br />
fd # ... and set it to be "linux raid auto"<br />
a # Toggle the bootable flag to be "on"<br />
2 # for partition number 2.<br />
p # print what the partition table will look like<br />
w # now write all of the above changes to disk<br />
<br />
At the end of partitioning, your partitions should look something like this:<br />
[root@arch ~]# fdisk -l /dev/sdb<br />
Disk /dev/sdb: 80.0 GB, 80025280000 bytes<br />
255 heads, 63 sectors/track, 9729 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0x00000000<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 1 66 530113+ 82 Linux swap / Solaris<br />
/dev/sdb2 67 9729 77618047+ fd Linux raid autodetect<br />
<br />
Make sure your your partition types are set correctly. {{Codeline|"Linux Swap"}} is type {{Codeline|82}} and {{Codeline|"Linux raid autodetect"}} is type {{Codeline|FD}}.<br />
<br />
=== Create the RAID device ===<br />
Next, create the single-disk RAID-1 array. Note the {{Codeline|"missing"}} keyword is specified as one of our devices. We are going to fill this missing device later.<br />
[root@arch ~]# mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Note: If the above command causes mdadm to say "no such device /dev/sdb2", then reboot, and run the command again.<br />
<br />
If you want to use Grub 0.97 (default in the Arch Linux 2010.05 release) on RAID 1, you need to specify an older version of metadata than the default. Add the option "--metadata=0.90" to the above command. Otherwise Grub will respond with "Filesystem type unknown, partition type 0xfd" and refuse to install. This is supposedly not necessary with Grub 2.<br />
[root@arch ~]# mdadm --create /dev/md0 --metadata=0.90 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Make sure the array has been created correctly by checking {{Filename|/proc/mdstat}}:<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
The devices are intact, however in a degraded state. (Because it's missing half the array!)<br />
<br />
=== Make file systems ===<br />
Use the file system of your preference here. I'll use ext3 for this guide.<br />
[root@arch ~]# mkfs -t ext3 -j -L RAID-ONE /dev/md0<br />
mke2fs 1.38 (30-Jun-2005)<br />
Filesystem label=<br />
OS type: Linux<br />
Block size=4096 (log=2)<br />
Fragment size=4096 (log=2)<br />
10027008 inodes, 20027008 blocks<br />
1001350 blocks (5.00%) reserved for the super user<br />
First data block=0<br />
612 block groups<br />
32768 blocks per group, 32768 fragments per group<br />
16384 inodes per group<br />
Superblock backups stored on blocks:<br />
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br />
4096000, 7962624, 11239424<br />
<br />
Writing inode tables: done<br />
Creating journal (32768 blocks): done<br />
Writing superblocks and filesystem accounting information: done<br />
<br />
This filesystem will be automatically checked every 25 mounts or<br />
180 days, whichever comes first. Use tune2fs -c or -i to override.<br />
<br />
Make a file system on the swap partition:<br />
[root@arch ~]# mkswap -L NEW-SWAP /dev/sdb1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=NEW-SWAP, UUID=9d746813-2d6b-4706-a56a-ecfd108f3fe9<br />
<br />
== Copy data ==<br />
The new RAID-1 array is ready to start accepting data! So now we need to mount the array, and copy everything from the old system to the new system<br />
<br />
=== Mount the array ===<br />
[root@arch ~]# mkdir /mnt/new-raid<br />
[root@arch ~]# mount /dev/md0 /mnt/new-raid<br />
<br />
=== Copy the data ===<br />
[root@arch ~]# rsync -avxHAXS --delete --progress / /mnt/new-raid<br />
<br />
Note that by using the '''-x''' option you are limiting rsync to a single file system. If you have a more traditional file system layout, with different partitions for /boot, /home, and perhaps others, you will need to rsync those file systems separately. For example:<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /boot /mnt/new-raid/boot<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /home /mnt/new-raid/home<br />
<br />
Alternatively, you can use tar instead of the above rsync command if you prefer. rsync will, however, be quicker if you are only copying over changes. The tar command is: <code>tar -C / -clspf - . | tar -xlspvf -</code><br />
<br />
=== Update GRUB ===<br />
Use your preferred text editor to open {{Filename|/mnt/new-raid/boot/grub/menu.lst}}.<br />
<br />
--- SNIP ---<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
## fallback<br />
fallback 1<br />
<br />
# (0) Arch Linux<br />
title Arch Linux - Original Disc<br />
root (hd0,0)<br />
kernel /vmlinuz26 root=/dev/sda1<br />
<br />
# (1) Arch Linux<br />
title Arch Linux - New RAID<br />
root (hd1,0)<br />
#kernel /vmlinuz26 root=/dev/sda1 ro<br />
kernel /vmlinuz26 root=/dev/md0 md=0,/dev/sda2,/dev/sdb2<br />
--- SNIP ---<br />
Notice we added the {{Codeline|fallback}} line and duplicated the Arch Linux entry with a different {{Codeline|root}} directive on the kernel line.<br />
<br />
Also update the "kopt" and "groot" sections, as shown below, if they are in your {{Filename|/mnt/new-raid/boot/grub/menu.lst}} file, because it will make applying distribution kernel updates easier:<br />
- # kopt=root=UUID=fbafab1a-18f5-4bb9-9e66-a71c1b00977e ro<br />
+ # kopt=root=/dev/md0 ro md=0,/dev/sda2,/dev/sdb2<br />
<br />
## default grub root device<br />
## e.g. groot=(hd0,0)<br />
- # groot=(hd0,0)<br />
+ # groot=(hd0,1)<br />
<br />
=== Alter fstab ===<br />
You need to tell fstab on the '''new''' disk where to find the new devices. It's better to use UUID codes here, which should not change, even if our partition detection order changes or a drive gets removed.<br />
<br />
To find the UUID to use:<br />
[root@arch ~]# blkid<br />
/dev/sda1: TYPE="swap" UUID="34656682b-34ad-8ed5-9233-dfab42272212" <br />
/dev/sdb1: UUID="9ff5682b-d5a1-4ed5-8d63-d1df911e0142" TYPE="swap" LABEL="NEW-SWAP" <br />
/dev/md0: UUID="6f2ea3d3-d7be-4c9d-adfa-dbeeedaf128e" SEC_TYPE="ext2" TYPE="ext3" LABEL="RAID-ONE" <br />
/dev/sda2: UUID="13dd2227-6592-403b-931a-7f3e14a23e1f" TYPE="ext2" <br />
/dev/sdb2: UUID="b28813e7-15fc-d4aa-dc8a-e2c1de641df1" TYPE="mdraid" <br />
<br />
Look for the partition labeled "NEW-SWAP", on /dev/sdb1, that we created above. Copy your swap partition's UUID into the new fstab, as shown below. Of course we also add /dev/md0, as our root mount point.<br />
<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<!-- /dev/sdb1 swap swap defaults 0 0 --><br />
<br />
=== Rebuild initcpio or initramfs ===<br />
<br />
==== First chroot into the RAID system ====<br />
<br />
[root@arch ~]# mount --bind /sys /mnt/new-raid/sys<br />
[root@arch ~]# mount --bind /proc /mnt/new-raid/proc<br />
[root@arch ~]# mount --bind /dev /mnt/new-raid/dev<br />
[root@arch ~]# chroot /mnt/new-raid/<br />
[root /]# <br />
<br />
If the chroot command gives you an error like <code>chroot: failed to run command `/bin/zsh': No such file or directory</code>, then use <code>chroot /mnt/new-raid/ /bin/bash</code> instead.<br />
<br />
You are now chrooted in what will become the root of your RAID-1 system. Complete the appropriate section below for your distribution (almost every other step is identical, regardless of the Linux variant).<br />
<br />
==== Config mdadm.conf ====<br />
<br />
For Arch Linux, use "/etc/mdadm.conf", for Ubuntu or Debian, use "/etc/mdadm/mdadm.conf"<br />
nano /etc/mdadm.conf<br />
... and change the "MAILADDR" line to be your email address, if you want emailed alerts of problems with the RAID-1.<br />
<br />
Then save the array configuration with UUIDs to make it easier for the system to find /dev/md0 on boot-up. If you don't do this, you can get an "ALERT! /dev/md0 does not exist" error when booting :<br />
mdadm --detail --scan >> /etc/mdadm.conf <br />
<br />
==== For Arch Linux: Rebuild initcpio ====<br />
<br />
Edit {{Filename|/etc/mkinitcpio.conf}} to include {{Codeline|mdadm}} in the HOOKS array. Place it after {{Codeline|autodetect}}, {{Codeline|sata}}, {{Codeline|scsi}} and {{Codeline|pata}} (whichever is appropriate for your hardware).<br />
[root /]# mkinitcpio -g /boot/kernel26.img<br />
[root /]# exit<br />
<br />
==== For Ubuntu or Debian: Rebuild initramfs ====<br />
<br />
Then rebuild initramfs, incorporating the two above changes:<br />
update-initramfs -k `uname -r` -c -t<br />
<br />
This will rebuild your running version - to rebuild others, this will show a listing (in Ubuntu):<br />
ls /boot/ | perl -lne "/^[A-z\.\-]+/m && print $'" | egrep -e 'openvz$|generic$|server$' | sort -u<br />
Then substitute/script in these others so that all are available for use with the new RAID setup.<br />
<br />
=== Install GRUB on the RAID array ===<br />
Start grub:<br />
<br />
[root@arch ~]# grub --no-floppy<br />
<br />
Then we find our two partitions - the current one (hd0,0) (I.e. first disk, first partition), and (hd1,1) (i.e. the partition we just added above, on the second partition of the second drive). Check you get two results here:<br />
<br />
grub> find /boot/grub/stage1<br />
(hd0,0)<br />
(hd1,1)<br />
<br />
Then we tell grub to assume the new second drive is (hd0), i.e. the first disk in the system (when it is not currently the case). If your first disk fails, however, and you remove it, or you change the order disks are detected in the BIOS so that you can boot from your second disk, then your second disk will become the first disk in the system. The MBR will then be correct, your new second drive will have become your first drive, and you will be able to boot from this disk.<br />
<br />
grub> device (hd0) /dev/sdb<br />
<br />
Then we install GRUB onto the MBR of our new second drive. Check that the "partition type" is detected as "0xfd", as shown below, to make sure you have the right partition:<br />
<br />
grub> root (hd0,1)<br />
Filesystem type is ext2fs, partition type 0xfd<br />
grub> setup (hd0)<br />
Checking if "/boot/grub/stage1" exists... yes<br />
Checking if "/boot/grub/stage2" exists... yes<br />
Checking if "/boot/grub/e2fs_stage1_5" exists... yes<br />
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded<br />
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,1)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded<br />
Done<br />
grub> quit<br />
<br />
== Verify success ==<br />
Reboot your computer, making sure it boots from the new RAID disk ({{Filename|/dev/sdb}}) and not the original disk ({{Filename|/dev/sda}}). You may need to change the boot device priorities in your BIOS to do this.<br />
<br />
Once the GRUB on the '''new''' disk loads, make sure you select to boot the new entry you created in {{Filename|menu.lst}} earlier.<br />
<br />
Verify you have booted from the RAID array by looking at the output of mount. Also check mdstat again only to confirm which disk is in the array.<br />
[root@arch ~]# mount<br />
/dev/md0 on / type ext3 (rw)<br />
<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
<br />
Also {{Codeline|swapon -s}}:<br />
[root@arch ~]# swapon -s<br />
Filename Type Size Used Priority<br />
/dev/sdb1 partition 4000144 16 -1<br />
Note it is the swap partition on {{Filename|sdb}} that is in use, nothing from {{Filename|sda}}.<br />
<br />
If system boots fine, and the output of the above commands is correct, then congratulations! You're now running off the degraded RAID array. We can add the original disk to the array now to bring it up to full performance.<br />
<br />
== Add original disk to array ==<br />
<br />
=== Partition original disk ===<br />
<br />
Copy the partition table from /dev/sdb (newly implemented RAID disk) to /dev/sda (second disk we are adding to the array) so that both disks have exactly the same layout.<br />
[root@arch ~]# sfdisk -d /dev/sdb | sfdisk /dev/sda<br />
<br />
Alternate method - this will output the /dev/sdb partition layout to a file, then it's used as input for partitioning /dev/sda.<br />
[root@arch ~]# sfdisk -d /dev/sdb > raidinfo-partitions.sdb<br />
[root@arch ~]# sfdisk /dev/sda < raidinfo-partitions.sdb<br />
Use the --force if needed.<br />
[root@arch ~]# sfdisk --force /dev/sda < raidinfo-partitions.sdb<br />
<br />
Verify that the partitioning is identical:<br />
[root@arch ~]# fdisk -l<br />
<br />
==== Note ====<br />
If you get an error when attempting to add the parition to the array: <br />
mdadm: /dev/sda1 not large enough to join array<br />
You might have seen an earlier warning message when partitioning this disk that the kernel<br />
still sees the old disk size - a reboot ought to fix this, then try adding again to the array.<br />
<br />
=== Add disk partition to array ===<br />
[root@arch ~]# mdadm /dev/md0 -a /dev/sda2<br />
mdadm: hot added /dev/sda2<br />
<br />
Verify that the RAID array is being rebuilt.<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sda2[2] sdb2[1]<br />
80108032 blocks [2/1] [_U]<br />
[>....................] recovery = 1.2% (1002176/80108032) finish=42.0min speed=31318K/sec<br />
<br />
unused devices: <none><br />
<br />
=== Add second swap partition ===<br />
The partition was created with sfdisk, but it still has to be formatted for swap.<br />
[root@arch ~]# mkswap -L SWAP /dev/sda1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=SWAP, UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9<br />
<br />
Then add this UUID to the fstab exactly like the other one earlier. When done, it should look similar to this:<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9 none swap sw 0 0<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<br />
It can be activated immediately:<br />
[root@arch ~]# swapon /dev/sda1<br />
<br />
=== Verify that email alerts are working ===<br />
<br />
If you run this command, then you should get a notification email showing the contents of /proc/mdstat :<br />
[root@arch ~]# mdadm --monitor --test --oneshot /dev/md0<br />
Check that you get the test email notification. This way you can be aware if one of the disks in the array fails (otherwise it may fail silently, putting you at risk of data loss if another drive should also fail). If you don't get an email notification, check the "MAILADDR" line in mdadm.conf, and also check that sending an email to this address from the command line (e.g. using the "mail" command) works.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Convert_a_single_drive_system_to_RAID&diff=116561
Convert a single drive system to RAID
2010-09-07T13:50:29Z
<p>Zatricky: /* For Ubuntu or Debian: Rebuild initramfs */</p>
<hr />
<div>[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
You already have a fully functional system setup on a single drive, but you would like to add some redundancy to the setup by using RAID-1 to mirror your data across 2 drives. This guide follows the following steps to make the required changes, without losing data.<br />
* Create a single-disk RAID-1 array with our new disk<br />
* Move all your data from the old-disk to the new RAID-1 array<br />
* Verify the data move was successful<br />
* Wipe the old disk and add it to the new RAID-1 array<br />
<br />
{{Warning | Make a backup first. Even though our aim is to convert to a RAID setup without losing data, there's no guarantees the process will be perfect, and there is a high risk of accidents happening.}}<br />
<br />
<br />
== Assumptions ==<br />
* I will assume for the sake of the guide that the disk currently in your system is {{Filename|/dev/sda}} and your new disk is {{Filename|/dev/sdb}}.<br />
* We will create the following configuration:<br />
** 1 x RAID-1 array for the file-system (using 2 x partitions, 1 on each disk)<br />
** 2 x Swap Partitions using 1 partition on each disk.<br />
The swap partitions will not be in a RAID array as having swap on RAID serves no purpose. Refer to [http://unthought.net/Software-RAID.HOWTO/Software-RAID.HOWTO-2.html#ss2.3 this article] for reasons why.<br />
<br />
* To minimize the risk of Data on Disk (DoD) changing in the middle of our changes, I suggest you drop to single user mode before you start by using the {{Codeline|telinit 1}} command.<br />
<br />
* You will need to be the root user for the entire process.<br />
<br />
== Create new RAID array ==<br />
First we need to create a single-disk RAID array using the new disk.<br />
=== Partition the Disk ===<br />
Use fdisk or your partitioning program of choice to setup 2 primary partitions on your new disk. Make the swap partition half the size of the total swap you want (the other half will go on the other disk).<br />
<br />
Drop to single user mode:<br />
telinit 1<br />
<br />
To see the current partitions:<br />
fdisk -l<br />
<br />
To partition the new disk<br />
fdisk /dev/sdb<br />
<br />
Then the fdisk commands to partition the new disk. Note that everything after the "#" is an explanation of what the command is doing:<br />
c # Turn off DOS compatibility (optional).<br />
n # new<br />
p # primary<br />
1 # first partition<br />
1 # start at first cylinder<br />
101 # end cylinder, 0.1% of the disk. Note: update this number as appropriate for your disk.<br />
n # new<br />
p # primary<br />
2 # second partition<br />
press enter # Uses the default start from the end of the first partition<br />
press enter # Uses the default of using all the remain space on the disk.<br />
t # set the partition type<br />
1 # for partition number 1<br />
82 # ... and set it to be swap<br />
t # set the partition type<br />
2 # for partition number 2 ...<br />
fd # ... and set it to be "linux raid auto"<br />
a # Toggle the bootable flag to be "on"<br />
2 # for partition number 2.<br />
p # print what the partition table will look like<br />
w # now write all of the above changes to disk<br />
<br />
At the end of partitioning, your partitions should look something like this:<br />
[root@arch ~]# fdisk -l /dev/sdb<br />
Disk /dev/sdb: 80.0 GB, 80025280000 bytes<br />
255 heads, 63 sectors/track, 9729 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0x00000000<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 1 66 530113+ 82 Linux swap / Solaris<br />
/dev/sdb2 67 9729 77618047+ fd Linux raid autodetect<br />
<br />
Make sure your your partition types are set correctly. {{Codeline|"Linux Swap"}} is type {{Codeline|82}} and {{Codeline|"Linux raid autodetect"}} is type {{Codeline|FD}}.<br />
<br />
=== Create the RAID device ===<br />
Next, create the single-disk RAID-1 array. Note the {{Codeline|"missing"}} keyword is specified as one of our devices. We are going to fill this missing device later.<br />
[root@arch ~]# mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Note: If the above command causes mdadm to say "no such device /dev/sdb2", then reboot, and run the command again.<br />
<br />
If you want to use Grub 0.97 (default in the Arch Linux 2010.05 release) on RAID 1, you need to specify an older version of metadata than the default. Add the option "--metadata=0.90" to the above command. Otherwise Grub will respond with "Filesystem type unknown, partition type 0xfd" and refuse to install. This is supposedly not necessary with Grub 2.<br />
[root@arch ~]# mdadm --create /dev/md0 --metadata=0.90 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Make sure the array has been created correctly by checking {{Filename|/proc/mdstat}}:<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
The devices are intact, however in a degraded state. (Because it's missing half the array!)<br />
<br />
=== Make file systems ===<br />
Use the file system of your preference here. I'll use ext3 for this guide.<br />
[root@arch ~]# mkfs -t ext3 -j -L RAID-ONE /dev/md0<br />
mke2fs 1.38 (30-Jun-2005)<br />
Filesystem label=<br />
OS type: Linux<br />
Block size=4096 (log=2)<br />
Fragment size=4096 (log=2)<br />
10027008 inodes, 20027008 blocks<br />
1001350 blocks (5.00%) reserved for the super user<br />
First data block=0<br />
612 block groups<br />
32768 blocks per group, 32768 fragments per group<br />
16384 inodes per group<br />
Superblock backups stored on blocks:<br />
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br />
4096000, 7962624, 11239424<br />
<br />
Writing inode tables: done<br />
Creating journal (32768 blocks): done<br />
Writing superblocks and filesystem accounting information: done<br />
<br />
This filesystem will be automatically checked every 25 mounts or<br />
180 days, whichever comes first. Use tune2fs -c or -i to override.<br />
<br />
Make a file system on the swap partition:<br />
[root@arch ~]# mkswap -L NEW-SWAP /dev/sdb1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=NEW-SWAP, UUID=9d746813-2d6b-4706-a56a-ecfd108f3fe9<br />
<br />
== Copy data ==<br />
The new RAID-1 array is ready to start accepting data! So now we need to mount the array, and copy everything from the old system to the new system<br />
<br />
=== Mount the array ===<br />
[root@arch ~]# mkdir /mnt/new-raid<br />
[root@arch ~]# mount /dev/md0 /mnt/new-raid<br />
<br />
=== Copy the data ===<br />
[root@arch ~]# rsync -avxHAXS --delete --progress / /mnt/new-raid<br />
<br />
Note that by using the '''-x''' option you are limiting rsync to a single file system. If you have a more traditional file system layout, with different partitions for /boot, /home, and perhaps others, you will need to rsync those file systems separately. For example:<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /boot /mnt/new-raid/boot<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /home /mnt/new-raid/home<br />
<br />
Alternatively, you can use tar instead of the above rsync command if you prefer. rsync will, however, be quicker if you are only copying over changes. The tar command is: <code>tar -C / -clspf - . | tar -xlspvf -</code><br />
<br />
=== Update GRUB ===<br />
Use your preferred text editor to open {{Filename|/mnt/new-raid/boot/grub/menu.lst}}.<br />
<br />
--- SNIP ---<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
## fallback<br />
fallback 1<br />
<br />
# (0) Arch Linux<br />
title Arch Linux - Original Disc<br />
root (hd0,0)<br />
kernel /vmlinuz26 root=/dev/sda1<br />
<br />
# (1) Arch Linux<br />
title Arch Linux - New RAID<br />
root (hd1,0)<br />
#kernel /vmlinuz26 root=/dev/sda1 ro<br />
kernel /vmlinuz26 root=/dev/md0 md=0,/dev/sda2,/dev/sdb2<br />
--- SNIP ---<br />
Notice we added the {{Codeline|fallback}} line and duplicated the Arch Linux entry with a different {{Codeline|root}} directive on the kernel line.<br />
<br />
Also update the "kopt" and "groot" sections, as shown below, if they are in your {{Filename|/mnt/new-raid/boot/grub/menu.lst}} file, because it will make applying distribution kernel updates easier:<br />
- # kopt=root=UUID=fbafab1a-18f5-4bb9-9e66-a71c1b00977e ro<br />
+ # kopt=root=/dev/md0 ro md=0,/dev/sda2,/dev/sdb2<br />
<br />
## default grub root device<br />
## e.g. groot=(hd0,0)<br />
- # groot=(hd0,0)<br />
+ # groot=(hd0,1)<br />
<br />
=== Alter fstab ===<br />
You need to tell fstab on the '''new''' disk where to find the new devices. It's better to use UUID codes here, which should not change, even if our partition detection order changes or a drive gets removed.<br />
<br />
To find the UUID to use:<br />
[root@arch ~]# blkid<br />
/dev/sda1: TYPE="swap" UUID="34656682b-34ad-8ed5-9233-dfab42272212" <br />
/dev/sdb1: UUID="9ff5682b-d5a1-4ed5-8d63-d1df911e0142" TYPE="swap" LABEL="NEW-SWAP" <br />
/dev/md0: UUID="6f2ea3d3-d7be-4c9d-adfa-dbeeedaf128e" SEC_TYPE="ext2" TYPE="ext3" LABEL="RAID-ONE" <br />
/dev/sda2: UUID="13dd2227-6592-403b-931a-7f3e14a23e1f" TYPE="ext2" <br />
/dev/sdb2: UUID="b28813e7-15fc-d4aa-dc8a-e2c1de641df1" TYPE="mdraid" <br />
<br />
Look for the partition labeled "NEW-SWAP", on /dev/sdb1, that we created above. Copy your swap partition's UUID into the new fstab, as shown below. Of course we also add /dev/md0, as our root mount point.<br />
<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<!-- /dev/sdb1 swap swap defaults 0 0 --><br />
<br />
=== Rebuild initcpio or initramfs ===<br />
[root@arch ~]# mount --bind /sys /mnt/new-raid/sys<br />
[root@arch ~]# mount --bind /proc /mnt/new-raid/proc<br />
[root@arch ~]# mount --bind /dev /mnt/new-raid/dev<br />
[root@arch ~]# chroot /mnt/new-raid/<br />
[root /]# <br />
<br />
If the chroot command gives you an error like <code>chroot: failed to run command `/bin/zsh': No such file or directory</code>, then use <code>chroot /mnt/new-raid/ /bin/bash</code> instead.<br />
<br />
You are now chrooted in what will become the root of your RAID-1 system. Complete the appropriate section below for your distribution (almost every other step is identical, regardless of the Linux variant).<br />
<br />
==== Config mdadm.conf ====<br />
<br />
For Arch Linux, use "/etc/mdadm.conf", for Ubuntu or Debian, use "/etc/mdadm/mdadm.conf"<br />
nano /etc/mdadm.conf<br />
... and change the "MAILADDR" line to be your email address, if you want emailed alerts of problems with the RAID-1.<br />
<br />
Then save the array configuration with UUIDs to make it easier for the system to find /dev/md0 on boot-up. If you don't do this, you can get an "ALERT! /dev/md0 does not exist" error when booting :<br />
mdadm --detail --scan >> /etc/mdadm.conf <br />
<br />
==== For Arch Linux: Rebuild initcpio ====<br />
<br />
Edit {{Filename|/etc/mkinitcpio.conf}} to include {{Codeline|mdadm}} in the HOOKS array. Place it after {{Codeline|autodetect}}, {{Codeline|sata}}, {{Codeline|scsi}} and {{Codeline|pata}} (whichever is appropriate for your hardware).<br />
[root /]# mkinitcpio -g /boot/kernel26.img<br />
[root /]# exit<br />
<br />
==== For Ubuntu or Debian: Rebuild initramfs ====<br />
<br />
Then rebuild initramfs, incorporating the two above changes:<br />
update-initramfs -k `uname -r` -c -t<br />
<br />
This will rebuild your running version - to rebuild others, this will show a listing (in Ubuntu):<br />
ls /boot/ | perl -lne "/^[A-z\.\-]+/m && print $'" | egrep -e 'openvz$|generic$|server$' | sort -u<br />
Then substitute/script in these others so that all are available for use with the new RAID setup.<br />
<br />
=== Install GRUB on the RAID array ===<br />
Start grub:<br />
<br />
[root@arch ~]# grub --no-floppy<br />
<br />
Then we find our two partitions - the current one (hd0,0) (I.e. first disk, first partition), and (hd1,1) (i.e. the partition we just added above, on the second partition of the second drive). Check you get two results here:<br />
<br />
grub> find /boot/grub/stage1<br />
(hd0,0)<br />
(hd1,1)<br />
<br />
Then we tell grub to assume the new second drive is (hd0), i.e. the first disk in the system (when it is not currently the case). If your first disk fails, however, and you remove it, or you change the order disks are detected in the BIOS so that you can boot from your second disk, then your second disk will become the first disk in the system. The MBR will then be correct, your new second drive will have become your first drive, and you will be able to boot from this disk.<br />
<br />
grub> device (hd0) /dev/sdb<br />
<br />
Then we install GRUB onto the MBR of our new second drive. Check that the "partition type" is detected as "0xfd", as shown below, to make sure you have the right partition:<br />
<br />
grub> root (hd0,1)<br />
Filesystem type is ext2fs, partition type 0xfd<br />
grub> setup (hd0)<br />
Checking if "/boot/grub/stage1" exists... yes<br />
Checking if "/boot/grub/stage2" exists... yes<br />
Checking if "/boot/grub/e2fs_stage1_5" exists... yes<br />
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded<br />
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,1)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded<br />
Done<br />
grub> quit<br />
<br />
== Verify success ==<br />
Reboot your computer, making sure it boots from the new RAID disk ({{Filename|/dev/sdb}}) and not the original disk ({{Filename|/dev/sda}}). You may need to change the boot device priorities in your BIOS to do this.<br />
<br />
Once the GRUB on the '''new''' disk loads, make sure you select to boot the new entry you created in {{Filename|menu.lst}} earlier.<br />
<br />
Verify you have booted from the RAID array by looking at the output of mount. Also check mdstat again only to confirm which disk is in the array.<br />
[root@arch ~]# mount<br />
/dev/md0 on / type ext3 (rw)<br />
<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
<br />
Also {{Codeline|swapon -s}}:<br />
[root@arch ~]# swapon -s<br />
Filename Type Size Used Priority<br />
/dev/sdb1 partition 4000144 16 -1<br />
Note it is the swap partition on {{Filename|sdb}} that is in use, nothing from {{Filename|sda}}.<br />
<br />
If system boots fine, and the output of the above commands is correct, then congratulations! You're now running off the degraded RAID array. We can add the original disk to the array now to bring it up to full performance.<br />
<br />
== Add original disk to array ==<br />
<br />
=== Partition original disk ===<br />
<br />
Copy the partition table from /dev/sdb (newly implemented RAID disk) to /dev/sda (second disk we are adding to the array) so that both disks have exactly the same layout.<br />
[root@arch ~]# sfdisk -d /dev/sdb | sfdisk /dev/sda<br />
<br />
Alternate method - this will output the /dev/sdb partition layout to a file, then it's used as input for partitioning /dev/sda.<br />
[root@arch ~]# sfdisk -d /dev/sdb > raidinfo-partitions.sdb<br />
[root@arch ~]# sfdisk /dev/sda < raidinfo-partitions.sdb<br />
Use the --force if needed.<br />
[root@arch ~]# sfdisk --force /dev/sda < raidinfo-partitions.sdb<br />
<br />
Verify that the partitioning is identical:<br />
[root@arch ~]# fdisk -l<br />
<br />
==== Note ====<br />
If you get an error when attempting to add the parition to the array: <br />
mdadm: /dev/sda1 not large enough to join array<br />
You might have seen an earlier warning message when partitioning this disk that the kernel<br />
still sees the old disk size - a reboot ought to fix this, then try adding again to the array.<br />
<br />
=== Add disk partition to array ===<br />
[root@arch ~]# mdadm /dev/md0 -a /dev/sda2<br />
mdadm: hot added /dev/sda2<br />
<br />
Verify that the RAID array is being rebuilt.<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sda2[2] sdb2[1]<br />
80108032 blocks [2/1] [_U]<br />
[>....................] recovery = 1.2% (1002176/80108032) finish=42.0min speed=31318K/sec<br />
<br />
unused devices: <none><br />
<br />
=== Add second swap partition ===<br />
The partition was created with sfdisk, but it still has to be formatted for swap.<br />
[root@arch ~]# mkswap -L SWAP /dev/sda1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=SWAP, UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9<br />
<br />
Then add this UUID to the fstab exactly like the other one earlier. When done, it should look similar to this:<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9 none swap sw 0 0<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<br />
It can be activated immediately:<br />
[root@arch ~]# swapon /dev/sda1<br />
<br />
=== Verify that email alerts are working ===<br />
<br />
If you run this command, then you should get a notification email showing the contents of /proc/mdstat :<br />
[root@arch ~]# mdadm --monitor --test --oneshot /dev/md0<br />
Check that you get the test email notification. This way you can be aware if one of the disks in the array fails (otherwise it may fail silently, putting you at risk of data loss if another drive should also fail). If you don't get an email notification, check the "MAILADDR" line in mdadm.conf, and also check that sending an email to this address from the command line (e.g. using the "mail" command) works.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Convert_a_single_drive_system_to_RAID&diff=116560
Convert a single drive system to RAID
2010-09-07T13:50:26Z
<p>Zatricky: /* For Arch Linux: Rebuild initcpio */</p>
<hr />
<div>[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
You already have a fully functional system setup on a single drive, but you would like to add some redundancy to the setup by using RAID-1 to mirror your data across 2 drives. This guide follows the following steps to make the required changes, without losing data.<br />
* Create a single-disk RAID-1 array with our new disk<br />
* Move all your data from the old-disk to the new RAID-1 array<br />
* Verify the data move was successful<br />
* Wipe the old disk and add it to the new RAID-1 array<br />
<br />
{{Warning | Make a backup first. Even though our aim is to convert to a RAID setup without losing data, there's no guarantees the process will be perfect, and there is a high risk of accidents happening.}}<br />
<br />
<br />
== Assumptions ==<br />
* I will assume for the sake of the guide that the disk currently in your system is {{Filename|/dev/sda}} and your new disk is {{Filename|/dev/sdb}}.<br />
* We will create the following configuration:<br />
** 1 x RAID-1 array for the file-system (using 2 x partitions, 1 on each disk)<br />
** 2 x Swap Partitions using 1 partition on each disk.<br />
The swap partitions will not be in a RAID array as having swap on RAID serves no purpose. Refer to [http://unthought.net/Software-RAID.HOWTO/Software-RAID.HOWTO-2.html#ss2.3 this article] for reasons why.<br />
<br />
* To minimize the risk of Data on Disk (DoD) changing in the middle of our changes, I suggest you drop to single user mode before you start by using the {{Codeline|telinit 1}} command.<br />
<br />
* You will need to be the root user for the entire process.<br />
<br />
== Create new RAID array ==<br />
First we need to create a single-disk RAID array using the new disk.<br />
=== Partition the Disk ===<br />
Use fdisk or your partitioning program of choice to setup 2 primary partitions on your new disk. Make the swap partition half the size of the total swap you want (the other half will go on the other disk).<br />
<br />
Drop to single user mode:<br />
telinit 1<br />
<br />
To see the current partitions:<br />
fdisk -l<br />
<br />
To partition the new disk<br />
fdisk /dev/sdb<br />
<br />
Then the fdisk commands to partition the new disk. Note that everything after the "#" is an explanation of what the command is doing:<br />
c # Turn off DOS compatibility (optional).<br />
n # new<br />
p # primary<br />
1 # first partition<br />
1 # start at first cylinder<br />
101 # end cylinder, 0.1% of the disk. Note: update this number as appropriate for your disk.<br />
n # new<br />
p # primary<br />
2 # second partition<br />
press enter # Uses the default start from the end of the first partition<br />
press enter # Uses the default of using all the remain space on the disk.<br />
t # set the partition type<br />
1 # for partition number 1<br />
82 # ... and set it to be swap<br />
t # set the partition type<br />
2 # for partition number 2 ...<br />
fd # ... and set it to be "linux raid auto"<br />
a # Toggle the bootable flag to be "on"<br />
2 # for partition number 2.<br />
p # print what the partition table will look like<br />
w # now write all of the above changes to disk<br />
<br />
At the end of partitioning, your partitions should look something like this:<br />
[root@arch ~]# fdisk -l /dev/sdb<br />
Disk /dev/sdb: 80.0 GB, 80025280000 bytes<br />
255 heads, 63 sectors/track, 9729 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0x00000000<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 1 66 530113+ 82 Linux swap / Solaris<br />
/dev/sdb2 67 9729 77618047+ fd Linux raid autodetect<br />
<br />
Make sure your your partition types are set correctly. {{Codeline|"Linux Swap"}} is type {{Codeline|82}} and {{Codeline|"Linux raid autodetect"}} is type {{Codeline|FD}}.<br />
<br />
=== Create the RAID device ===<br />
Next, create the single-disk RAID-1 array. Note the {{Codeline|"missing"}} keyword is specified as one of our devices. We are going to fill this missing device later.<br />
[root@arch ~]# mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Note: If the above command causes mdadm to say "no such device /dev/sdb2", then reboot, and run the command again.<br />
<br />
If you want to use Grub 0.97 (default in the Arch Linux 2010.05 release) on RAID 1, you need to specify an older version of metadata than the default. Add the option "--metadata=0.90" to the above command. Otherwise Grub will respond with "Filesystem type unknown, partition type 0xfd" and refuse to install. This is supposedly not necessary with Grub 2.<br />
[root@arch ~]# mdadm --create /dev/md0 --metadata=0.90 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Make sure the array has been created correctly by checking {{Filename|/proc/mdstat}}:<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
The devices are intact, however in a degraded state. (Because it's missing half the array!)<br />
<br />
=== Make file systems ===<br />
Use the file system of your preference here. I'll use ext3 for this guide.<br />
[root@arch ~]# mkfs -t ext3 -j -L RAID-ONE /dev/md0<br />
mke2fs 1.38 (30-Jun-2005)<br />
Filesystem label=<br />
OS type: Linux<br />
Block size=4096 (log=2)<br />
Fragment size=4096 (log=2)<br />
10027008 inodes, 20027008 blocks<br />
1001350 blocks (5.00%) reserved for the super user<br />
First data block=0<br />
612 block groups<br />
32768 blocks per group, 32768 fragments per group<br />
16384 inodes per group<br />
Superblock backups stored on blocks:<br />
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br />
4096000, 7962624, 11239424<br />
<br />
Writing inode tables: done<br />
Creating journal (32768 blocks): done<br />
Writing superblocks and filesystem accounting information: done<br />
<br />
This filesystem will be automatically checked every 25 mounts or<br />
180 days, whichever comes first. Use tune2fs -c or -i to override.<br />
<br />
Make a file system on the swap partition:<br />
[root@arch ~]# mkswap -L NEW-SWAP /dev/sdb1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=NEW-SWAP, UUID=9d746813-2d6b-4706-a56a-ecfd108f3fe9<br />
<br />
== Copy data ==<br />
The new RAID-1 array is ready to start accepting data! So now we need to mount the array, and copy everything from the old system to the new system<br />
<br />
=== Mount the array ===<br />
[root@arch ~]# mkdir /mnt/new-raid<br />
[root@arch ~]# mount /dev/md0 /mnt/new-raid<br />
<br />
=== Copy the data ===<br />
[root@arch ~]# rsync -avxHAXS --delete --progress / /mnt/new-raid<br />
<br />
Note that by using the '''-x''' option you are limiting rsync to a single file system. If you have a more traditional file system layout, with different partitions for /boot, /home, and perhaps others, you will need to rsync those file systems separately. For example:<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /boot /mnt/new-raid/boot<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /home /mnt/new-raid/home<br />
<br />
Alternatively, you can use tar instead of the above rsync command if you prefer. rsync will, however, be quicker if you are only copying over changes. The tar command is: <code>tar -C / -clspf - . | tar -xlspvf -</code><br />
<br />
=== Update GRUB ===<br />
Use your preferred text editor to open {{Filename|/mnt/new-raid/boot/grub/menu.lst}}.<br />
<br />
--- SNIP ---<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
## fallback<br />
fallback 1<br />
<br />
# (0) Arch Linux<br />
title Arch Linux - Original Disc<br />
root (hd0,0)<br />
kernel /vmlinuz26 root=/dev/sda1<br />
<br />
# (1) Arch Linux<br />
title Arch Linux - New RAID<br />
root (hd1,0)<br />
#kernel /vmlinuz26 root=/dev/sda1 ro<br />
kernel /vmlinuz26 root=/dev/md0 md=0,/dev/sda2,/dev/sdb2<br />
--- SNIP ---<br />
Notice we added the {{Codeline|fallback}} line and duplicated the Arch Linux entry with a different {{Codeline|root}} directive on the kernel line.<br />
<br />
Also update the "kopt" and "groot" sections, as shown below, if they are in your {{Filename|/mnt/new-raid/boot/grub/menu.lst}} file, because it will make applying distribution kernel updates easier:<br />
- # kopt=root=UUID=fbafab1a-18f5-4bb9-9e66-a71c1b00977e ro<br />
+ # kopt=root=/dev/md0 ro md=0,/dev/sda2,/dev/sdb2<br />
<br />
## default grub root device<br />
## e.g. groot=(hd0,0)<br />
- # groot=(hd0,0)<br />
+ # groot=(hd0,1)<br />
<br />
=== Alter fstab ===<br />
You need to tell fstab on the '''new''' disk where to find the new devices. It's better to use UUID codes here, which should not change, even if our partition detection order changes or a drive gets removed.<br />
<br />
To find the UUID to use:<br />
[root@arch ~]# blkid<br />
/dev/sda1: TYPE="swap" UUID="34656682b-34ad-8ed5-9233-dfab42272212" <br />
/dev/sdb1: UUID="9ff5682b-d5a1-4ed5-8d63-d1df911e0142" TYPE="swap" LABEL="NEW-SWAP" <br />
/dev/md0: UUID="6f2ea3d3-d7be-4c9d-adfa-dbeeedaf128e" SEC_TYPE="ext2" TYPE="ext3" LABEL="RAID-ONE" <br />
/dev/sda2: UUID="13dd2227-6592-403b-931a-7f3e14a23e1f" TYPE="ext2" <br />
/dev/sdb2: UUID="b28813e7-15fc-d4aa-dc8a-e2c1de641df1" TYPE="mdraid" <br />
<br />
Look for the partition labeled "NEW-SWAP", on /dev/sdb1, that we created above. Copy your swap partition's UUID into the new fstab, as shown below. Of course we also add /dev/md0, as our root mount point.<br />
<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<!-- /dev/sdb1 swap swap defaults 0 0 --><br />
<br />
=== Rebuild initcpio or initramfs ===<br />
[root@arch ~]# mount --bind /sys /mnt/new-raid/sys<br />
[root@arch ~]# mount --bind /proc /mnt/new-raid/proc<br />
[root@arch ~]# mount --bind /dev /mnt/new-raid/dev<br />
[root@arch ~]# chroot /mnt/new-raid/<br />
[root /]# <br />
<br />
If the chroot command gives you an error like <code>chroot: failed to run command `/bin/zsh': No such file or directory</code>, then use <code>chroot /mnt/new-raid/ /bin/bash</code> instead.<br />
<br />
You are now chrooted in what will become the root of your RAID-1 system. Complete the appropriate section below for your distribution (almost every other step is identical, regardless of the Linux variant).<br />
<br />
==== Config mdadm.conf ====<br />
<br />
For Arch Linux, use "/etc/mdadm.conf", for Ubuntu or Debian, use "/etc/mdadm/mdadm.conf"<br />
nano /etc/mdadm.conf<br />
... and change the "MAILADDR" line to be your email address, if you want emailed alerts of problems with the RAID-1.<br />
<br />
Then save the array configuration with UUIDs to make it easier for the system to find /dev/md0 on boot-up. If you don't do this, you can get an "ALERT! /dev/md0 does not exist" error when booting :<br />
mdadm --detail --scan >> /etc/mdadm.conf <br />
<br />
==== For Arch Linux: Rebuild initcpio ====<br />
<br />
Edit {{Filename|/etc/mkinitcpio.conf}} to include {{Codeline|mdadm}} in the HOOKS array. Place it after {{Codeline|autodetect}}, {{Codeline|sata}}, {{Codeline|scsi}} and {{Codeline|pata}} (whichever is appropriate for your hardware).<br />
[root /]# mkinitcpio -g /boot/kernel26.img<br />
[root /]# exit<br />
<br />
==== For Ubuntu or Debian: Rebuild initramfs ====<br />
<br />
nano /etc/mdadm/mdadm.conf<br />
... and change the "MAILADDR" line to be your email address, if you want emailed alerts of problems with the RAID-1.<br />
<br />
Then save the array configuration with UUIDs to make it easier for the system to find /dev/md0 on boot-up. If you don't do this, you can get an "ALERT! /dev/md0 does not exist" error when booting :<br />
mdadm --detail --scan >> /etc/mdadm/mdadm.conf <br />
<br />
Then rebuild initramfs, incorporating the two above changes:<br />
update-initramfs -k `uname -r` -c -t<br />
<br />
This will rebuild your running version - to rebuild others, this will show a listing (in Ubuntu):<br />
ls /boot/ | perl -lne "/^[A-z\.\-]+/m && print $'" | egrep -e 'openvz$|generic$|server$' | sort -u<br />
Then substitute/script in these others so that all are available for use with the new RAID setup.<br />
<br />
=== Install GRUB on the RAID array ===<br />
Start grub:<br />
<br />
[root@arch ~]# grub --no-floppy<br />
<br />
Then we find our two partitions - the current one (hd0,0) (I.e. first disk, first partition), and (hd1,1) (i.e. the partition we just added above, on the second partition of the second drive). Check you get two results here:<br />
<br />
grub> find /boot/grub/stage1<br />
(hd0,0)<br />
(hd1,1)<br />
<br />
Then we tell grub to assume the new second drive is (hd0), i.e. the first disk in the system (when it is not currently the case). If your first disk fails, however, and you remove it, or you change the order disks are detected in the BIOS so that you can boot from your second disk, then your second disk will become the first disk in the system. The MBR will then be correct, your new second drive will have become your first drive, and you will be able to boot from this disk.<br />
<br />
grub> device (hd0) /dev/sdb<br />
<br />
Then we install GRUB onto the MBR of our new second drive. Check that the "partition type" is detected as "0xfd", as shown below, to make sure you have the right partition:<br />
<br />
grub> root (hd0,1)<br />
Filesystem type is ext2fs, partition type 0xfd<br />
grub> setup (hd0)<br />
Checking if "/boot/grub/stage1" exists... yes<br />
Checking if "/boot/grub/stage2" exists... yes<br />
Checking if "/boot/grub/e2fs_stage1_5" exists... yes<br />
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded<br />
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,1)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded<br />
Done<br />
grub> quit<br />
<br />
== Verify success ==<br />
Reboot your computer, making sure it boots from the new RAID disk ({{Filename|/dev/sdb}}) and not the original disk ({{Filename|/dev/sda}}). You may need to change the boot device priorities in your BIOS to do this.<br />
<br />
Once the GRUB on the '''new''' disk loads, make sure you select to boot the new entry you created in {{Filename|menu.lst}} earlier.<br />
<br />
Verify you have booted from the RAID array by looking at the output of mount. Also check mdstat again only to confirm which disk is in the array.<br />
[root@arch ~]# mount<br />
/dev/md0 on / type ext3 (rw)<br />
<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
<br />
Also {{Codeline|swapon -s}}:<br />
[root@arch ~]# swapon -s<br />
Filename Type Size Used Priority<br />
/dev/sdb1 partition 4000144 16 -1<br />
Note it is the swap partition on {{Filename|sdb}} that is in use, nothing from {{Filename|sda}}.<br />
<br />
If system boots fine, and the output of the above commands is correct, then congratulations! You're now running off the degraded RAID array. We can add the original disk to the array now to bring it up to full performance.<br />
<br />
== Add original disk to array ==<br />
<br />
=== Partition original disk ===<br />
<br />
Copy the partition table from /dev/sdb (newly implemented RAID disk) to /dev/sda (second disk we are adding to the array) so that both disks have exactly the same layout.<br />
[root@arch ~]# sfdisk -d /dev/sdb | sfdisk /dev/sda<br />
<br />
Alternate method - this will output the /dev/sdb partition layout to a file, then it's used as input for partitioning /dev/sda.<br />
[root@arch ~]# sfdisk -d /dev/sdb > raidinfo-partitions.sdb<br />
[root@arch ~]# sfdisk /dev/sda < raidinfo-partitions.sdb<br />
Use the --force if needed.<br />
[root@arch ~]# sfdisk --force /dev/sda < raidinfo-partitions.sdb<br />
<br />
Verify that the partitioning is identical:<br />
[root@arch ~]# fdisk -l<br />
<br />
==== Note ====<br />
If you get an error when attempting to add the parition to the array: <br />
mdadm: /dev/sda1 not large enough to join array<br />
You might have seen an earlier warning message when partitioning this disk that the kernel<br />
still sees the old disk size - a reboot ought to fix this, then try adding again to the array.<br />
<br />
=== Add disk partition to array ===<br />
[root@arch ~]# mdadm /dev/md0 -a /dev/sda2<br />
mdadm: hot added /dev/sda2<br />
<br />
Verify that the RAID array is being rebuilt.<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sda2[2] sdb2[1]<br />
80108032 blocks [2/1] [_U]<br />
[>....................] recovery = 1.2% (1002176/80108032) finish=42.0min speed=31318K/sec<br />
<br />
unused devices: <none><br />
<br />
=== Add second swap partition ===<br />
The partition was created with sfdisk, but it still has to be formatted for swap.<br />
[root@arch ~]# mkswap -L SWAP /dev/sda1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=SWAP, UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9<br />
<br />
Then add this UUID to the fstab exactly like the other one earlier. When done, it should look similar to this:<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9 none swap sw 0 0<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<br />
It can be activated immediately:<br />
[root@arch ~]# swapon /dev/sda1<br />
<br />
=== Verify that email alerts are working ===<br />
<br />
If you run this command, then you should get a notification email showing the contents of /proc/mdstat :<br />
[root@arch ~]# mdadm --monitor --test --oneshot /dev/md0<br />
Check that you get the test email notification. This way you can be aware if one of the disks in the array fails (otherwise it may fail silently, putting you at risk of data loss if another drive should also fail). If you don't get an email notification, check the "MAILADDR" line in mdadm.conf, and also check that sending an email to this address from the command line (e.g. using the "mail" command) works.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Convert_a_single_drive_system_to_RAID&diff=116558
Convert a single drive system to RAID
2010-09-07T11:21:04Z
<p>Zatricky: /* Create the RAID device */</p>
<hr />
<div>[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
You already have a fully functional system setup on a single drive, but you would like to add some redundancy to the setup by using RAID-1 to mirror your data across 2 drives. This guide follows the following steps to make the required changes, without losing data.<br />
* Create a single-disk RAID-1 array with our new disk<br />
* Move all your data from the old-disk to the new RAID-1 array<br />
* Verify the data move was successful<br />
* Wipe the old disk and add it to the new RAID-1 array<br />
<br />
{{Warning | Make a backup first. Even though our aim is to convert to a RAID setup without losing data, there's no guarantees the process will be perfect, and there is a high risk of accidents happening.}}<br />
<br />
<br />
== Assumptions ==<br />
* I will assume for the sake of the guide that the disk currently in your system is {{Filename|/dev/sda}} and your new disk is {{Filename|/dev/sdb}}.<br />
* We will create the following configuration:<br />
** 1 x RAID-1 array for the file-system (using 2 x partitions, 1 on each disk)<br />
** 2 x Swap Partitions using 1 partition on each disk.<br />
The swap partitions will not be in a RAID array as having swap on RAID serves no purpose. Refer to [http://unthought.net/Software-RAID.HOWTO/Software-RAID.HOWTO-2.html#ss2.3 this article] for reasons why.<br />
<br />
* To minimize the risk of Data on Disk (DoD) changing in the middle of our changes, I suggest you drop to single user mode before you start by using the {{Codeline|telinit 1}} command.<br />
<br />
* You will need to be the root user for the entire process.<br />
<br />
== Create new RAID array ==<br />
First we need to create a single-disk RAID array using the new disk.<br />
=== Partition the Disk ===<br />
Use fdisk or your partitioning program of choice to setup 2 primary partitions on your new disk. Make the swap partition half the size of the total swap you want (the other half will go on the other disk).<br />
<br />
Drop to single user mode:<br />
telinit 1<br />
<br />
To see the current partitions:<br />
fdisk -l<br />
<br />
To partition the new disk<br />
fdisk /dev/sdb<br />
<br />
Then the fdisk commands to partition the new disk. Note that everything after the "#" is an explanation of what the command is doing:<br />
c # Turn off DOS compatibility (optional).<br />
n # new<br />
p # primary<br />
1 # first partition<br />
1 # start at first cylinder<br />
101 # end cylinder, 0.1% of the disk. Note: update this number as appropriate for your disk.<br />
n # new<br />
p # primary<br />
2 # second partition<br />
press enter # Uses the default start from the end of the first partition<br />
press enter # Uses the default of using all the remain space on the disk.<br />
t # set the partition type<br />
1 # for partition number 1<br />
82 # ... and set it to be swap<br />
t # set the partition type<br />
2 # for partition number 2 ...<br />
fd # ... and set it to be "linux raid auto"<br />
a # Toggle the bootable flag to be "on"<br />
2 # for partition number 2.<br />
p # print what the partition table will look like<br />
w # now write all of the above changes to disk<br />
<br />
At the end of partitioning, your partitions should look something like this:<br />
[root@arch ~]# fdisk -l /dev/sdb<br />
Disk /dev/sdb: 80.0 GB, 80025280000 bytes<br />
255 heads, 63 sectors/track, 9729 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0x00000000<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 1 66 530113+ 82 Linux swap / Solaris<br />
/dev/sdb2 67 9729 77618047+ fd Linux raid autodetect<br />
<br />
Make sure your your partition types are set correctly. {{Codeline|"Linux Swap"}} is type {{Codeline|82}} and {{Codeline|"Linux raid autodetect"}} is type {{Codeline|FD}}.<br />
<br />
=== Create the RAID device ===<br />
Next, create the single-disk RAID-1 array. Note the {{Codeline|"missing"}} keyword is specified as one of our devices. We are going to fill this missing device later.<br />
[root@arch ~]# mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Note: If the above command causes mdadm to say "no such device /dev/sdb2", then reboot, and run the command again.<br />
<br />
If you want to use Grub 0.97 (default in the Arch Linux 2010.05 release) on RAID 1, you need to specify an older version of metadata than the default. Add the option "--metadata=0.90" to the above command. Otherwise Grub will respond with "Filesystem type unknown, partition type 0xfd" and refuse to install. This is supposedly not necessary with Grub 2.<br />
[root@arch ~]# mdadm --create /dev/md0 --metadata=0.90 --level=1 --raid-devices=2 missing /dev/sdb2<br />
mdadm: array /dev/md0 started.<br />
<br />
Make sure the array has been created correctly by checking {{Filename|/proc/mdstat}}:<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
The devices are intact, however in a degraded state. (Because it's missing half the array!)<br />
<br />
=== Make file systems ===<br />
Use the file system of your preference here. I'll use ext3 for this guide.<br />
[root@arch ~]# mkfs -t ext3 -j -L RAID-ONE /dev/md0<br />
mke2fs 1.38 (30-Jun-2005)<br />
Filesystem label=<br />
OS type: Linux<br />
Block size=4096 (log=2)<br />
Fragment size=4096 (log=2)<br />
10027008 inodes, 20027008 blocks<br />
1001350 blocks (5.00%) reserved for the super user<br />
First data block=0<br />
612 block groups<br />
32768 blocks per group, 32768 fragments per group<br />
16384 inodes per group<br />
Superblock backups stored on blocks:<br />
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br />
4096000, 7962624, 11239424<br />
<br />
Writing inode tables: done<br />
Creating journal (32768 blocks): done<br />
Writing superblocks and filesystem accounting information: done<br />
<br />
This filesystem will be automatically checked every 25 mounts or<br />
180 days, whichever comes first. Use tune2fs -c or -i to override.<br />
<br />
Make a file system on the swap partition:<br />
[root@arch ~]# mkswap -L NEW-SWAP /dev/sdb1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=NEW-SWAP, UUID=9d746813-2d6b-4706-a56a-ecfd108f3fe9<br />
<br />
== Copy data ==<br />
The new RAID-1 array is ready to start accepting data! So now we need to mount the array, and copy everything from the old system to the new system<br />
<br />
=== Mount the array ===<br />
[root@arch ~]# mkdir /mnt/new-raid<br />
[root@arch ~]# mount /dev/md0 /mnt/new-raid<br />
<br />
=== Copy the data ===<br />
[root@arch ~]# rsync -avxHAXS --delete --progress / /mnt/new-raid<br />
<br />
Note that by using the '''-x''' option you are limiting rsync to a single file system. If you have a more traditional file system layout, with different partitions for /boot, /home, and perhaps others, you will need to rsync those file systems separately. For example:<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /boot /mnt/new-raid/boot<br />
[root@arch ~]# rsync -avxHAXS --delete --progress /home /mnt/new-raid/home<br />
<br />
Alternatively, you can use tar instead of the above rsync command if you prefer. rsync will, however, be quicker if you are only copying over changes. The tar command is: <code>tar -C / -clspf - . | tar -xlspvf -</code><br />
<br />
=== Update GRUB ===<br />
Use your preferred text editor to open {{Filename|/mnt/new-raid/boot/grub/menu.lst}}.<br />
<br />
--- SNIP ---<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
## fallback<br />
fallback 1<br />
<br />
# (0) Arch Linux<br />
title Arch Linux - Original Disc<br />
root (hd0,0)<br />
kernel /vmlinuz26 root=/dev/sda1<br />
<br />
# (1) Arch Linux<br />
title Arch Linux - New RAID<br />
root (hd1,0)<br />
#kernel /vmlinuz26 root=/dev/sda1 ro<br />
kernel /vmlinuz26 root=/dev/md0 md=0,/dev/sda2,/dev/sdb2<br />
--- SNIP ---<br />
Notice we added the {{Codeline|fallback}} line and duplicated the Arch Linux entry with a different {{Codeline|root}} directive on the kernel line.<br />
<br />
Also update the "kopt" and "groot" sections, as shown below, if they are in your {{Filename|/mnt/new-raid/boot/grub/menu.lst}} file, because it will make applying distribution kernel updates easier:<br />
- # kopt=root=UUID=fbafab1a-18f5-4bb9-9e66-a71c1b00977e ro<br />
+ # kopt=root=/dev/md0 ro md=0,/dev/sda2,/dev/sdb2<br />
<br />
## default grub root device<br />
## e.g. groot=(hd0,0)<br />
- # groot=(hd0,0)<br />
+ # groot=(hd0,1)<br />
<br />
=== Alter fstab ===<br />
You need to tell fstab on the '''new''' disk where to find the new devices. It's better to use UUID codes here, which should not change, even if our partition detection order changes or a drive gets removed.<br />
<br />
To find the UUID to use:<br />
[root@arch ~]# blkid<br />
/dev/sda1: TYPE="swap" UUID="34656682b-34ad-8ed5-9233-dfab42272212" <br />
/dev/sdb1: UUID="9ff5682b-d5a1-4ed5-8d63-d1df911e0142" TYPE="swap" LABEL="NEW-SWAP" <br />
/dev/md0: UUID="6f2ea3d3-d7be-4c9d-adfa-dbeeedaf128e" SEC_TYPE="ext2" TYPE="ext3" LABEL="RAID-ONE" <br />
/dev/sda2: UUID="13dd2227-6592-403b-931a-7f3e14a23e1f" TYPE="ext2" <br />
/dev/sdb2: UUID="b28813e7-15fc-d4aa-dc8a-e2c1de641df1" TYPE="mdraid" <br />
<br />
Look for the partition labeled "NEW-SWAP", on /dev/sdb1, that we created above. Copy your swap partition's UUID into the new fstab, as shown below. Of course we also add /dev/md0, as our root mount point.<br />
<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<!-- /dev/sdb1 swap swap defaults 0 0 --><br />
<br />
=== Rebuild initcpio or initramfs ===<br />
[root@arch ~]# mount --bind /sys /mnt/new-raid/sys<br />
[root@arch ~]# mount --bind /proc /mnt/new-raid/proc<br />
[root@arch ~]# mount --bind /dev /mnt/new-raid/dev<br />
[root@arch ~]# chroot /mnt/new-raid/<br />
[root /]# <br />
<br />
If the chroot command gives you an error like <code>chroot: failed to run command `/bin/zsh': No such file or directory</code>, then use <code>chroot /mnt/new-raid/ /bin/bash</code> instead.<br />
<br />
You are now chrooted in what will become the root of your RAID-1 system. Complete the appropriate section below for your distribution (almost every other step is identical, regardless of the Linux variant).<br />
<br />
==== For Arch Linux: Rebuild initcpio ====<br />
<br />
Edit {{Filename|/etc/mkinitcpio.conf}} to include {{Codeline|mdadm}} in the HOOKS array. Place it after {{Codeline|autodetect}}, {{Codeline|sata}}, {{Codeline|scsi}} and {{Codeline|pata}} (whichever is appropriate for your hardware).<br />
[root /]# mkinitcpio -g /boot/kernel26.img<br />
[root /]# exit<br />
<br />
==== For Ubuntu or Debian: Rebuild initramfs ====<br />
<br />
nano /etc/mdadm/mdadm.conf<br />
... and change the "MAILADDR" line to be your email address, if you want emailed alerts of problems with the RAID-1.<br />
<br />
Then save the array configuration with UUIDs to make it easier for the system to find /dev/md0 on boot-up. If you don't do this, you can get an "ALERT! /dev/md0 does not exist" error when booting :<br />
mdadm --detail --scan >> /etc/mdadm/mdadm.conf <br />
<br />
Then rebuild initramfs, incorporating the two above changes:<br />
update-initramfs -k `uname -r` -c -t<br />
<br />
This will rebuild your running version - to rebuild others, this will show a listing (in Ubuntu):<br />
ls /boot/ | perl -lne "/^[A-z\.\-]+/m && print $'" | egrep -e 'openvz$|generic$|server$' | sort -u<br />
Then substitute/script in these others so that all are available for use with the new RAID setup.<br />
<br />
=== Install GRUB on the RAID array ===<br />
Start grub:<br />
<br />
[root@arch ~]# grub --no-floppy<br />
<br />
Then we find our two partitions - the current one (hd0,0) (I.e. first disk, first partition), and (hd1,1) (i.e. the partition we just added above, on the second partition of the second drive). Check you get two results here:<br />
<br />
grub> find /boot/grub/stage1<br />
(hd0,0)<br />
(hd1,1)<br />
<br />
Then we tell grub to assume the new second drive is (hd0), i.e. the first disk in the system (when it is not currently the case). If your first disk fails, however, and you remove it, or you change the order disks are detected in the BIOS so that you can boot from your second disk, then your second disk will become the first disk in the system. The MBR will then be correct, your new second drive will have become your first drive, and you will be able to boot from this disk.<br />
<br />
grub> device (hd0) /dev/sdb<br />
<br />
Then we install GRUB onto the MBR of our new second drive. Check that the "partition type" is detected as "0xfd", as shown below, to make sure you have the right partition:<br />
<br />
grub> root (hd0,1)<br />
Filesystem type is ext2fs, partition type 0xfd<br />
grub> setup (hd0)<br />
Checking if "/boot/grub/stage1" exists... yes<br />
Checking if "/boot/grub/stage2" exists... yes<br />
Checking if "/boot/grub/e2fs_stage1_5" exists... yes<br />
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded<br />
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,1)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded<br />
Done<br />
grub> quit<br />
<br />
== Verify success ==<br />
Reboot your computer, making sure it boots from the new RAID disk ({{Filename|/dev/sdb}}) and not the original disk ({{Filename|/dev/sda}}). You may need to change the boot device priorities in your BIOS to do this.<br />
<br />
Once the GRUB on the '''new''' disk loads, make sure you select to boot the new entry you created in {{Filename|menu.lst}} earlier.<br />
<br />
Verify you have booted from the RAID array by looking at the output of mount. Also check mdstat again only to confirm which disk is in the array.<br />
[root@arch ~]# mount<br />
/dev/md0 on / type ext3 (rw)<br />
<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sdb2[1]<br />
40064 blocks [2/1] [_U]<br />
<br />
unused devices: <none><br />
<br />
<br />
Also {{Codeline|swapon -s}}:<br />
[root@arch ~]# swapon -s<br />
Filename Type Size Used Priority<br />
/dev/sdb1 partition 4000144 16 -1<br />
Note it is the swap partition on {{Filename|sdb}} that is in use, nothing from {{Filename|sda}}.<br />
<br />
If system boots fine, and the output of the above commands is correct, then congratulations! You're now running off the degraded RAID array. We can add the original disk to the array now to bring it up to full performance.<br />
<br />
== Add original disk to array ==<br />
<br />
=== Partition original disk ===<br />
<br />
Copy the partition table from /dev/sdb (newly implemented RAID disk) to /dev/sda (second disk we are adding to the array) so that both disks have exactly the same layout.<br />
[root@arch ~]# sfdisk -d /dev/sdb | sfdisk /dev/sda<br />
<br />
Alternate method - this will output the /dev/sdb partition layout to a file, then it's used as input for partitioning /dev/sda.<br />
[root@arch ~]# sfdisk -d /dev/sdb > raidinfo-partitions.sdb<br />
[root@arch ~]# sfdisk /dev/sda < raidinfo-partitions.sdb<br />
Use the --force if needed.<br />
[root@arch ~]# sfdisk --force /dev/sda < raidinfo-partitions.sdb<br />
<br />
Verify that the partitioning is identical:<br />
[root@arch ~]# fdisk -l<br />
<br />
==== Note ====<br />
If you get an error when attempting to add the parition to the array: <br />
mdadm: /dev/sda1 not large enough to join array<br />
You might have seen an earlier warning message when partitioning this disk that the kernel<br />
still sees the old disk size - a reboot ought to fix this, then try adding again to the array.<br />
<br />
=== Add disk partition to array ===<br />
[root@arch ~]# mdadm /dev/md0 -a /dev/sda2<br />
mdadm: hot added /dev/sda2<br />
<br />
Verify that the RAID array is being rebuilt.<br />
[root@arch ~]# cat /proc/mdstat<br />
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]<br />
md0 : active raid1 sda2[2] sdb2[1]<br />
80108032 blocks [2/1] [_U]<br />
[>....................] recovery = 1.2% (1002176/80108032) finish=42.0min speed=31318K/sec<br />
<br />
unused devices: <none><br />
<br />
=== Add second swap partition ===<br />
The partition was created with sfdisk, but it still has to be formatted for swap.<br />
[root@arch ~]# mkswap -L SWAP /dev/sda1<br />
Setting up swapspace version 1, size = 271314 kB<br />
LABEL=SWAP, UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9<br />
<br />
Then add this UUID to the fstab exactly like the other one earlier. When done, it should look similar to this:<br />
[root@arch ~]# cat /mnt/new-raid/etc/fstab<br />
/dev/md0 / ext3 defaults 0 1<br />
UUID=1acd55dc-f73f-4639-94bc-3f30c33710c9 none swap sw 0 0<br />
UUID=9ff5682b-d5a1-4ed5-8d63-d1df911e0142 none swap sw 0 0<br />
<br />
It can be activated immediately:<br />
[root@arch ~]# swapon /dev/sda1<br />
<br />
=== Verify that email alerts are working ===<br />
<br />
If you run this command, then you should get a notification email showing the contents of /proc/mdstat :<br />
[root@arch ~]# mdadm --monitor --test --oneshot /dev/md0<br />
Check that you get the test email notification. This way you can be aware if one of the disks in the array fails (otherwise it may fail silently, putting you at risk of data loss if another drive should also fail). If you don't get an email notification, check the "MAILADDR" line in mdadm.conf, and also check that sending an email to this address from the command line (e.g. using the "mail" command) works.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Newcomers_Guide&diff=73286
Newcomers Guide
2009-08-04T12:10:01Z
<p>Zatricky: link update</p>
<hr />
<div>[[Category:Arch-ты алу және орнату (Қазақша)]]<br />
[[Category:Arch туралы (Қазақша)]]<br />
[[Category:HOWTOs (Қазақша)]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Provides a highly detailed, explanatory guide to installing, configuring and using a full-featured Arch Linux system.}}<br />
{{Article summary heading|Available Languages}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|简体中文|Arch 新手安装指南 (简体中文)}}<br />
{{i18n_entry|正體中文|Beginner's Guide 新手指南}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Français|Manuel_du_Débutant_(Français)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Indonesia|Beginners_Guide_(Indonesia)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Nederlands|Beginners_Guide_(Nederlands)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Português|Guia para Principiantes(Português)}}<br />
{{i18n_entry|Русский|Руководство_для_новичков}}<br />
{{i18n_entry|Türkçe|Başlangıç Rehberi (Türkçe)}}<br />
{{i18n_entry|हिन्दी|नौसिखिया गाइड(हिन्दी)}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Official Arch Linux Install Guide}} (provides a more general approach)<br />
{{Article summary wiki|Beginners Guide Appendix}}<br />
{{Article summary wiki|Post Installation Tips}}<br />
{{Article summary end}}<br />
==Preface==<br />
=====Everything you ever wanted to know about Arch, but were afraid to ask=====<br />
Welcome. This self-contained document will guide you through the process of installing and configuring [[Arch Linux]]; a simple, agile and lightweight GNU/Linux distribution, <code>UNIX</code>-like operating system. Arch Linux requires a certain level of intimate knowledge of its configuration and of <code>UNIX</code>-like system methodology and for this reason, extra explanatory information is included. This guide is aimed at new Arch users, but strives to serve as a strong reference and informative base for all.<br />
<br />
'''Arch Linux distribution highlights:'''<br />
* '''[[The Arch Way | Simple]]''', <code>UNIX</code>-like design and philosophy<br />
* Independently Developed Community distro built from scratch and targeted at competent GNU/Linux users<br />
* All packages compiled for '''i686/x86-64'''<br />
* Highly customizable system assembled by the user from the ground up<br />
* '''[[The Arch boot process | BSD-style init]]''' scripts, featuring one centralized configuration file<br />
* '''mkinitcpio''': a simple and dynamic initramfs creator <br />
* '''Rolling Release''' model<br />
* '''[[Pacman]]''' package manager is fast, written in '''C''', lightweight and agile, with a very modest memory footprint<br />
* '''[[ABS]]''': The '''A'''rch '''B'''uild '''S'''ystem, a ports-like package building system makes it simple to create your own easily installable Arch packages from source, to use and/or share with the community on the [[AUR]]<br />
* '''[[AUR]]''': The Arch User Repository, offering many thousands of build scripts for Arch user-provided software packages<br />
<br />
=====!!! DON'T PANIC !!!=====<br />
<br />
{{Box Note | No matter what happens, don't worry; mistakes can be easily fixed.}}<br />
<br />
The Arch Linux system is assembled by the ''user'', from the shell, using basic command line tools. This is '''[[The Arch Way]].''' Unlike the more rigid structures of other distributions and installers, there are no default environments nor configurations chosen for you. From the command line, ''you'' will add packages from the Arch repositories using the [[pacman]] tool via your internet connection and manually configure your installation by editing text files until your system is customized to your requirements. You will also manually add non-root user(s) and manage groups and permissions. This method allows for maximum flexibility, choice, and system resource control ''from the base up''.<br />
<br />
Arch Linux is aimed at competent GNU/Linux users who desire minimal 'code separation' from their machine.<br />
<br />
=====License=====<br />
<br />
Arch Linux, pacman, documentation, and scripts are copyright<br />
©2002-2007 by Judd Vinet, ©2007-2009 by Aaron Griffin and are licensed under the GNU General Public License Version 2.<br />
=====[[The Arch Way]]=====<br />
<br />
'''''The design principles behind Arch are aimed at keeping it [[The Arch Way|simple]].'' '''<br />
<br />
'Simple', in this context, shall mean 'without unnecessary additions, modifications, or complications'. In short; an elegant, minimalist approach.<br />
<br />
'''Some thoughts to keep in mind:'''<br />
<br />
*''&quot; 'Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use and technically [inferior].&quot; -Aaron Griffin''<br />
*''Entia non sunt multiplicanda praeter necessitatem'' or &quot;Entities should not be multiplied unnecessarily.&quot; -Occam's razor. The term ''razor'' refers to the act of shaving away unnecessary complications to arrive at the simplest explanation, method or theory.<br />
*''&quot;The extraordinary part of [my method] lies in its simplicity..The height of cultivation always runs to simplicity.&quot;'' - Bruce Lee<br />
<br />
=====About This Guide=====<br />
<br />
The Arch wiki is an excellent resource and should be consulted for issues [http://wiki.archlinux.org/index.php/Main_Page first]; IRC (freenode #archlinux), and the [http://bbs.archlinux.org/ forums] are also available if the answer cannot be found.<br />
<br />
{{Note|Following this guide closely is essential in order to successfully install a properly configured Arch Linux system, so ''please'' read it thoroughly. It is strongly recommended you read each section completely before carrying out the tasks contained.}}<br />
<br />
Since GNU/Linux Distributions are fundamentally 'modular' by design, the guide is logically divided into 4 main components of a desktop <code>UNIX</code>-like operating system: <br />
<br />
'''[[#Part I: Install the Base System|Part I: Installing the Base system]]'''<br />
<br />
'''[[#Part II: Configure&Update the New Arch Linux base system|Part II: Configure&Update the New Arch Linux base system]]'''<br />
<br />
'''[[#Part III: Install X and configure ALSA|Part III: Installing X and configuring ALSA]]'''<br />
<br />
'''[[#Part IV: Installing and configuring a Desktop Environment|Part IV: Installing a Desktop Environment]]'''<br />
<br />
<br />
'''''Welcome to Arch! Enjoy the installation; take your time and have fun!'''''<br />
<br />
'''''Now, let's get started....'''''<br />
<br />
==Part I: Install the Base System==<br />
<br />
===Step 1: Obtain the latest Installation media ===<br />
<br />
You can obtain Arch's official installation media from [http://archlinux.org/download/ here]. The latest version is 2009.02 <br />
<br />
*Both the Core installer and the FTP/HTTP-downloads provide only the necessary packages to create an '''Arch Linux base system'''. ''Note that the Base System does not include a GUI. It is mainly comprised of the GNU toolchain (compiler, assembler, linker, libraries, shell, and a few useful utilities), the Linux kernel, and a few extra libraries and modules.''<br />
*The isolinux images are provided for people who experience trouble using the grub version. There are no other differences.<br />
*The Arch64 FAQ ( http://wiki.archlinux.org/index.php/Arch64_FAQ ) can help you chose between the 32- and 64-bit versions.<br />
<br />
====CD installer====<br />
Burn the .iso to a CD with your preferred burner, and continue with [[#Step 2: Boot Arch Linux Installer | Step 2: Boot Arch Linux Installer]]<br />
{{Box Note| Optical drives as well as CD media quality vary greatly, but generally, using a slow burn speed is recommended for reliable burns; Some users recommend speeds '''''as low as 4x or 2x.''''' If you are experiencing unexpected behavior from the CD, try burning at the minimum speed supported by your system. }}<br />
<br />
====USB stick====<br />
{{Warning|This will irrevocably destroy all data on your USB stick.}}<br />
<br />
'''<code>UNIX</code> Method:'''<br />
<br />
Insert an empty or expendable USB stick, determine its path, and dump the .img to the USB stick with the <code>/bin/dd</code> program:<br />
dd if=archlinux-2009.02-[core_or_ftp]-i686.img of=/dev/sd''x''<br />
where ''if='' is the path to the img file and ''of='' is your USB device. Make sure to use /dev/sd''x'' and not /dev/sd''x1''.<br />
<br />
'''Check md5sum (optional):'''<br />
<br />
Make a note of the number of records (blocks) read in and written out, then perform the following check:<br />
dd if=/dev/sd''x'' count=''number_of_records'' status=noxfer | md5sum<br />
The md5sum returned should match the md5sum of the downloaded archlinux image file; they both should match the md5sum of the image as listed in the md5sums file in the mirror distribution site.<br />
<br />
'''Windows Method:'''<br />
<br />
Download Disk Imager from https://launchpad.net/win32-image-writer/+download. Insert flash media. Start the Disk Imager and select the image file. Select the Drive letter associated with the flash drive. Click "write".<br />
<br />
Continue with [[#Step 2: Boot Arch Linux Installer | Step 2: Boot Arch Linux Installer]]<br />
<br />
===Step 2: Boot Arch Linux Installer===<br />
Insert the CD or USB stick and boot from it. You may have to<br />
change the boot order in your computer BIOS or press a key (usually DEL, F1, F2, F11 or F12) during the BIOS POST phase.<br />
<br />
Memory requirements:<br />
<br />
* CORE : 160 MB RAM x86_64/i686 (all packages selected, with swap partition)<br />
* FTP : 160 MB RAM x86_64/i686 (all packages selected, with swap partition)<br />
<br />
Choose Boot Archlive or Boot Archlive [legacy IDE] if you have trouble with libata/PATA.<br />
<br />
To change boot options press '''e''' for editing the boot lines. Many users may wish to change the resolution of the framebuffer, for more readable console output. Append:<br />
vga=773<br />
to the kernel line, followed by <ENTER>, for a 1024x768 framebuffer.<br />
<br />
Hit '''b''' to boot.<br />
<br />
The system will now boot and present a login prompt. Login as 'root' without quotes.<br />
<br />
If your system has errors trying to boot from the live CD or there are other '''hardware''' errors, refer to the [[Installation Troubleshooting]] wiki page.<br />
<br />
====Changing the keymap====<br />
If you have a non-US keyboard layout you can interactively choose your keymap/console font with the command:<br />
# km<br />
or use the loadkeys command:<br />
# loadkeys ''layout''<br />
(replace ''layout'' with your keyboard layout such as &quot;<code>fr</code>&quot; or &quot;<code>be-latin1</code>&quot;)<br />
<br />
====Documentation====<br />
The official install guide is available on the live system. The official guide covers installation and configuration of the base system only. Change to vc/2 (virtual console #2) with <ALT>+F2 and invoke <code>/usr/bin/less</code>:<br />
# less /arch/arch-linux-official-guide.txt<br />
<code>less</code> will allow you to page through the document. Change back to vc/1 with <ALT>+F1.<br />
<br />
Change back to vc/2 if you need to reference the Official Guide at any time.<br />
<br />
===Step 3: Start the Installation===<br />
As root, run the installer script from vc/1:<br />
# /arch/setup<br />
<br />
===A: Select an installation source===<br />
After a welcome screen, you will be prompted for an installation source. Choose the appropriate source for the installer you are using.<br />
* If you chose the CORE installer, continue below with [[#C: Prepare Hard Drive|C: Prepare Hard Drive]].<br />
* FTP/HTTP only: You shall be prompted to load ethernet drivers manually, if desired. Udev is quite effective at loading the required modules, so you may assume it has already done so. You may verify this by invoking ifconfig -a from vc/3. (Select OK to continue.)<br />
<br />
====Configure Network (FTP/HTTP)====<br />
Available Interfaces will be presented. If an interface and HWaddr ('''H'''ard'''W'''are '''addr'''ess) is listed, then your module has already been loaded. If your interface is not listed, you may probe it from the installer, or manually do so from another virtual console.<br />
<br />
The following screen will prompt you to ''Select the interface, Probe,'' or ''Cancel''. Choose the appropriate interface and continue.<br />
<br />
The installer will then ask if you wish to use DHCP. Choosing Yes will run '''dhcpcd''' to discover an available gateway and request an IP address; Choosing No will prompt you for your static IP, netmask, broadcast, gateway DNS IP, HTTP proxy, and FTP proxy. Lastly, you will be presented with an overview to ensure your entries are correct.<br />
<br />
=====Wireless Quickstart For the Live Environment (If you need wireless connectivity during the installation process)=====<br />
<br />
The wireless drivers and utilities are now available to you in the live environment of the installation media. A good knowledge of your wireless hardware will be of key importance to successful configuration. Note that the following quickstart procedure will initialize your wireless hardware for use ''in the live environment''.<br />
<br />
The basic procedure will be:<br />
* Switch to a free virtual console, e.g.: <ALT>+F3<br />
* Ensure udev has loaded the driver, and that the driver has created a usable wireless kernel interface with <code>/usr/sbin/iwconfig</code>:<br />
# iwconfig<br />
(Output should show an available wireless interface)<br />
* Bring the interface up with <code>/sbin/ifconfig <interface> up</code>.<br />
An example, using an atheros card and madwifi driver:<br />
# ifconfig ath0 up<br />
(Remember, your interface may be named something else, depending on your module (driver) and chipset: wlan0, eth1, etc.)<br />
* Specify the id of the wireless network with iwconfig <interface> essid &quot;<youressid>&quot; key <yourwepkey> (give the essid (the 'network name') of the network in quotes). <br />
* An example using WEP:<br />
# iwconfig ath0 essid &quot;linksys&quot; key 0241baf34c<br />
* An example using an unsecured network:<br />
# iwconfig ath0 essid "linksys"<br />
* Request and acquire an IP address with <code>/sbin/dhcpcd <interface> </code>. e.g.:<br />
# dhcpcd ath0<br />
* Ensure you can route using <code>/bin/ping</code>:<br />
# ping -c 3 www.google.com<br />
Done.<br />
{{Box Note | '''''In addition to the wireless module, some wireless chipsets, like ipw2100 and ipw2200, require corresponding firmware installation. The firmware packages must be explicitly installed to your actual system to provide wireless functionality after you reboot into your installed system. (Due to the firmware installation requirement, these chipsets may not work in the live environment.) Package selection and installation is covered below. Ensure installation of both your wireless module and firmware during the package selection step! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset. This is a very common error.'''''}}<br />
<br />
After the initial Arch installation is complete, you may wish to refer to [[Wireless Setup]] to ensure a permanent configuration solution for your installed system.<br />
<br />
Return to vc/1 with <ALT>+F1. Continue with [[#C: Prepare Hard Drive|C: Prepare Hard Drive]]<br />
<br />
===B: Set Clock===<br />
* UTC - Choose UTC if running only <code>UNIX</code>-like operating system(s).<br />
<br />
* local - Choose local if multi-booting with a Microsoft Windows OS.<br />
<br />
===C: Prepare Hard Drive===<br />
<br />
{{Warning|Partitioning hard drives can destroy data. You are strongly cautioned and advised to backup your critical data if applicable.}}<br />
<br />
Verify current disk identities and layout by invoking <code>/sbin/fdisk</code> with the <code>-l</code> (lower-case L) switch.<br />
<br />
Open another virtual console (<ALT>+F3) and enter:<br />
# fdisk -l<br />
Take note of the disk(s)/partition(s) to utilize for the Arch installation.<br />
<br />
Switch back to the installation script with <ALT>+F1<br />
<br />
Select the first menu entry &quot;Prepare Hard Drive&quot;.<br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides the disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. ''You will be prompted to modify the size to your requirement.''<br />
* swap partition, default size 256MB. ''You will be prompted to modify the size to your requirement.''<br />
* A Separate / and /home partition, (sizes can also be specified). Available filesystems include ext2, ext3, ext4, reiserfs, xfs and jfs, but note that ''both / and /home shall share the same fs type'' if choosing the Auto Prepare option.<br />
<br />
Be warned that Auto-prepare will completely erase the chosen hard drive. Read the <font color=&quot;red&quot;>warning</font> presented by the installer very carefully, and make sure the correct device is about to be partitioned.<br />
<br />
* Option 2: '''(Recommended)''' Partition Hard Drives (with cfdisk)<br />
<br />
This option will allow for the most robust and customized partitioning solution for your personal needs.<br />
<br />
''At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to '''[[#D: Select Packages|D: Select Packages]]''' below.''<br />
<br />
{{Box Note|If you installing to a USB flash key, see [[Installing_Arch_Linux_on_a_USB_key]].}}<br />
<br />
====Partition Hard Drives====<br />
<br />
=====Partition Info=====<br />
<br />
Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted).<br />
*There are 3 types of disk partitions:<br />
#Primary<br />
#Extended<br />
#Logical<br />
'''Primary''' partitions can be bootable, and are limited to 4 partitions per disk or raid volume. If a partitioning scheme requires more than 4 partitions, an '''extended''' partition which will contain '''logical''' partitions will be required.<br />
<br />
Extended partitions are not usable by themselves; they are merely a &quot;container&quot; for logical partitions. If required, a hard disk shall contain only one extended partition; which shall then be sub-divided into logical partitions.<br />
<br />
When partitioning a disk, one can observe this numbering scheme by creating primary partitions sda1-3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on.<br />
<br />
=====Swap Partition=====<br />
A swap partition is a place on the drive where virtual ram resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM.<br />
<br />
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually quite sufficient. On machines with 1GB RAM, generally a 1x rule is adequate. If the installation machine provides gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forget a swap partition altogether, though this is not recommended. A 1 GB swap partition will be used in this example.<br />
{{Box Note|If using suspend-to-disk, (hibernate) a swap partition at least '''equal''' in size to the amount of physical RAM is required. Some Arch users even recommend oversizing it beyond the amount of physical RAM by 10-15%, to allow for possible bad sectors.}}<br />
<br />
=====Partition Scheme=====<br />
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements.<br />
<br />
Filesystem candidates for separate partitions include:<br />
<br />
'''/''' (root) ''The root filesystem is the primary filesystem from which all other filesystems stem; the top of the hierarchy. All files and directories appear under the root directory &quot;/&quot;, even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system.''<br />
<br />
'''/boot''' ''This directory contains the kernel and ramdisk images as well as the bootloader configuration file, and bootloader stages. /boot also stores data that is used before the kernel begins executing userspace programs. This may include saved master boot sectors and sector map files.''<br />
<br />
'''/home''' ''User data and user specific configuration files for applications are stored in each user's home directory in a file that starts with the '.' character (a &quot;dot file&quot;).''<br />
<br />
'''/usr''' ''While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except in the case of system update/upgrade. Any information that is host-specific or varies with time is stored elsewhere.''<br />
<br />
'''/tmp''' ''directory for programs that require temporary files''<br />
<br />
'''/var''' ''contains variable data; spool directories and files, administrative and logging data, pacman's cache, the ABS tree, etc.''<br />
{{Box Note | Besides /boot, directories essential for booting are: '/bin', '/dev', '/etc', '/lib', '/proc' and '/sbin'. Therefore, they must not reside on a separate partition from /.}}<br />
'''''There are several advantages for using discrete filesystems, rather than combining all into one partition''''':<br />
<br />
* Security: Each filesystem may be configured in /etc/fstab as 'nosuid', 'nodev', 'noexec', 'readonly', etc.<br />
* Stability: A user, or malfunctioning program can completely fill a filesystem with garbage if they have write permissions for it. Critical programs, which reside on a different filesystem remain unaffected.<br />
* Speed: A filesystem which gets written to frequently may become somewhat fragmented. (An effective method of avoiding fragmentation is to ensure that each filesystem is never in danger of filling up completely.) Separate filesystems remain unaffected, and each can be defragmented separately as well.<br />
* Integrity: If one filesystem becomes corrupted, separate filesystems remain unaffected.<br />
* Versatility: Sharing data across several systems becomes more expedient when independent filesystems are used. Separate filesystem types may also be chosen based upon the nature of data and usage.<br />
In this example, we shall use separate partitions for /, /var, /home, and a swap partition.<br />
<br />
{{Box Note | /var contains many small files. This should be taken into consideration when choosing a filesystem type for it, (if creating its own separate partition).}}<br />
<br />
=====How big should my partitions be?=====<br />
This question is best answered based upon individual needs.<br />
You may wish to simply create '''one partition for root and one partition for swap or only one root partition without swap''' or you may follow the following examples closely and consider these guidelines to provide a frame of reference:<br />
* The root filesystem (/) in the example will contain the /usr directory, which can become moderately large, depending upon how much software is installed.<br />
<br />
* The /var filesystem will contain, among other data, the [[ABS]] tree and the pacman cache. Keeping cached packages is useful and versatile; it provides the ability to downgrade packages if needed. /var tends to grow in size; the pacman cache can grow large over long periods of time, but can be safely cleared if needed. 6-8 Gigs on a desktop system should therefore be sufficient for /var. Servers tend to have extremely large /var filesystems.<br />
* The /home filesystem is typically where user data, downloads, and multimedia reside. On a desktop system, /home is typically the largest filesystem on the drive by a large margin.<br />
* An extra 25% of space added to each filesystem will provide a cushion for unforeseen occurrence, expansion, and serve as a preventive against fragmentation.<br />
'''''From the guidelines above, the example system shall contain a ~15GB root (/) partition, ~7GB /var, 1GB swap, and a /home containing the remaining disk space.'''''<br />
<br />
=====Create Partition:cfdisk=====<br />
Start by creating the primary partition that will contain the '''root''', (/) filesystem.<br />
<br />
Choose '''N'''ew -> Primary and enter the desired size for root (/). Put the partition at the beginning of the disk.<br />
<br />
Also choose the '''T'''ype by designating it as '83 Linux'. The created / partition shall appear as sda1 in our example.<br />
<br />
Now create a primary partition for /var, designating it as '''T'''ype 83 Linux. The created /var partition shall appear as sda2<br />
<br />
Next, create a partition for swap. Select an appropriate size and specify the '''T'''ype as 82 (Linux swap / Solaris). The created swap partition shall appear as sda3.<br />
<br />
Lastly, create a partition for your /home directory. Choose another primary partition and set the desired size.<br />
<br />
Likewise, select the '''T'''ype as 83 Linux. The created /home partition shall appear as sda4.<br />
<br />
Example:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Primary Linux 15440 #root<br />
sda2 Primary Linux 6256 #/var<br />
sda3 Primary Linux swap / Solaris 1024 #swap<br />
sda4 Primary Linux 140480 #/home<br />
<br />
Choose '''W'''rite and type ''''yes''''. Beware that this operation may destroy data on your disk. Choose '''Q'''uit to leave the partitioner.<br />
Choose Done to leave this menu and continue with &quot;Set Filesystem Mountpoints&quot;.<br />
<br />
{{Box Note | Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd''x'' naming scheme. This is perfectly normal and should not be a concern.}}<br />
<br />
====Set Filesystem Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). At this time, you will be asked to specify the filesystem type.<br />
<br />
=====Filesystem Types=====<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each has its own advantages, disadvantages, and unique idiosyncrasies. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' ''Second Extended Filesystem''- Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.'' Generally regarded as a good choice for /boot/.<br />
<br />
2. '''ext3''' ''Third Extended Filesystem''- Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. ''Extremely'' stable, mature, and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
'''High Performance Filesystems:'''<br />
<br />
3. '''ext4''' ''Fourth Extended Filesystem''- Backward compatible with ext2 and ext3, Introduces support for volumes with sizes up to 1 exabyte and files with sizes up to 16 terabyte. Increases the 32,000 subdirectory limit in ext3 to 64,000. Offers online defragmentation ability. <br />
{{Box Note | ext4 is a new filesystem and may have some bugs.}}<br />
<br />
4. '''ReiserFS''' (V3)- Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput based on an unconventional and creative algorithm. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is fast at formatting, yet comparatively slow at mounting. Quite mature and stable. ReiserFS is not actively developed at this time (Reiser4 is the new Reiser filesystem). Generally regarded as a good choice for /var/.<br />
<br />
5. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem- The first filesystem to offer journaling. JFS had many years of use in the IBM AIX® OS before being ported to Linux. JFS currently uses the least CPU resources of any GNU/Linux filesystem. Very fast at formatting, mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline I/O scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS, but very mature and stable.<br />
<br />
6. '''XFS''' - Another early journaling filesystem originally developed by Silicon Graphics for the IRIX OS and ported to Linux. XFS offers very fast throughput on large files and large filesystems. Very fast at formatting and mounting. Generally benchmarked as slower with many small files, in comparison to other filesystems. XFS is very mature and offers online defragmentation ability.<br />
* JFS and XFS filesystems cannot be ''shrunk'' by disk utilities (such as gparted or parted magic)<br />
<br />
===== A note on Journaling=====<br />
All above filesystems, except ext2, use [http://en.wikipedia.org/wiki/Journaling_file_system journaling]. Journaling file systems are fault-resilient file systems that use a journal to log changes before they are committed to the file system to avoid metadata corruption in the event of a crash. Note that not all journaling techniques are alike; specifically, only ext3 and ext4 offer ''data-mode journaling'', (though, not by default), which journals ''both'' data ''and'' meta-data (but with a significant speed penalty). The others only offer ''ordered-mode journaling'', which journals meta-data only. While all will return your filesystem to a valid state after recovering from a crash, ''data-mode journaling'' offers the greatest protection against file system corruption and data loss but can suffer from performance degradation, as all data is written twice (first to the journal, then to the disk). Depending upon how important your data is, this may be a consideration in choosing your filesystem type.<br />
<br />
'''''Moving on...'''''<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, sda2 and sda4 remain. For sda2, choose a filesystem type and mount it as /var. Finally, choose the filesystem type for sda4, and mount it as /home. Return to main menu.<br />
<br />
===D: Select Packages===<br />
<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, select the package category:<br />
{{Box Note | For expedience, all packages in '''base''' are selected by default}}<br />
* '''Base''': The minimal base environment. ''Always select it and only remove packages that you don't use.''<br />
* '''Base-devel''': Extra tools such as '''make''', '''automake''' and '''wireless-tools''' as well as wireless firmwares. ''Most beginners should choose to install it, and will probably need it later.<br />
''<br />
After category selection, you will be presented with the full lists of packages, allowing you to fine-tune your selections. Use the space bar to select and unselect.<br />
<br />
{{Box Note | If you are going to require connection to a wireless network with WPA encryption, consider installing netcfg2 (as well as wireless_tools), which will enable you to do so.}}<br />
<br />
Once you're done selecting the packages you need, leave the selection<br />
screen and continue to the next step, Install Packages.<br />
<br />
===E: Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system.<br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See vc/5 for output, vc/1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
===F: Configure the System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.''<br />
<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system.<br />
<br />
Previous versions of the installer included [[Hwdetect|hwdetect]] to gather information for your configuration. This has been deprecated, and udev should handle most module loading automatically at boot.<br />
<br />
====The initramfs====<br />
<br />
The initial ram filesystem, or initramfs, is a temporary file system used by the kernel during boot. It is used for making preparations, like hardware detection and module loading, before the real root file system can be mounted. Therefore, an initramfs allows for the use of a generic modular kernel for a wide variety of hardware, and without the need to compile a custom kernel for each end user.<br />
<br />
You will be prompted by a series of questions related to the configuration of your initramfs. You will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. Choosing 'yes' for any of the above will cause the installer script to place the appropriate hook(s) within the <code>/etc/mkinitcpio.conf</code> file.<br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or, if you are familiar with it, [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vim]. You will be presented with a menu including the main configuration files for your system.<br />
<br />
{{Box Note | ''It is very important at this point to edit, or at least verify by opening, every configuration file.'' The installer script relies on your input to create these files on your installation. A common error is to skip over these critical steps of configuration.}}<br />
<br />
=====Can the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and auto-configuration, Arch presents the user all pertinent configuration files during installation for the purposes of ''transparency and system resource control''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use and maintain your new installation productively.<br />
<br />
====/etc/rc.conf====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files.<br />
=====LOCALIZATION section=====<br />
* '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users.<br />
* '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on boot and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
* '''USEDIRECTISA''': Use direct I/O request instead of /dev/rtc for hwclock<br />
* '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
* '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or '''X'''.<br />
* '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
* '''CONSOLEMAP'''=: Defines the console map to load with the setfont program at boot. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe.<br />
* '''USECOLOR'''=: Select &quot;yes&quot; if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE=&quot;en_US.utf8&quot;<br />
HARDWARECLOCK=&quot;localtime&quot;<br />
USEDIRECTISA=&quot;no&quot;<br />
TIMEZONE=&quot;US/Eastern&quot;<br />
KEYMAP=&quot;us&quot;<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR=&quot;yes&quot;<br />
<br />
=====HARDWARE Section=====<br />
* '''MOD_AUTOLOAD'''=: Setting this to &quot;yes&quot; will use '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to &quot;no&quot; will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc.<br />
* '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below.<br />
* '''MODULES'''=: Specify additional MODULES if you know that an important module is missing. If your system has any floppy drives, add "floppy". If you will be using loopback filesystems, add "loop". Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted.<br />
# Scan hardware and load required modules at boot<br />
MOD_AUTOLOAD=&quot;yes&quot;<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(!net-pf-10 !snd_pcsp !pcspkr loop)<br />
<br />
=====NETWORKING Section=====<br />
* '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
* '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0=&quot;dhcp&quot; if you want to use '''DHCP'''<br />
* '''INTERFACES'''=: Specify all interfaces here. <br />
* '''gateway'''=: If you are using '''static IP''', set the gateway address. If using '''DHCP''', you can usually ignore this variable, though some users have reported the need to define it.<br />
* '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. If using '''DHCP''', you can usually leave this variable commented out with the bang (!), but again, some users require the gateway and ROUTES defined. If you experience networking issues with pacman, for instance, you may want to return to these variables.<br />
<br />
======Example, using a dynamically assigned IP address ('''DHCP''')======<br />
HOSTNAME=&quot;arch&quot;<br />
#eth0=&quot;eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255&quot;<br />
eth0=&quot;dhcp&quot;<br />
INTERFACES=(eth0)<br />
gateway=&quot;default gw 192.168.0.1&quot;<br />
ROUTES=(!gateway)<br />
{{Box Note | Arch uses the '''dhcpcd''' DHCP client. Alternatively, '''dhclient''' is available from the [extra] repository via pacman.}}<br />
<br />
======Example, using a '''static''' IP address======<br />
HOSTNAME=&quot;arch&quot;<br />
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(gateway)<br />
<br />
{{tip|If you also require using a non-standard MTU size to speed up intranet xfers AND your hardware supports them, see the [[Jumbo Frames]] wiki page for further configuration.}}<br />
<br />
=====DAEMONS Section=====<br />
<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(network @syslog-ng netfs @crond)<br />
*If a script name is prefixed with a bang (!), it is not executed.<br />
*If a script is prefixed with an &quot;at&quot; symbol (@), it shall be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot). Do not background daemons that are needed by other daemons. For example "mpd" depends on "network", therefore backgrounding network may cause mpd to break.<br />
*Edit this array whenever new system services are installed, if starting them automatically during boot is desired.<br />
<br />
This 'BSD-style' init, is the Arch way of handling what other distributions handle with various symlinks to an /etc/init.d directory.<br />
<br />
======About DAEMONS======<br />
You do not have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide.<br />
A ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor.<br />
<br />
{{Tip|All Arch daemons reside under /etc/rc.d/}}<br />
<br />
====/etc/fstab====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's filesystem. The '''/etc/fstab''' file is most commonly used by the '''mount''' command. The mount command takes a filesystem on a device, and adds it to the main system hierarchy that you see when you use your system. '''mount -a''' is called from /etc/rc.sysinit, about 3/4 of the way through the boot process, and reads /etc/fstab to determine which options should be used when mounting the specified devices therein. If '''noauto''' is appended to a filesystem in /etc/fstab, '''mount -a''' will not mount it at boot.<br />
<br />
=====An example /etc/fstab=====<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /media/cdrom auto ro,user,noauto,unhide 0 0<br />
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /media/fl auto user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-933.. / jfs defaults,noatime 0 1<br />
/dev/disk/by-uuid/7ef-223.. /home jfs defaults,noatime 0 2<br />
/dev/disk/by-uuid/530-1e-.. swap swap defaults 0 0<br />
/dev/disk/by-uuid/4fe-110.. /var reiserfs defaults,noatime,notail 0 2<br />
{{Box Note | The 'noatime' option disables writing read access times to the metadata of files and may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency. 'notail' disables the ReiserFS tailpacking feature, for added performance at the cost of slightly less efficient disk usage.}}<br />
{{Box Note | It may be beneficial to make a note of the UUID of the root (/) partition, as this may be required during GRUB configuration.}}<br />
<br />
* '''<file system>''': describes the block device or remote filesystem to be mounted. For regular mounts, this field will contain a link to a block device node (as created by mknod which is called by udev at boot) for the device to be mounted; for instance, '/dev/cdrom' or '/dev/sda1'. Instead of giving the device explicitly, the Arch installer indicates the filesystem that is to be mounted by its UUID by default.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability. ''If you do not need nor wish to use UUID, simply change your fstab to use whatever naming convention desired.'' (See [[Persistent block device naming| this wiki article]] for more information on persistent block device naming. )}}<br />
ls -lF /dev/disk/by-uuid/<br />
will list all partitions by UUID, while<br />
/sbin/blkid<br />
will show a list correlating each partition with its label, filesystem type and UUID. ''Note: this command is installed by the '''e2fsprogs''' package.''<br />
<br />
* '''<dir>''': describes the mount point for the filesystem. For swap partitions, this field should be specified as 'swap'; (Swap partitions are not actually mounted.)<br />
<br />
* '''<type>''': describes the type of the filesystem. The Linux kernel supports many filesystem types. (For the filesystems currently supported by the running kernel, see /proc/filesystems). An entry 'swap' denotes a file or partition to be used for swapping. An entry 'ignore' causes the line to be ignored. This is useful to show disk partitions which are currently unused.<br />
<br />
* '''<options>''': describes the mount options associated with the filesystem. It is formatted as a comma separated list of options with no intervening spaces. It contains at least the type of mount plus any additional options appropriate to the filesystem type. For documentation on the available options for non-nfs file systems, see mount(8).<br />
<br />
* '''<dump>''': used for these filesystems by the dump(8) command to determine which filesystems need to be dumped. dump is a backup utility. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be backed up. ''Note that dump is not installed by default.''<br />
<br />
* '''<pass>''': used by the fsck(8) program to determine the order in which filesystem checks are done at boot time. The root filesystem should be specified with a <pass> of 1, and other filesystems should have a <pass> of 2 or 0. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
===='''[[Configuring mkinitcpio | /etc/mkinitcpio]].conf'''====<br />
This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or &quot;initrd&quot;) for your system. The initrd is a gzipped image that is read by the kernel during boot. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your boot continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
'''mkinitcpio''' is the next generation of '''initramfs creation'''. It has many advantages over the old '''mkinitrd''' and '''mkinitramfs''' scripts.<br />
<br />
* It uses '''klibc''' and '''kinit''' which are developed by Linux kernel devs to provide a small and lightweight base for early userspace.<br />
* It can use '''udev''' for hardware autodetection at runtime, thus prevents you from having tons of unnecessary modules loaded.<br />
* Its hook-based init script is easily extendable with custom hooks, which can easily be included in pacman packages without having to modifiy mkinitcpio itself.<br />
* It already supports '''lvm2''', '''dm-crypt''' for both legacy and luks volumes, '''raid''', '''swsusp''' and '''suspend2''' resuming and booting from '''usb mass storage''' devices.<br />
* Many features can be configured from the kernel command line without having to rebuild the image.<br />
* The '''mkinitcpio''' script makes it possible to include the image in a kernel, thus making a self-contained kernel image is possible.<br />
* Its flexibility makes recompiling a kernel unnecessary in many cases.<br />
<br />
If you are using a non-US keyboard you may want to add &quot;<code>keymap</code>&quot; to the &quot;<code>HOOKS=</code>&quot; section of '''/etc/mkinitcpio.conf''' to load your local keymap during boot, e.g.:<br />
HOOKS="base udev autodetect pata scsi sata filesystems keymap"<br />
Otherwise if boot fails for some reason you will be asked to enter root's password for system maintenance but will be unable to do so.<br />
<br />
''If you are using a US keyboard editing this configuration should be unnecessary at this point.''<br />
<br />
'''mkinitcpio''' was developed by Aaron Griffin and Tobias Powalowski with some help from the community.<br />
<br />
==== /etc/modprobe.conf====<br />
It is unnecessary to configure this file at this time.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules<br />
{{Note | The new module-init-tools 3.8 package changes the location of the configuration file: /etc/modprobe.conf is no longer read, instead /etc/modprobe.d/modprobe.conf is used. [http://www.archlinux.org/news/450/ link]}}<br />
<br />
====/etc/resolv.conf (for Static IP)====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [http://wiki.archlinux.org/index.php/Network#For_DHCP_IP Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish.<br />
An example, using OpenDNS:<br />
nameserver 208.67.222.222<br />
nameserver 208.67.220.220<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
====/etc/hosts====<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
{{Tip|For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.}}<br />
<br />
====/etc/hosts.deny and /etc/hosts.allow====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add the appropriate parameters: <br />
<br />
* let everyone connect to you<br />
sshd: ALL<br />
<br />
* restrict it to a certain ip<br />
sshd: 192.168.0.1<br />
<br />
* restrict it to your local LAN network (range 192.168.0.0 to 192.168.0.255)<br />
sshd: 192.168.0.<br />
<br />
* OR restrict for an IP range<br />
sshd: 10.0.0.0/255.255.255.0<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
====/etc/locale.gen====<br />
The '''/usr/sbin/locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering &quot;peculiar&quot; text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file remains untouched. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a &quot;The current locale is invalid...&quot; error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
====Root password====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
====Pacman-Mirror====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===G: Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO].<br />
<br />
====GRUB====<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient, but verify its contents to ensure accuracy (specifically, ensure that the root (/) partition is specified by UUID on line 3). You may want to alter the resolution of the console by adding a vga=<number> kernel argument corresponding to your desired virtual console resolution. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0) <br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
{{Box Note | ''The linux kernel, 'vmlinuz', is so named because it incorporated '''v'''irtual '''m'''emory capability early in its development. The '''z''' denotes a zipped (compressed) image.''}}<br />
<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. &quot;Arch Linux (Main)&quot; will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': '''GRUB''''s root; the drive and partition where the kernel (/boot) resides, according to system BIOS. (More accurately, where GRUB's stage2 file resides). '''NOT necessarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, and enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, according to BIOS, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root'''''.<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''). If not already specified, you should enter the name of the partition, according to the UUID numbering scheme, using the ''/dev/disk/by-uuid/xxxx-xxxx-xxxx'' format. This UUID was found in the previous section regarding configuration of ''/etc/fstab''.<br />
<br />
*An easy way to distinguish the 2 appearances of 'root' in /boot/grub/menu.lst is to remember that the first root statement ''informs GRUB where the kernel resides'', whereas the second root= kernel argument ''tells the kernel where the root filesystem (/) resides''.<br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''&quot;vga=773&quot;''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root. Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader (to the master boot record, sda in our example).<br />
{{tip|For more details, see the [[GRUB]] wiki page.}}<br />
<br />
===H: Reboot===<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, and reboot:<br />
# reboot<br />
(Be sure to remove the installer CD)<br />
<br />
==Part II: Configure&Update the New Arch Linux base system==<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Login with the root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available. You may swap between them with ALT+F1...F6}}<br />
<br />
===Step 1: Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
# ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Step 2: Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an &quot;unknown host&quot; error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
{{Tip|Advanced instructions for configuring the network can be found in the [[Network]] article.}}<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
# ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. <br />
*'''Static IP'''<br />
<br />
If required, you can set a new static IP with:<br />
# ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
# route add default gw <ip address of the gateway><br />
Verify that /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.com. If everything is working now, adjust /etc/rc.conf as described above for static IP. <br />
*'''DHCP'''<br />
If you have a DHCP server/router in your network try:<br />
# dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
* Ensure the driver has created a usable interface:<br />
# iwconfig<br />
* Bring the interface up with <code>ifconfig <interface> up</code>. e.g.:<br />
# ifconfig wlan0 up<br />
* (Optional) Scan for available access points:<br />
# iwlist wlan0 scan | less<br />
* Specify the id of the wireless network with <code>iwconfig <interface> essid <youressid></code>. Or, if using WEP; <code>iwconfig <interface> essid <youressid> key <yourwepkey></code>, e.g.:<br />
# iwconfig wlan0 essid linksys key ABCDEF01234<br />
* Request an IP address with <code>dhcpcd <interface></code>. e.g.:<br />
# dhcpcd wlan0<br />
* Ensure you can route:<br />
$ ping -c 3 www.google.com<br />
Done.<br />
<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you will not need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
# modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
# isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
# /etc/rc.d/adsl start<br />
<br />
and<br />
<br />
# /etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically 'dial in' on boot-up, add adsl to your DAEMONS array, and put a ! before the network entry, since the network is handled by adsl now.<br />
<br />
===Step 2: Update, Sync and Upgrade the system with [[pacman]]===<br />
Now we will update the system using [[pacman]]. <br />
<br />
====What is pacman ?====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in ''C'' and is designed from the ground up to be lightweight with a very modest memory footprint, fast, simple, and versatile. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Pacman's output is streamlined, very readable and provides ETA for each package download. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed many times faster than their Bzipped counterparts, and are therefore installed much more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
====Package Repositories and /etc/pacman.conf====<br />
Arch currently offers the following 4 repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) It contains all the packages that MUST be in perfect working order to ensure the system remains in a usable state. These are the absolute system-critical packages. <br />
* Developer maintained<br />
* All binary packages<br />
* pacman accessible <br />
*''The Core installation media simply contains an installer script, and a snapshot of the core repository at the time of release.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE, and Apache, for instance, can be found here. <br />
* Developer maintained<br />
* All binary packages<br />
* pacman accessible<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core] or [extra] repositories. New packages go into [testing] if:<br />
<br />
<nowiki>*</nowiki> they are expected to break something on update and need to be tested first.<br />
<br />
<nowiki>*</nowiki> they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. <br />
* Developer maintained<br />
* All binary packages<br />
* pacman accessible<br />
{{Note|* [testing] is the only repository that can have name collisions with any of the other official repositories. Therefore, if enabled, [testing] must be the first repo listed in <code>pacman.conf</code>.}}<br />
<br />
{{Warning|Only experienced users should use [testing].}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is simply the binary branch of the ''Arch User Repository ([[AUR]])''. It contains binary packages which originated as PKGBUILDs from ''AUR'' [unsupported] that have acquired enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
* TU maintained<br />
* All binary packages<br />
* pacman accessible<br />
<br />
'''AUR (unsupported)'''<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. '''AUR''' [unsupported] does not contain binary packages. Rather, it provides more than nine thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. When an AUR unsupported package acquires enough popular votes, it may be moved to the AUR [community] binary repo, if a TU is willing to adopt and maintain it there.<br />
* TU maintained<br />
* All PKGBUILD bash build scripts<br />
* '''''Not''''' pacman accessible by default<br />
<br />
<nowiki>*</nowiki> pacman wrappers ('''''[[AUR Helpers]]''''') can help you seamlessly access AUR.<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
# nano /etc/pacman.conf<br />
Example:<br />
#<br />
# /etc/pacman.conf<br />
#<br />
# See the pacman.conf(5) manpage for option and repository directives<br />
<br />
#<br />
# GENERAL OPTIONS<br />
#<br />
[options]<br />
# The following paths are commented out with their default values listed.<br />
# If you wish to use different paths, uncomment and update the paths.<br />
#RootDir = /<br />
#DBPath = /var/lib/pacman/<br />
#CacheDir = /var/cache/pacman/pkg/<br />
#LogFile = /var/log/pacman.log<br />
HoldPkg = pacman glibc<br />
# If upgrades are available for these packages they will be asked for first<br />
SyncFirst = pacman<br />
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u<br />
#XferCommand = /usr/bin/curl %u > %o<br />
<br />
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup<br />
#IgnorePkg =<br />
#IgnoreGroup =<br />
<br />
#NoUpgrade =<br />
#NoExtract =<br />
<br />
# Misc options (all disabled by default)<br />
#NoPassiveFtp<br />
#UseSyslog<br />
#ShowSize<br />
#UseDelta<br />
#TotalDownload<br />
#<br />
# REPOSITORIES<br />
# - can be defined here or included from another file<br />
# - pacman will search repositories in the order defined here<br />
# - local/custom mirrors can be added here or in separate files<br />
# - repositories listed first will take precedence when packages<br />
# have identical names, regardless of version number<br />
# - URLs will have $repo replaced by the name of the current repo<br />
#<br />
# Repository entries are of the format:<br />
# [repo-name]<br />
# Server = ServerName<br />
# Include = IncludePath<br />
#<br />
# The header [repo-name] is crucial - it must be present and<br />
# uncommented to enable the repo.<br />
# <br />
<br />
# Testing is disabled by default. To enable, uncomment the following<br />
# two lines. You can add preferred servers immediately after the header,<br />
# and they will be used before the default mirrors.<br />
#[testing]<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist <br />
<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
# An example of a custom package repository. See the pacman manpage for<br />
# tips on creating your own repositories.<br />
#[custom]<br />
#Server = file:///home/custompkgs<br />
<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
<br />
*''' Manually:'''<br />
# nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. In nano, CTRL-K will cut each unneeded line. <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). In nano, ALT+A selects an area, cursor down marks the lines, Ctrl+K cuts the selected area and Ctrl+U uncuts, or pastes it. <br />
<br />
*''' Alternative, using the rankmirrors script:'''<br />
<br />
<code>/usr/bin/rankmirrors</code> is a python script which will attempt to detect the mirrors which are closest to you. <br />
<br />
First, use pacman to install python:<br />
# pacman -Sy python <br />
'''cd''' to the /etc/pacman.d/ directory:<br />
# cd /etc/pacman.d<br />
Backup your existing /etc/pacman.d/mirrorlist:<br />
# cp mirrorlist mirrorlist.backup<br />
Edit mirrorlist.backup and uncomment mirrors you want to test with rankmirrors.<br />
<br />
Run the script against the mirrorlist.backup with the -n switch and redirect output to a new /etc/pacman.d/mirrorlist file:<br />
# rankmirrors -n 6 mirrorlist.backup > mirrorlist<br />
'''-n 6''': rank the 6 fastest mirrors<br />
<br />
'''Force pacman to refresh the package lists'''<br />
<br />
After creating/editing your /etc/pacman.d/mirrorlist, (manually or by <code>/usr/bin/rankmirrors</code>) issue the following command:<br />
# pacman -Syy<br />
Passing two --refresh or -y flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
<br />
====Mirrorcheck for up-to-date packages====<br />
Some of the official mirrors may contain packages that are out-of-date. [[http://users.archlinux.de/~gerbra/mirrorcheck.html ArchLinux Mirrorcheck]] reports various aspects about the mirrors such as, those experiencing network problems, data collection problems, reports the last time they have been synced, etc.<br />
<br />
One may wish to manually inspect the mirrors in the /etc/pacman.d/mirrorlist insuring that it only contains up-to-date mirrors if having the latest and greatest package versions is important to you.<br />
<br />
====Ignoring packages====<br />
When you execute the command &quot;pacman -Syu&quot;, your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the package(s) you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the package(s) you want to skip in your /etc/pacman.conf file in the IgnorePkg array. List each package, with one intervening space :<br />
IgnorePkg = wine <br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed package build scripts are also available in the [[AUR]]. <br />
<br />
You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading, unusual compilation or improper software installation is performed. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should only be used sparingly, if you know what you are doing.<br />
<br />
====Ignoring Configuration Files====<br />
In the same vein, you can also &quot;protect&quot; your configuration/system files from being overwritten during &quot;pacman -Su&quot; using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
====Get familiar with pacman====<br />
pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman(8) tool. Try:<br />
man pacman<br />
<br />
For more information,please look up the [[pacman]] wiki entries at your leisure.<br />
<br />
===Step 3: Update System===<br />
You are now ready to upgrade your entire system. Before you do, read through the [http://www.archlinux.org/news/ news] (and optionally the [http://archlinux.org/pipermail/arch-announce/ announce mailing list]). Often the developers will provide important information about fixes for known issues. Consulting these pages before any upgrade is good practice. <br />
<br />
Sync, refresh, and upgrade your entire new system with:<br />
# pacman -Syu<br />
you may also use:<br />
# pacman --sync --refresh --sysupgrade<br />
<br />
pacman will now download a fresh copy of the master package list from the server(s) defined in pacman.conf(5) and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
<br />
Reboot if a kernel upgrade has occurred. <br />
<br />
{{Box Note|Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.}}<br />
<br />
Pacman output is saved in /var/log/pacman.log.<br />
<br />
{{Box Note|pacman might get updated, its mirrorlist configuration may be lost, so before you move on, make sure you reconfigure your pacman mirrorlist.}}<br />
<br />
See [[Package_Management_FAQs|Package Management FAQs]] for answers to frequently asked questions regarding updating and managing your packages.<br />
<br />
=====The Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. '''Reboot''' if a kernel upgrade has occurred.<br />
=====Network Time Protocol=====<br />
You may wish to set the system time now using OpenNTPD to sync the local clock to remote NTP servers. OpenNTPD may also be added to the DAEMONS= array in /etc/rc.conf to provide this service at each boot. (See the [[Network Time Protocol]] article.)<br />
<br />
===Step 4: Add a user and setup groups===<br />
<code>UNIX</code> is a multi-user environment. You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal, non-root user account using the <code>/usr/sbin/useradd</code> program:<br />
# useradd -m -G [groups] -s [login_shell] [username] <br />
* '''-m''' Creates user home directory as /home/'''username'''. Within their home directory, a user can write files, delete them, install programs, etc. Users' home directories shall contain their data and personal configuration files, the so-called 'dot files' (their name is preceded by a dot), which are 'hidden'. (To view dotfiles, enable the appropriate option in your file manager or run ls with the -a switch.) If there is a conflict between ''user'' (under /home/username) and ''global'' configuration files, (usually under /etc/) the settings in the ''user'' file will prevail. Dotfiles likely to be altered by the end user include .xinitrc and .bashrc files. The configuration files for xinit and Bash respectively. They allow the user the ability to change the window manager to be started upon login and also aliases, user-specified commands and environment variables respectively. When a user is created, their dotfiles shall be taken from the /etc/skel directory where system sample files reside.<br />
* '''-G''' A list of supplementary groups which the user is also a member of. ''Each group is separated from the next by a comma, with no intervening spaces''. The default is for the user to belong only to the initial group (users). <br />
* '''-s''' The path and filename of the user´s default login shell.<br />
Useful groups for your non-root user include:<br />
*'''audio''' - for tasks involving sound card and related software<br />
*'''floppy''' - for access to a floppy if applicable<br />
*'''lp''' - for managing printing tasks<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
*'''storage''' - for managing storage devices<br />
*'''video''' - for video tasks and 3d acceleration<br />
*'''wheel''' - for using sudo<br />
*'''power''' - used w/ power options (ie. shutdown w/ off button) <br />
A typical desktop system example, adding a user named &quot;archie&quot; specifying bash as the login shell:<br />
# useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash archie<br />
Next, add a password for your new user using <code>/usr/bin/passwd</code>.<br />
<br />
An example for our user, 'archie':<br />
# passwd archie<br />
(You will be prompted to provide the new <code>UNIX</code> password.)<br />
<br />
Your new non-root user has now been created, complete with a home directory and a login password.<br />
<br />
'''Alternative method, using <code>/usr/sbin/adduser</code>:'''<br />
<br />
Alternatively, you may use <code>adduser</code>, an interactive user adding program which will prompt you for the above data: ''(recommended for beginners)''<br />
# adduser<br />
'''Deleting the user account:'''<br />
<br />
In the event of error, or if you wish to delete this user account in favor of a different name or for any other reason, use <code>/usr/sbin/userdel</code>:<br />
# userdel -r [username]<br />
* '''-r ''' Files in the user´s home directory will be removed along with the home directory itself and the user´s mail spool.<br />
<br />
If you want to change the name of your user or any existing user, see the [[Change username]] page of the wiki and/or the [[Groups]] and [[User Management]] articles for further information. You may also check the man pages for <code>usermod(8)</code> and <code>gpasswd(8)</code>.<br />
<br />
===Step 5: Install and setup Sudo (Optional)===<br />
To install Sudo:<br />
# pacman -S sudo<br />
To add a user as a sudo user (a &quot;sudoer&quot;), the visudo command must be run as root. If you do not know how to use vi, you may set the EDITOR environment variable to the editor of your choice before running visudo. e.g.:<br />
# EDITOR=nano visudo<br />
If you are comfortable using vi, issue the visudo command without the EDITOR=nano variable:<br />
# visudo<br />
This will open the file /etc/sudoers in a special session of vi. visudo copies the file to be edited to a temporary file, edits it with an editor, (vi by default), and subsequently runs a sanity check. If it passes, the temporary file overwrites the original with the correct permissions. <br />
<br />
{{Warning|Do not edit /etc/sudoers directly with an editor; Errors in syntax can cause annoyances (like rendering the root account unusable). You must use the ''visudo'' command to edit /etc/sudoers.}}<br />
<br />
To give the user full root privileges when he/she precedes a command with &quot;sudo&quot;, add the following line:<br />
USER_NAME ALL=(ALL) ALL<br />
where USER_NAME is the username of the individual.<br />
<br />
For more information, such as sudoer <TAB> completion, see [[Sudo]]<br />
<br />
==Part III: Install X and configure ALSA==<br />
<br />
<br />
===Step 1: Configure sound with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers.<br />
{{Box Note| Alsa is included in the Arch mainline kernel and udev will automatically probe your hardware on boot-up, loading the corresponding kernel module for your audio card. Therefore, your sound should already be working, but upstream sources mute all channels by default.}}<br />
{{Box Note| OSS4.1 has been released under a free license and is generally considered a significant improvement over older OSS versions. If you have issues with ALSA, or simply wish to explore another option, you may choose OSS4.1 instead. Instructions can be found in [[OSS]]}} <br />
<br />
The alsa-utils package contains the alsamixer userspace tool, which allows configuration of the sound device from the console or terminal.<br />
<br />
By default the upstream kernel sources ship with snd_pcsp, the alsa pc speaker module. snd_pcsp is usually loaded before your &quot;actual&quot; sound card module. In most cases, it will be more convenient if this module is loaded last, as it will allow alsamixer to correctly control the desired sound card.<br />
<br />
To have snd_pcsp load last, add the following to /etc/modprobe.d/modprobe.conf:<br />
options snd-pcsp index=2<br />
<br />
Alternatively, if you do not want snd_pcsp to load at all, blacklist it by adding the following to /etc/rc.conf:<br />
MODULES=(... !snd_pcsp)<br />
<br />
{{Box Note | You will need to unload all your sound modules and reload them for the changes to take effect. It might be easier to reboot. Your choice. }}<br />
<br />
Install the alsa-utils package:<br />
# pacman -S alsa-utils<br />
Also, you may want to install the alsa-oss package, which wraps applications written for [[OSS]] in a compatibility library, allowing them to work with [[ALSA]]. To install the alsa-oss package:<br />
# pacman -S alsa-oss <br />
Did you add your normal user to the audio group? If not, use <code>/usr/bin/gpasswd</code>. As root do:<br />
# gpasswd -a ''yourusername'' audio<br />
As '''''normal, non-root''''' user, invoke <code>/usr/bin/alsamixer</code>:<br />
# su - ''yourusername'' <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Some machines, (like the Thinkpad T61), have a '''Speaker''' channel which must be unmuted and adjusted as well. Leave alsamixer by pressing ESC. <br />
==== Sound test ====<br />
Ensure your speakers are properly connected, and test your sound configuration as normal user using <code>/usr/bin/aplay</code>:<br />
$ aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, &quot;Front, center.&quot;<br />
==== Saving the Sound Settings ====<br />
Exit your normal user shell and run <code>/usr/sbin/alsactl</code> as root:<br />
$ exit<br />
# alsactl store<br />
This will create the file '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
# nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Step 2: Install X===<br />
The '''X''' Window System version 11 (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
<br />
# pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
<br />
====A: Install X====<br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
# pacman -S xorg<br />
With newer versions of xorg, it is suggested (and possibly necessary in most cases) to install the input driver evdev, which should be installed as a dependency for xorg-server, but many seem to be lacking somehow:<br />
# pacman -S xf86-input-evdev<br />
The 3d utilities glxgears and glxinfo are included in the '''mesa''' package:<br />
# pacman -S mesa<br />
<br />
====B: Install Video Driver Package====<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
You will need knowledge of which video chipset your machine has. If you do not know, use the <code>/usr/sbin/lspci</code> program:<br />
# lspci | grep VGA<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
# pacman -Ss xf86-video | less<br />
Here is a list of '''open source''' drivers, and the corresponding video chipsets.<br />
*'''xf86-video-apm''' &mdash; Alliance ProMotion video driver<br />
*'''xf86-video-ark''' &mdash; ark video driver<br />
*'''xf86-video-ati''' &mdash; ATI(AMD) video driver<br />
**'''xf86-video-r128''' &mdash; ATI(AMD) video driver for X.org ati Rage128 video<br />
**'''xf86-video-mach64''' &mdash; ATI(AMD) video driver for X.org mach64 video<br />
*'''xf86-video-chips''' &mdash; Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' &mdash; Cirrus Logic video driver<br />
*'''xf86-video-dummy''' &mdash; dummy video driver<br />
*'''xf86-video-fbdev''' &mdash; framebuffer video driver<br />
*'''xf86-video-glint''' &mdash; GLINT/Permedia video driver<br />
*'''xf86-video-i128''' &mdash; Number 0 i128 video driver<br />
*'''xf86-video-i740''' &mdash; Intel i740 video driver<br />
*'''xf86-video-i810''' &mdash; Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' &mdash; Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-intel-legacy''' &mdash; Legacy-driver for older intel cards as 82865G (xf86-video-intel currently crashes with older cards)<br />
*'''xf86-video-imstt''' &mdash; Integrated Micro Solutions Twin Turbo video driver<br />
*'''xf86-video-mga''' &mdash; mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' &mdash; neomagic video driver<br />
*'''xf86-video-nv''' &mdash; Nvidia nv video driver<br />
*'''xf86-video-nouveau''' &mdash; Open Source 3D acceleration driver for nVidia cards (experimental), check: [http://nouveau.freedesktop.org/wiki/] for Current Status<br />
*'''xf86-video-openchrome''' &mdash; VIA/S3G UniChrome, UniChrome Pro and Chrome9 video driver<br />
*'''xf86-video-rendition''' &mdash; Rendition video driver<br />
*'''xf86-video-s3''' &mdash; S3 video driver<br />
*'''xf86-video-s3virge''' &mdash; S3 Virge video driver<br />
*'''xf86-video-savage''' &mdash; savage video driver<br />
*'''xf86-video-siliconmotion''' &mdash; siliconmotion video driver<br />
*'''xf86-video-sis''' &mdash; SiS video driver<br />
*'''xf86-video-sisusb''' &mdash; SiS USB video driver<br />
*'''xf86-video-tdfx''' &mdash; tdfx video driver<br />
*'''xf86-video-trident''' &mdash; Trident video driver<br />
*'''xf86-video-tseng''' &mdash; tseng video driver<br />
*'''xf86-video-unichrome''' &mdash; VIA S3 Unichrome video drivers<br />
*'''xf86-video-v4l''' &mdash; v4l video driver<br />
*'''xf86-video-vesa''' &mdash; vesa video driver<br />
*'''xf86-video-vga''' &mdash; VGA 16 color video driver<br />
*'''xf86-video-vmware''' &mdash; vmware video driver<br />
*'''xf86-video-voodoo''' &mdash; voodoo video driver<br />
<br />
'''''Note''''': The '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa ''should'' work.<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
# pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
*If you have an NVIDIA or ATI graphics card you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered below.'''.<br />
*If you do not want to install the proprietary drivers or do not have an NVIDIA or ATI graphics card, you should skip down to '''[[#Step 3: Configure X|Step 3: Configure X]]'''.<br />
<br />
-----<br />
<br />
<br />
=====NVIDIA Graphics Cards=====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has several different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-96xx''' ''slightly newer cards up to the GF 4.''<br />
<br />
'''2. nvidia-173xx''' ''Geforce FX series cards''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF FX''<br />
<br />
{{Box Note| Nvidia-71xx series proprietary drivers, which are required by extremely old cards like TNT and TNT2, have been removed because they do not work with the new Xorg that Arch makes use of and nvidia has discontinued support for such. You should use the xf86-video-nv or xf86-video-vesa drivers instead.}}<br />
<br />
Consult the NVIDIA website to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
# pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
# nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
# nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option &quot;RenderAccel&quot; &quot;true&quot;<br />
Option &quot;NoLogo&quot; &quot;true&quot;<br />
Option &quot;AGPFastWrite&quot; &quot;true&quot;<br />
Option &quot;EnablePageFlip&quot; &quot;true&quot;<br />
Make sure all instances of DRI are commented out:<br />
# Load &quot;dri&quot;<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies using <code>/sbin/depmod</code>:<br />
# depmod -a<br />
(A reboot may be necessary.)<br />
{{Tip|Advanced instructions for NVIDIA configuration can be found in the [[NVIDIA]] article.}}<br />
<br />
You may now continue with '''[[#Step 3: Configure X|Step 3: Configure X]]''' to familiarize yourself further, or continue the installation process with '''[[#C: Test X|Test X]]'''.<br />
<br />
=====ATI Graphics Cards=====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
<br />
Install the '''open-source''' ATI Driver with<br />
# pacman -S xf86-video-ati<br />
<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
<br />
The proprietary ATI driver '''Catalyst''' was once a precompiled package offered by Arch in the <code>extra</code> repository, but as of March 2009, official support has been dropped because of dissatisfaction with the quality and speed of development of the proprietary driver.The catalyst driver is now available in [http://aur.archlinux.org/packages.php?ID=22899 AUR]. Installation information for Catalyst driver is available [[ATI#Proprietary_ATI_Catalyst_driver | here]]<br />
<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option &quot;AIGLX&quot; &quot;True&quot; to Section ServerFlags.}}<br />
{{Tip|Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].}}<br />
<br />
<br />
====C: Install Input Driver Packages====<br />
The latest X requires you to install drivers for your input devices, keyboard and mouse included. For a complete list of available input drivers,<br />
# pacman -Ss xf86-input | less<br />
<br />
For most users, xf86-input-keyboard and xf86-input-mouse should be sufficient for a basic setup. Use pacman to install your desired drivers for your input devices. e.g.:<br />
# pacman -S xf86-input-keyboard<br />
<br />
===Step 3: Configure X===<br />
<br />
====A: The xorg.conf file====<br />
<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
<br />
Since X11R7.2 the X.Org X Server features autoconfiguration. Therefore, it can function without an xorg.conf file in many cases. ''If'' the autoconfiguration ''works satisfactorily'' and you do not need to specify special features such as aiglx, compositing and so forth, you may forgo creating an xorg.conf file.<br />
<br />
=====Standard xorg.conf generation=====<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the <code>/usr/bin/Xorg</code> program with the -configure option to generate a basic config file; As root, do:<br />
# Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
Copy the file to <code>/etc/X11/</code>:<br />
# cp /root/xorg.conf.new /etc/X11/xorg.conf<br />
<br />
=====Alternative xorg.conf generation=====<br />
<br />
Newer versions of the Xorg Server(>1.6) do not include the /usr/bin/xorgconfig or /usr/bin/xorgcfg scripts. If you run into problems generating/using an xorg.conf file, you might want to consider using this guide.<br />
<br />
See the [[Xorg#Without_xorg.conf|article on X.Org, section "Without xorg.conf"]].<br />
<br />
* Note that if you are in possession of a properly configured xorg.conf under another distribution and with the same Xorg version, you may easily copy it over to your current Arch system's <code>/etc/X11/</code> directory.<br />
<br />
====B: Input hotplugging====<br />
<br />
Input hotplugging is supported since the 1.4 version of the X.Org X Server and enabled by default. When enabled, X will utilize hal to allow for the hotplugging and removal of human interface devices without having to restart X. <br />
<br />
{{Warning | Starting the '''X''' server using input hotplugging without the '''HAL''' daemon installed and running may result in the inability to use the mouse and/or keyboard, and the '''X''' server appearing to freeze as a result .}}<br />
<br />
You must decide whether you will use input hotplugging (enabled by default), or disable it. Input hotplugging is convenient for many users, especially those with mobile machines like laptops and netbooks. Other users may wish to disable it in favor of manual or more static device configuration within /etc/xorg.conf.<br />
<br />
{{Tip | See the article on [[Xorg input hotplugging]] for full details.}}<br />
<br />
=====Using input hotplugging=====<br />
<br />
Install HAL and the evdev input driver:<br />
# pacman -S hal xf86-input-evdev<br />
<br />
Set the keyboard layout (if you do not use a standard US keyboard)<br />
# cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/<br />
# nano /etc/hal/fdi/policy/10-keymap.fdi<br />
Edit the &quot;input.xkb.layout&quot; key and possibly the &quot;input.xkb.variant&quot; key in this file.<br />
<br />
Laptop users will also need the synaptics package to allow X to configure the touchpad:<br />
# pacman -S xf86-input-synaptics<br />
<br />
{{Tip|For instructions on fine tuning or troubleshooting touchpad settings, see the [[Touchpad Synaptics]] article.}}<br />
<br />
<br />
'''The HAL daemon'''<br />
<br />
The hal daemon '''must''' be started '''before''' the '''X''' server:<br />
# /etc/rc.d/hal start<br />
Add the hal daemon to the DAEMONS array in /etc/rc.conf to start it at every boot.<br />
<br />
=====Disable input hotplugging=====<br />
Disabling input hotplugging will skip devices detected by hal and will use the keyboard/mouse configuration from xorg.conf:<br />
# nano /etc/X11/xorg.conf<br />
add the following:<br />
Section &quot;ServerFlags&quot;<br />
Option &quot;AutoAddDevices&quot; &quot;False&quot;<br />
EndSection<br />
<br />
======Set the keyboard layout if not using a standard US keyboard======<br />
Add option lines in the &quot;InputDevice&quot; section of the /etc/X11/xorg.conf file specifying the keyboard layout and variant:<br />
Option &quot;XkbLayout&quot; &quot;be&quot;<br />
Option &quot;XkbVariant&quot; &quot;&quot;<br />
<br />
Alternative method using the setxkbmap command:<br />
# setxkbmap pl <br />
(with the proper keyboard layout instead of <code>pl</code> of course) should switch your keyboard layout in x.<br />
To make this permanent, add this command to <code>/home/<youruser>/.xinitrc</code> before starting the window manager (before command like <code>exec startxfce4</code>).<br />
<br />
====C: Test X====<br />
<br />
First, read the warning about input hotplugging in the previous section. To test the X server, run the '''X''' script with the ''-config'' flag against the ''path/to/xorg.conf'' file. e.g.:<br />
# X -config /etc/X11/xorg.conf<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
{{Box Note| Some users have found after the upgrade to Xorg 1.6 that this test fails (no hollow X appears and no capacity for cursor movement is enabled), but this does not indicate a problem with the installation of X. You may want to double check by running the next test in this guide.}}<br />
<br />
{{Box Note| With Xorg 1.6 CTRL-Alt-Backspace has been deprecated and will not work to exit out of this test. A somewhat messy work around is to switch to a different virtual console (CTRL-Alt-F2, for example) and then switch back to the console the test is running in (probably CTRL-Alt-F1). You will then be able to use CTRL-C to kill the X test. You can enable CTRL-Alt-Backspace by editing xorg.conf, as described [http://wiki.archlinux.org/index.php/Xorg#Ctrl-Alt-Backspace_doesn.27t_exit_X here].}}<br />
<br />
=====In case of errors=====<br />
<br />
Inspect the config file:<br />
<br />
# nano /etc/X11/xorg.conf<br />
<br />
Ensure the video driver is properly specified. e.g.:<br />
Section &quot;Device&quot;<br />
<br />
...<br />
<br />
Driver &quot;savage&quot;<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section &quot;Monitor&quot;. If not, add them:<br />
Section &quot;Monitor&quot;<br />
Identifier &quot;Monitor0&quot;<br />
VendorName &quot;Monitor Vendor&quot;<br />
ModelName &quot;Monitor Model&quot;<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If these specs are unknown, consult the documentation of the computer monitor.)<br />
<br />
Specify your default color depth under section &quot;Screen&quot;:<br />
Section &quot;Screen&quot;<br />
Identifier &quot;Screen0&quot;<br />
Device &quot;Card0&quot;<br />
Monitor &quot;Monitor0&quot;<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your &quot;Display&quot; subsection, at least under the Depth 24 header, e.g.:<br />
SubSection &quot;Display&quot;<br />
Viewport 0 0<br />
Depth 24<br />
Modes &quot;1024x768&quot; &quot;800x600&quot; &quot;640x480&quot;<br />
Add the following section, if eye candy which requires the composite extension is desired: <br />
Section &quot;Extensions&quot;<br />
Option &quot;Composite&quot; &quot;Enable&quot;<br />
EndSection<br />
Try the config again, after modifying:<br />
# X -config /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
* '''Using wgetpaste'''<br />
If you are still having trouble after consulting the [[Xorg]] article and need assistance via the Arch forums, be sure to install and use wgetpaste:<br />
<br />
# pacman -S wgetpaste<br />
Use wgetpaste and provide links for the following files when asking for help in your forum post:<br />
* ~/.xinitrc<br />
* /etc/X11/xorg.conf<br />
* /var/log/Xorg.0.log.old<br />
Use wgetpaste like so:<br />
$ wgetpaste </path/to/file><br />
Post the corresponding links given within your forum post. Be sure to provide appropriate hardware and driver information as well.<br />
<br />
===Simple baseline X test(if necessary)===<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to successfully start '''X''' from the command line before installing a complete desktop environment, you can do so by configuring ~/.xinitrc to invoke '''Xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages. More advanced users who are comfortable with '''X''' configuration may choose to skip this optional step.<br />
==== Prepare for the test by configuring ~/.xinitrc====<br />
<br />
One of the main functions of this file is to dictate what '''X''' Window client is invoked with the '''/usr/bin/startx''' and/or '''/usr/bin/xinit''' program ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) There are vast amounts of additional configurable specifications and commands that may also be added to ~/[[.xinitrc]] as you further customize your system. <br />
{{Box Note | '''[[.xinitrc]]''' is a so-called 'dot' (.) file. Files in a UNIX filesystem which are preceded with a dot (.) are 'hidden', and will not show up with a regular 'ls' command, usually for the sake of keeping directories tidy. Dot files may be seen by issuing '''ls -a'''. The 'rc' denotes ''Run Commands'' and simply indicates that it is a configuration file. Since it controls how a program runs, it is (although historically incorrect) also said to stand for &quot;Run Control&quot;.}}<br />
<br />
'''startx/xinit''' will start the '''X''' server and clients. To determine the client to run, '''startx/xinit''' will first look to parse a [[.xinitrc]] file in the user's home directory. In the absence of file ~/[[.xinitrc]], it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/[[.xinitrc]] file, a TWM session will start.) Further details in the [[.xinitrc]] wiki entry.<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
# su - ''yourusername''<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
* If you installed from a fresh (Core) install, it does not include the X window manager, so .xinitrc does not exist in /etc/skel. Instead, use the sample provided [[Xinitrc#A_standard_.xinitrc | here]] <small>(If you've followed the guide step by step you should have a basic .xinitrc file in /etc/skel)</small>.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
$ cp /etc/skel/[[.xinitrc]] ~/<br />
Edit the file: <br />
$ nano ~/.xinitrc<br />
and add &quot;<code>exec xterm</code>&quot; so that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
#<br />
exec xterm<br />
<br />
{{Box Note | ''Be sure to have only '''one''' uncommented '''exec''' line in your ~/.xinitrc''.}}<br />
Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
====Perform the test====<br />
<br />
Test your configurations by starting '''X''' as '''normal, non-root''' user, with:<br />
<br />
$ startx<br />
or<br />
$ xinit<br />
<br />
You should have an '''xterm''' session open up. You can test your keyboard and its layout in it.<br />
<br />
You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing &quot;exit&quot;. If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
{{Tip|Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.}}<br />
<br />
==Part IV: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides a window manager, icons, applets, windows, toolbars, folders, wallpapers, a suite of applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
* '''[[#LXDE|LXDE]]''' is a minimal DE based on the Openbox window manager. It provides most things you need for a modern desktop while keeping relatively low system resource usage. LXDE is a good choice for those who want a quick way of setting up a pre-configured Openbox system.<br />
<br />
If you desire a lighter, less demanding GUI to configure manually, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT include such features as panels, applets, icons, applications, etc., by default.<br />
* Lightweight floating WM's include: [[#Openbox|'''Openbox''']], [[#Fluxbox|'''Fluxbox''']], [[#fvwm2|'''fvwm2''']], [[PekWM|'''pekwm''']], [[Evilwm|'''evilwm''']], '''Windowmaker, and TWM'''.<br />
* If you need something completely different, try a tiling WM like [[Awesome|'''awesome''']], [[Ion3|'''ion3''']], [[Wmii|'''wmii''']], [[Dwm|'''dwm''']], [[Xmonad|'''xmonad''']], or [[Ratpoison|'''ratpoison''']].<br />
<br />
===Step 1: Install Fonts===<br />
At this point, you may wish to save time by installing visually pleasing, true type fonts, before installing a desktop environment/window manager. Dejavu and bitstream-vera are good, general-purpose font sets. You may also want to have the Microsoft font sets, which are especially popular on websites. <br />
<br />
Install with:<br />
# pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===Step 2: ~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to specify the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell, in the future, to open your DE/WM of choice:<br />
<br />
$ nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below:<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The &quot;exec&quot; prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
If you have trouble with automounting, use the following command instead. Replace "startxfce4" with the command that is appropriate for your window manager.<br />
exec ck-launch-session startxfce4<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc.<br />
<br />
===Step 3: Install a Desktop Environment===<br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
* [[#GNOME|'''GNOME''']]<br />
* [[#KDE|'''KDE''']]<br />
* [[#Xfce|'''Xfce''']]<br />
* [[#LXDE|'''LXDE''']]<br />
* [[#Openbox|'''Openbox''']]<br />
* [[#Fluxbox|'''Fluxbox''']]<br />
* [[#fvwm2|'''fvwm2''']]<br />
<br />
====GNOME====<br />
=====About GNOME=====<br />
The '''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. The GNOME project provides two things: The GNOME desktop environment, an intuitive and attractive desktop for end-users, and the GNOME development platform, an extensive framework for building applications that integrate into the rest of the desktop.<br />
<br />
=====Installation=====<br />
Install the base GNOME environment with:<br />
# pacman -S gnome<br />
<br />
Additionally, you can install the extras:<br />
# pacman -S gnome-extra<br />
<br />
It's safe to choose all packages shown in the extra package.<br />
<br />
=====Useful DAEMONS for GNOME=====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. Some users prefer to use the '''hal''' daemon. The '''hal''' daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The '''fam''' daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. Both '''hal''' and '''fam''' can make life easier for the GNOME user. The hal and fam packages are installed when you install GNOME, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
# /etc/rc.d/hal start<br />
<br />
# /etc/rc.d/fam start<br />
<br />
Add them to your /etc/rc.conf DAEMONS section, so they will be invoked at boot:<br />
# nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
(If you prefer to log into the console and manually start X, leave out gdm.)<br />
<br />
<br />
You may want to install a graphical login manager. For GNOME, the '''gdm''' daemon is a good choice. <br />
<br />
As root:<br />
# pacman -S gdm<br />
<br />
As normal user, start X:<br />
$ startx<br />
or<br />
$ xinit<br />
If ~/.xinitrc is not configured for GNOME, you may always start it with '''xinit''', followed by the path to GNOME:<br />
$ xinit /usr/bin/gnome-session<br />
<br />
{{Tip|Advanced instructions for installing and configuring GNOME can be found in the [[Gnome]] article.}}<br />
<br />
Congratulations! Welcome to your GNOME desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[Beginners Guide Appendix#Tweaks.2FFinishing_touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
=====Eye Candy=====<br />
By default, GNOME does not come with many themes and icons. You may wish to install some more attractive artwork for GNOME:<br />
<br />
A nice gtk (gui widget) theme engine (includes themes) is the murrine engine. Install with:<br />
# pacman -S gtk-engine-murrine<br />
<br />
Optional for more themes:<br />
# pacman -S murrine-themes-collection <br />
<br />
Once it has been installed, select it with System -> Preferences -> Appearance -> Theme tab.<br />
<br />
The Arch Linux repositories also have a few more nice themes and engines. Install the following to see for yourself:<br />
<br />
# pacman -S gtk-engines gtk-aurora-engine gtk-candido-engine gtk-rezlooks-engine<br />
<br />
You can find many more themes, icons, and wallpapers at [http://www.gnome-look.org GNOME-Look].<br />
<br />
====KDE====<br />
=====About KDE=====<br />
The '''K''' '''D'''esktop '''E'''nvironment. KDE is a powerful Free Software graphical desktop environment for GNU/Linux and <code>UNIX</code> workstations. It combines ease of use, contemporary functionality, and outstanding graphical design with the technological superiority of <code>UNIX</code>-like operating systems.<br />
<br />
=====Installation=====<br />
Choose one of the following, then continue below with '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
1. The package '''kde''' is the official and complete vanilla KDE 4.2 residing under the Arch [extra] repo.<br />
<br />
Install base kde (kdm in kdebase-workstation): <br />
# pacman -S kdebase<br />
Install the whole: <br />
# pacman -S kde<br />
<br />
2. Alternatively, there exists a project called '''KDEmod''' (recently referred to collectively as the Chakra project). It is an Arch Linux exclusive, community-driven system, designed for modularity and offers a choice between KDE 3.5.10 or 4.x.x. KDEmod can be installed with pacman, after adding the proper repository to /etc/pacman.conf. The project website, including complete installation instructions, can be found at [http://www.chakra-project.org/ http://www.chakra-project.org/].<br />
<br />
=====Useful KDE DAEMONS=====<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services.<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) daemon for optimal functionality. The hal daemon, among other things, will facilitate the automatic mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The hal package is installed when you install xorg-server, but must be invoked to become useful.<br />
<br />
The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
-----<br />
<br />
Start hal:<br />
# /etc/rc.d/hal start<br />
<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS array in /etc/rc.conf:<br />
# nano /etc/rc.conf<br />
Add '''hal''' to your DAEMONS array, to invoke it on boot. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng '''hal''' network crond alsa '''kdm''')<br />
{{Box Note|If you installed KDEmod3 instead of normal KDE, use kdm3 instead of kdm.}}<br />
<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on boot by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X, leave out kdm, or comment it out with a bang, ( ! ).<br />
<br />
Now try starting your X Server as normal user:<br />
$ startx<br />
or<br />
$ xinit<br />
{{Tip|Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.}}<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[Beginners Guide Appendix|The Beginners Guide Appendix]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
====Xfce====<br />
=====About Xfce=====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and fast. Xfce is great for older hardware, and will perform excellently on newer machines as well.<br />
<br />
=====Installation=====<br />
Install Xfce: <br />
# pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
# pacman -S xfce4-goodies gtk2-themes-collection<br />
Note: '''xfce4-xfapplet-plugin''' (a plugin that allows the use of GNOME applets in the Xfce4 panel) is part of the '''xfce4-goodies''' group and depends on '''gnome-panel''', which in turn depends on '''gnome-desktop'''. You may wish to take this into consideration before installing, since it represents a significant number of extra dependencies.<br />
<br />
If you wish to admire 'Tips and Tricks' on login, install the '''fortune-mod''' package:<br />
# pacman -S fortune-mod<br />
<br />
=====Useful DAEMONS=====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. Some Xfce users prefer to use the '''hal''' daemon. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
# /etc/rc.d/hal start<br />
<br />
# /etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS array in /etc/rc.conf:<br />
# nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS array, to invoke them at boot.<br />
<br />
{{Tip|Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.}}<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]. Otherwise you can login in via the console and run:<br />
<br />
$ startxfce4<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
====LXDE====<br />
=====About LXDE=====<br />
LXDE, (for ''L''ightweight ''X''11 ''D''esktop ''E''nvironment), is a new project focused on providing a modern desktop environment which aims to be lightweight, fast, intuitive and functional while keeping system resource usage low. LXDE is quite different from other desktop environments, since each component of LXDE is a discrete and independent application, and each can be easily substituted by other programs. This modular design eliminates all unnecessary dependencies and provides more flexibility. Details and screenshots available at: http://lxde.org/ <br />
<br />
LXDE provides:<br />
# The OpenBox windowmanager<br />
# PCManFM File manager<br />
# LXpanel system panel<br />
# LXSession session manager<br />
# LXAppearance GTK+ theme switcher<br />
# GPicView image viewer<br />
# Leafpad simple text editor<br />
# XArchiver: Lightweight, fast, and desktop-independent gtk+-based file archiver<br />
# LXNM (still under development): Lightweight network manager for LXDE supporting wireless connections<br />
These lightweight and versatile tools combine for quick setup, modularity and simplicity.<br />
<br />
Install LXDE with: <br />
# pacman -S lxde<br />
Add:<br />
exec startlxde<br />
*If you plan on running '''nm-applet''', the following command should be used instead<br />
exec ck-launch-session startlxde<br />
to your ~/.xinitrc and start with ''startx'' or ''xinit''<br />
<br />
{{Tip | Further information available at the [[LXDE]] wiki article.}}<br />
<br />
====*box====<br />
=====Fluxbox=====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
# pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
=====Openbox=====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
# pacman -S openbox<br />
Additional configuration tools are also available, if desired:<br />
# pacman -S obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
# su - ''yourusername''<br />
$ mkdir -p ~/.config/openbox/<br />
$ cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
$ cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
'''rc.xml''' is the main configuration file for OpenBox. It may be manually edited, (or you can use OBconf). '''menu.xml''' configures the right-click menu.<br />
<br />
You may log into OpenBox via graphical login using KDM/GDM, or from the shell using '''startx''', in which case you will need to edit your ~/.xinitrc (as non-root user) and add the following:<br />
<br />
exec openbox-session<br />
<br />
NOTE: If you plan on running dbus (which is required by hal) then make sure your ~/.xinitrc reads:<br />
<br />
exec dbus-launch --exit-with-session openbox-session<br />
<br />
You may also start OpenBox from the shell using '''xinit''':<br />
$ xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Some useful, lightweight programs for OpenBox are:<br />
* PyPanel, Tint2, or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager (also provides simple icons)<br />
* PcmanFM a lightweight but versatile file manager (also provides desktop icon functionality)<br />
* iDesk (available in [[AUR]]) for providing desktop icons<br />
* Graveman for burning CD's or DVD's<br />
<br />
{{Tip | More information is available in the [[Openbox]] article.}}<br />
<br />
====fvwm2====<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
# pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
==Useful Applications==<br />
To install useful apps, codecs and plugins, see [[Useful Applications]].<br />
<br />
=APPENDIX=<br />
See [[Beginners Guide Appendix]]</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Dual_boot_with_Windows&diff=70733
Dual boot with Windows
2009-06-17T15:52:26Z
<p>Zatricky: warning re large games in Windows</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Windows_and_Arch_Dual_Boot}}<br />
{{i18n_entry|Русский|Двойная загрузка: Windows и Arch}}<br />
{{i18n_links_end}}<br />
<br />
== Windows and Arch Dual Booting: ==<br />
<br />
In this example, we will install Windows first, and subsequently install the GRUB bootloader along with Arch, allowing for dual boot.<br />
<br />
Installation will be standard, but there are a few things to keep in mind:<br />
<br />
1. You will have to use logical partitions for some of our partitions, because there can only be up to 4 primary partitions per disk.<br />
<br />
2. '''Very Important''': Remember to write down your partitions numbers: "sda1, sda2... sda8", noting which type of partitions belong to their relevant number. For example:<br />
sda1: Windows (30GB should be enough. Many new games exceed 10GB each so bear this in mind)<br />
<br />
sda2: /boot (100MB is plenty)<br />
<br />
sda3: / (about 10-16GB is good)<br />
<br />
sda4: swap (between 512MB and 1024MB)<br />
<br />
sda5: /home (use rest of hard drive)<br />
<br />
It is important to note that there is a 1024 cylinder limit with some older BIOSs. This means that the BIOS cannot access things beyond the 1024th cylinder (about 8.5GB), so the /boot partition should be in the first 8.5GB (space before Windows partition). [http://gparted.sourceforge.net/livecd.php GParted LiveCD] or a partitioning tool in [http://www.sysresccd.org/Main_Page SystemRescueCd] are useful for moving and resizing partitions to accommodate this.<br />
<br />
3. When installing grub, you must configure /boot/grub/menu.lst), and make sure to install grub to /boot (or root (/) if you did not create a separate partition for /boot). There should be about three lines at the end of the file that speak about chainloading to boot other OSs, these can most generally be uncommented if you follow above convention, this would place windows boot point at hd0,0 or sda1. Thus you would have something akin to this:<br />
<br />
# Windows XP<br />
title Windows XP<br />
rootnoverify (hd0,0)<br />
chainloader +1<br />
<br />
The parts of this entry break down as follows:<br />
<br />
'''''title Windows XP''''' <<--Can be anything you like, it will just be what is displayed in the grub bootup screen<br />
<br />
'''''rootnoverify (hd0,0)''''' <<--Remember the partition numbers we wrote down, here you write in the partition number of your windows partition. This sets the windows boot at root, even though GRUB cannot read it.<br />
<br />
'''''chainloader +1''''' <<-- What this does is call the Windows boot loader that is still in MBR in our case, since GRUB cannot boot Windows itself.<br />
<br />
'''REMEMBER:''' The file is read from the top down, so the system listed first will be the one to auto boot, if no keys are pressed during the grub boot screen.<br />
<br />
'''NOTE:'''GRUB uses a zero indexed system of numbering drives and partitions, which is a different convention than you may be used to seeing:<br />
First disk, first partition = sda1 = hd0,0<br />
First disk, second partition = sda2 = hd0,1<br />
Second disk, first partition = sdb1 =hd1,0<br />
<br />
==Dual Booting from Multiple Hard Drives==<br />
To dual boot from two separate hard drives (e.g. one dedicated Linux drive and one dedicated Windows drive) and Windows is not on the first hard drive, the Windows boot loader must be "tricked" into thinking Windows is on the first hard drive. Do this by adding the following lines to your menu.lst config file:<br />
<br />
map (hd0) (hd1)<br />
map (hd1) (hd0)<br />
<br />
So the entry for Windows on second disk, first partition will look like this:<br />
<br />
title Microsoft Windows XP Professional<br />
root (hd1,0)<br />
savedefault<br />
makeactive<br />
map (hd0) (hd1)<br />
map (hd1) (hd0)<br />
chainloader +1<br />
<br />
More information on GRUB configuration can be found in [http://www.gnu.org/software/grub/manual/grub.html the GRUB manual].<br />
<br />
==Other Layouts ==<br />
1. Actually you could just use:<br />
sda1 <-WinXP<br />
<br />
sda2 <-swap<br />
<br />
sda3 <-/ (Arch)<br />
<br />
sda4 <-/home (optional)<br />
<br />
and not use an extended(logical) partition (as /boot will be in the /root portion as well).<br />
<br />
2. LVM (Linux Volume Management) is also a possibility to use, it works fine with arch, you could simply create a single LVM partition and let it create the other partitions inside it. This allows a single partition to hold all your needed GNU/Linux stuff, also allows you to easily resize any of them if it becomes necessary.<br />
<br />
==Notes on /home ==<br />
You may not wish to store you documents on this mountpoint, especially if you wish to share data between both Windows and Arch Linux. Historically, this was done on a FAT partition because writing to NTFS was still experimental. [http://www.ntfs-3g.org/ NTFS-3G] now offers stable writing to NTFS partitions, so you can just leave this as another partition that will be shared by both Windows and arch. Another option would be to use some of the tools in Windows, such as [http://www.fs-driver.org/ fs-driver] and use an ext3 or ext2 partition to store documents (fs-driver will mount ext3 partitions as ext2, so you will not be able to take advantage of journaling while in Windows).<br />
<br />
==Other Options ==<br />
Another option is sort of the reverse of what is described at the beginning of this article where GRUB loads the Windows boot loader, which then loads Windows. Under this option, the Windows boot loader load GRUB, which then loads arch. For information on this method see http://www.geocities.com/epark/linux/grub-w2k-HOWTO.html. I do not believe there are any distinct advantages of this method over the previous one, you will still need a /boot partition, and this one is arguably more difficult to setup.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Bash&diff=69366
Talk:Bash
2009-05-24T15:41:29Z
<p>Zatricky: fixed</p>
<hr />
<div></div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Bash&diff=69275
Talk:Bash
2009-05-23T22:29:24Z
<p>Zatricky: contra advice</p>
<hr />
<div><br />
== Forum contra-indication regarding enabling bash completion ==<br />
<br />
Post by peart at http://bbs.archlinux.org/viewtopic.php?pid=547051#p547051 indicates that inserting the extra lines into .bashrc is redundant. Has anyone tested this?<br />
<br />
I'm also asking there anyway.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:USB_flash_installation_medium&diff=58884
Talk:USB flash installation medium
2009-01-22T14:28:34Z
<p>Zatricky: </p>
<hr />
<div>I was not able to boot my Thinkpad X31 from USB stick without the lilo part first.<br />
I understood it like that: syslinux puts a bootloader at the beginning of the first partition, but nothing in the MBR, so when you try booting from the stick, the bootloader cannot be found.<br />
-anonymous<br />
<br />
Shouldn't the info that you need to select boot from usbdisk in BIOS be selected for this to work be mentioned? Or isn't it needed to be able to boot from an usb disk? If it's needed perhaps one could get grub and/or lilo to bootup an usb disk if the BIOS didn't support it and so how one would do that would also be needed as information.<br />
-nut543<br />
<br />
What about merging this article with [[Usb Drive Arch Install]]?<br />
-Thujone<br />
<br />
== Does not work anymore... ==<br />
<br />
I was unable to run the new "live" arch-core-install-2008.04-rc-i686.iso off the USB stick. I've copied the kernel, initrd, and .squashfs files to the stick, and added a minimal entry in syslinux.cfg. Kernel + initrd boot fine, I even saw that the USB disk is detected, partitions parsed, and /dev/ entries created, but then init halts with something like 'unable to find /dev/cd/*'. I've spent few minutes reading the initialisation code, but didn't find a kernel commandline option to override it. I'm sure there is some easy way to make it work, but the process of mounting the CD-ROM should probably be implemented in a more robust way, so the initrd code finds and mounts the compressed filesystem even when booting from USB HDD.<br />
<br />
== Verifying the USB ==<br />
<br />
Before and after having performed the dd onto the USB disk, check that the md5sums are correct. For example:<br />
<br />
- $ md5sum archlinux-2008.06-core-x86_64.img && echo && cat md5sums.x86_64<br />
<br />
The next command will give similar results, but will also let you confirm that the data was written correctly and can be read correctly:<br />
- dd if=/dev/sdb count=661159 status=noxfer | md5sum && echo && cat md5sums.x86_64<br />
<br />
--[[User:Zatricky|Zatricky]] 06:45, 22 January 2009 (EST)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:USB_flash_installation_medium&diff=58868
Talk:USB flash installation medium
2009-01-22T11:45:19Z
<p>Zatricky: Verifying the USB</p>
<hr />
<div>I was not able to boot my Thinkpad X31 from USB stick without the lilo part first.<br />
I understood it like that: syslinux puts a bootloader at the beginning of the first partition, but nothing in the MBR, so when you try booting from the stick, the bootloader cannot be found.<br />
-anonymous<br />
<br />
Shouldn't the info that you need to select boot from usbdisk in BIOS be selected for this to work be mentioned? Or isn't it needed to be able to boot from an usb disk? If it's needed perhaps one could get grub and/or lilo to bootup an usb disk if the BIOS didn't support it and so how one would do that would also be needed as information.<br />
-nut543<br />
<br />
What about merging this article with [[Usb Drive Arch Install]]?<br />
-Thujone<br />
<br />
== Does not work anymore... ==<br />
<br />
I was unable to run the new "live" arch-core-install-2008.04-rc-i686.iso off the USB stick. I've copied the kernel, initrd, and .squashfs files to the stick, and added a minimal entry in syslinux.cfg. Kernel + initrd boot fine, I even saw that the USB disk is detected, partitions parsed, and /dev/ entries created, but then init halts with something like 'unable to find /dev/cd/*'. I've spent few minutes reading the initialisation code, but didn't find a kernel commandline option to override it. I'm sure there is some easy way to make it work, but the process of mounting the CD-ROM should probably be implemented in a more robust way, so the initrd code finds and mounts the compressed filesystem even when booting from USB HDD.<br />
<br />
== Verifying the USB ==<br />
<br />
Before and after having performed the dd onto the USB disk, check that the md5sums are correct. For example:<br />
<br />
$ md5sum archlinux-2008.06-core-x86_64.img && echo && cat md5sums.x86_64<br />
0c587f747646723f75c64c2317e8d651 archlinux-2008.06-core-x86_64.img<br />
<br />
0c587f747646723f75c64c2317e8d651 archlinux-2008.06-core-x86_64.img<br />
0c5b426e9cf7628aece3d76c4ded3912 archlinux-2008.06-core-x86_64.iso<br />
81918cbb55026645df065526faba982e archlinux-2008.06-ftp-x86_64.img<br />
921fed8e94c7432410a0b246dddfc0c4 archlinux-2008.06-ftp-x86_64.iso<br />
<br />
The next command will give similar results, but will also let you confirm that the data was written correctly and can be read correctly:<br />
$ dd if=/dev/sdb count=661159 status=noxfer | md5sum && echo && cat md5sums.x86_64<br />
<br />
--[[User:Zatricky|Zatricky]] 06:45, 22 January 2009 (EST)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Mirrors&diff=56118
Mirrors
2008-12-24T12:04:19Z
<p>Zatricky: /* South Africa */</p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|:Mirrors}}<br />
{{i18n_entry|简体中文|:Mirrors (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
== Enabling your favorite mirror ==<br />
<br />
The default pacman configuration for ''core'' looks like this:<br />
<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
If you want to use the HostEurope mirror as your default mirror, just add it before the <tt>Include</tt> line:<br />
<br />
[core]<br />
Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/i686</nowiki><br />
Include = /etc/pacman.d/mirrorlist<br />
<br><br />
'''edit:''' The release of pacman 3.1 introduced the /etc/pacman.d/mirrorlist with the variable $repo, no need to maintain separate list for each repository.<br />
<br />
Pacman will now try to connect to this mirror first. You can do the same for ''testing'', ''extra'', and ''community'''.<br />
<br />
'''Use the same mirror for all repositories. Otherwise packages may get installed that are incompatible to each other (like kernel26 from ''core'' and another (older) kernel module from ''extra'').'''<br />
<br />
== Mirror List ==<br />
<br />
This is a list of all known Arch Linux mirrors, that's more up to date than the [http://www.archlinux.org/download/ official download page] or the [http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/base/pacman/ files in <tt>/etc/pacman.d/</tt>]. If you know of a mirror that is not listed, please add it. Mirrors which are no longer updated or have been unavailable for a long time can be deleted.<br />
<br />
Here is a hint to check just how up-to-date your chosen mirror is:<br />
# pick a server and browse to "extra/os/"<br />
# load http://www.archlinux.org/ in another tab or window<br />
# compare the last-modified date of the "i686" directory on the mirror to the "Extra" date on the homepage, in the "Package Repositories" box to the right.<br />
<br><br />
Many sites also provide http service, but keep in mind that pacman relies on ftp to determine if a repository got updated. With http it fetches the repository database each time you run <tt>pacman -Sy</tt>, even if it didn't change since the last run.<br />
<br />
[http://users.archlinux.de/~gerbra/mirrorcheck.html This website] provides updates on the current status of the Arch mirrors and how up to date they are.<br />
<br />
'''Attention: Do not add new mirrors to the list below. If you want your mirror to be added to official list - file a feature request. In the meantime add it to the "Unofficial mirrors" list at the end of this page.'''<br />
<br />
=== Australia ===<br />
*http://mirror.aarnet.edu.au/pub/archlinux/ <sub>[http://mirror.aarnet.edu.au/pub/archlinux/ http]</sub> <sub>[rsync://mirror.aarnet.au/pub/archlinux/]</sub><br />
*http://mirror.optus.com.au/pub/archlinux/ <sub>[http://mirror.optus.com.au/pub/archlinux/ http]</sub> <sub>[rsync://mirror.optus.com.au/pub/archlinux/]</sub><br />
*http://ftp.iinet.net.au/pub/archlinux/ <sub>[http://ftp.iinet.net.au/pub/archlinux/ http]</sub> <sub>[rsync://ftp.iinet.net.au/archlinux/]</sub><br />
*http://mirror.pacific.net.au/linux/archlinux/ <sub>[http://mirror.pacific.net.au/linux/archlinux/ http]</sub> <sub>[rsync://mirror.pacific.net.au/linux/archlinux/]</sub><br />
*http://mirror.internode.on.net/pub/archlinux/ <sub>[http://mirror.internode.on.net/pub/archlinux/ http]</sub> <sub>[rsync://mirror.internode.on.net/pub/archlinux/]</sub><br />
<br />
=== Austria ===<br />
*ftp://gd.tuwien.ac.at/opsys/linux/archlinux/ <sub>[http://gd.tuwien.ac.at/opsys/linux/archlinux/ http]</sub><br />
<br />
=== Belgium ===<br />
*ftp://ftp.belnet.be/mirror/archlinux.org/ <sub>[http://ftp.belnet.be/mirror/archlinux.org/ http]</sub><br />
<br />
=== Brazil ===<br />
*ftp://archlinux.c3sl.ufpr.br/archlinux/ <sub>[http://archlinux.c3sl.ufpr.br/ http]</sub> <sub>[rsync://archlinux.c3sl.ufpr.br/archlinux rsync]</sub><br />
*ftp://ftp.las.ic.unicamp.br/pub/archlinux <sub>[http://www.las.ic.unicamp.br/pub/archlinux http]</sub> <sub>[rsync://rsync.las.ic.unicamp.br/pub/archlinux rsync]</sub><br />
<br />
=== Canada ===<br />
*ftp://mirror.csclub.uwaterloo.ca/archlinux/ <sub>[http://mirror.csclub.uwaterloo.ca/archlinux/ http]</sub> <sub>[rsync://mirror.csclub.uwaterloo.ca/archlinux/ rsync]</sub><br />
*ftp://mirrors.portafixe.com/archlinux/ <sub>[http://mirrors.portafixe.com/archlinux/ http]</sub><br />
<br />
=== Czech Republic ===<br />
*ftp://ftp.sh.cvut.cz/MIRRORS/arch/ <sub>[http://ftp.sh.cvut.cz/MIRRORS/arch/ http]</sub><br />
<br />
=== Estonia ===<br />
*ftp://ftp.estpak.ee/pub/archlinux/ <sub>[http://ftp.estpak.ee/pub/archlinux/ http]</sub><br />
<br />
=== France ===<br />
*ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/ <sub>[http://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/ http]</sub> <sub>[rsync://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/ rsync]</sub><br />
*ftp://mir1.archlinuxfr.org/archlinux <sub>[http://mir1.archlinuxfr.org/archlinux http]</sub> <sub>[rsync://mir1.archlinuxfr.org/archlinux rsync]</sub><br />
*ftp://mir2.archlinuxfr.org/archlinux <sub>[http://mir2.archlinuxfr.org/archlinux http]</sub> <sub>[rsync://mir2.archlinuxfr.org/archlinux rsync]</sub><br />
*http://mir.archlinux.fr/<br />
*ftp://ftp.free.fr/mirrors/ftp.archlinux.org/<br />
*ftp://ftp.rez-gif.supelec.fr/Linux/archlinux/<br />
=== Germany ===<br />
*ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/ <sub>[http://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/ http]</sub> <sub>[rsync://ftp-stud.hs-esslingen.de/archlinux/ rsync]</sub><br />
*ftp://ftp5.gwdg.de/pub/linux/archlinux/ <sub>[http://ftp5.gwdg.de/pub/linux/archlinux/ http]</sub> <sub>[rsync://ftp5.gwdg.de/pub/linux/archlinux/ rsync]</sub><br />
*ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/ <sub>[http://ftp.hosteurope.de/mirror/ftp.archlinux.org/ http]</sub><br />
*ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/ <sub>[http://ftp.tu-chemnitz.de/pub/linux/archlinux/ http]</sub><br />
*ftp://ftp.archlinuxppc.org/i686/<br />
*ftp://ftp.uni-kl.de/pub/linux/archlinux/ <sub>[http://ftp.uni-kl.de/pub/linux/archlinux/ http]</sub> <sub>[rsync: ftp.uni-kl.de::pub/linux/archlinux/ rsync]</sub><br />
*ftp://ftp.uni-bayreuth.de/pub/linux/archlinux <sub>[http://ftp.uni-bayreuth.de/linux/archlinux http]</sub> <sub>[rsync://rsync.uni-bayreuth.de/archlinux/ rsync]</sub><br />
*http://mirrors.igprolin-online.org/pub/archlinux<br />
<br />
=== Great Britain ===<br />
*http://www.mirrorservice.org/sites/ftp.archlinux.org/<br />
*ftp://mirrors.uk2.net/pub/archlinux/ <sub>[http://archlinux.mirrors.uk2.net/ http]</sub><br />
<br />
=== Greece ===<br />
*ftp://ftp.ntua.gr/pub/linux/archlinux/ <sub>[http://ftp.ntua.gr/pub/linux/archlinux/ http]</sub><br />
<br />
=== Hungary ===<br />
*ftp://ftp.mfa.kfki.hu/pub/mirrors/ftp.archlinux.org/<br />
<br />
=== Ireland ===<br />
*ftp://ftp.heanet.ie/mirrors/ftp.archlinux.org/ <sub>[http://ftp.heanet.ie/mirrors/ftp.archlinux.org/ http]</sub><br />
<br />
=== Indonesia ===<br />
*ftp://archlinux.cbn.net.id/pub/archlinux/ <sub>[http://archlinux.cbn.net.id/ http]</sub><br />
<br />
=== Israel ===<br />
*http://mirror.isoc.org.il/pub/archlinux/<br />
<br />
=== Italy ===<br />
*ftp://mi.mirror.garr.it/mirrors/archlinux/ <sub>[http://mi.mirror.garr.it/mirrors/archlinux/ http]</sub><br />
<br />
=== Netherlands ===<br />
*ftp://ftp.nluug.nl/pub/metalab/distributions/archlinux/ <sub>[http://ftp.nluug.nl/pub/metalab/distributions/archlinux/ http]</sub><br />
*ftp://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/ <sub>[http://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/ http]</sub><br />
<br />
=== Norway ===<br />
* http://mirror.archlinux.no/ <sub>[ftp://mirror.archlinux.no/ ftp]</sub>(rsync available)<br />
<br />
=== Poland ===<br />
*ftp://mirror.icis.pcz.pl/archlinux/<br />
*ftp://ftp.piotrkosoft.net/pub/mirrors/ftp.archlinux.org/ [http://piotrkosoft.net/pub/mirrors/ftp.archlinux.org/ http]<br />
*http://unix.net.pl/archlinux.org/<br />
<br />
=== Portugal ===<br />
*ftp://cesium.di.uminho.pt/pub/archlinux/ <sub>[http://cesium.di.uminho.pt/pub/archlinux/ http]</sub><br />
<br />
=== Romania ===<br />
*ftp://ftp.iasi.roedu.net/mirrors/archlinux.org/ <sub>[http://ftp.iasi.roedu.net/mirrors/archlinux.org/ http]</sub><br />
<br />
=== Russia ===<br />
*ftp://mirror.yandex.ru/archlinux/ <sub>[http://mirror.yandex.ru/archlinux/ http]</sub> (rsync available)<br />
*http://archlinux.freeside.ru/<br />
<br />
=== Sweden ===<br />
*ftp://ftp.ds.hj.se/pub/os/linux/archlinux/ <sub>[http://ftp.ds.hj.se/pub/os/linux/archlinux/ http]</sub><br />
*ftp://ftp.gigabit.nu/ <sub>[http://ftp.gigabit.nu/ http]</sub><br />
<br />
=== Switzerland ===<br />
*ftp://archlinux.puzzle.ch/ <sub>[http://archlinux.puzzle.ch/ http]</sub><br />
<br />
=== Turkey ===<br />
*http://server.elsistech.com/archlinux/<br />
*ftp://ftp.linux.org.tr/<br />
<br />
=== Ukraine ===<br />
*ftp://archlinux.hell.org.ua/archlinux/ <sub>[http://archlinux.hell.org.ua/archlinux http]</sub>(rsync available)<br />
*ftp://ftp.linux.kiev.ua/pub/Linux/ArchLinux/ <sub>[http://ftp.linux.kiev.ua/pub/Linux/ArchLinux/ http]</sub><br />
<br />
=== United States ===<br />
*http://archlinux.linuxfreedom.com<br />
*ftp://ftp.archlinux.org/<br />
*ftp://locke.suu.edu/linux/dist/archlinux/<br />
*http://archlinux.unixheads.org/<br />
*ftp://mirrors.easynews.com/linux/archlinux/ <sub>[http://mirrors.easynews.com/linux/archlinux/ http]</sub><br />
*ftp://ftp.gtlib.gatech.edu/pub/linux/distributions/archlinux/ [http://www.gtlib.gatech.edu/pub/linux/distributions/archlinux/ http]<br />
*ftp://mirror.cs.vt.edu/pub/ArchLinux/ <sub>[http://mirror.cs.vt.edu/pub/ArchLinux/ http]</sub> (rsync available)<br />
*ftp://ibiblio.org/pub/linux/distributions/archlinux/ <sub>[http://distro.ibiblio.org/pub/linux/distributions/archlinux/ http]</sub><br />
*http://archlinux.umflint.edu/<br />
*http://mirror.neotuli.net/<br />
*ftp://mirror.rit.edu/archlinux/ <sub>[http://mirror.rit.edu/archlinux/ http]</sub> <sub>[rsync://mirror.rit.edu/archlinux/ rsync]</sub><br />
* http://schlunix.org/archlinux/<br />
* http://mirror.umoss.org/archlinux/ <sub>[rsync://mirror.umoss.org/archlinux/ rsync]</sub><br />
<br />
=== Vietnam ===<br />
*ftp://ftp.indochinalinux.com/archlinux/ (frequent DNS problems, IP is 202.78.230.5)<br />
<br />
== Unofficial mirrors ==<br />
'''These mirrors are not listed in <code>/etc/pacman.d/mirrorlist</code>.'''<br />
<br />
=== Global ===<br />
* http://prdownloads.sourceforge.net/archlinux/ ( Doesn't have recent ISO releases. Use it only if for some reason you want to use an older ISO. )<br />
* http://mirrors.igprolin-online.org/pub/archlinux/<br />
<br />
=== Canada ===<br />
* http://mirrors.portafixe.com/archlinux/<br />
* ftp://mirrors.portafixe.com/archlinux/<br />
<br />
=== China ===<br />
* http://mirrors.lcuc.org.cn/archlinux/<br />
* http://mirror.lupaworld.com/archlinux/<br />
* http://public.gooth.cn/archlinux/ (only include i686)<br />
<br />
=== Germany ===<br />
* http://arch.uplinkzero.com/<br />
<br />
=== Malaysia ===<br />
* http://oss.mmu.edu.my/distro/arch (ISOs only)<br />
* http://mirror.oscc.org.my/archlinux/<br />
<br />
=== New Caledonia ===<br />
* ftp://archlinux.nautile.nc/archlinux/ <sub>[http://archlinux.nautile.nc/archlinux/ http]</sub> <sub>[rsync://archlinux.nautile.nc/archlinux/ rsync]</sub> (no ISO image)<br />
<br />
=== Norway ===<br />
* ftp://jane.tihlde.org/pub/archlinux/ <sub>[http://jane.tihlde.org/pub/archlinux/ http] </sub> <sub> [rsync://jane.tihlde.org/pub/archlinux/ rsync] </sub><br />
* http://power.klette.us/mirror/<br />
<br />
=== Poland ===<br />
* ftp://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ [http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ http] - up-to-date, but no Core repository<br />
<br />
=== South Africa ===<br />
<br />
* http://archlinux.mirror.ac.za/ TENET Mirror<br />
* ftp://archlinux.mirror.ac.za/<br />
* http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/ Stellenbosch University<br />
* ftp://ftp.sun.ac.za/pub/mirrors/archlinux/<br />
* http://ftp.leg.uct.ac.za/pub/linux/arch/ University of Cape Town<br />
* ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
<br />
=== Taiwan ===<br />
* ftp://cle.linux.org.tw/pub/ArchLinux/ (no ''testing'', no new isos)<br />
<br />
=== United States ===<br />
* http://archlinux.linuxfreedom.com Contains all the ISO images<br />
* ftp://mirrors.acm.jhu.edu/arch/ <sub>[http://mirrors.acm.jhu.edu/arch http]</sub> <sub>[rsync://mirrors.acm.jhu.edu/arch rsync]</sub><br />
* ftp://ftp.osuosl.org/pub/archlinux/ <sub>[http://ftp.osuosl.org/pub/archlinux/ http]</sub> (i686 only - ''current'' and ''extra'') - outdated<br />
<br />
== IPv6-ready mirrors ==<br />
*http://power.klette.us/mirror/ (Norway)<br />
*http://arch.iskrembilen.com/ (Norway, rsync available)<br />
*niue.belnet.be (Belgium)<br />
*ftp.estpak.ee (Estonia)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*ftp.sixnix.net/ftp6.sixnix.net (Finland) - dead</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Mirrors&diff=56117
Mirrors
2008-12-24T12:03:52Z
<p>Zatricky: /* South Africa */</p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|:Mirrors}}<br />
{{i18n_entry|简体中文|:Mirrors (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
== Enabling your favorite mirror ==<br />
<br />
The default pacman configuration for ''core'' looks like this:<br />
<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
If you want to use the HostEurope mirror as your default mirror, just add it before the <tt>Include</tt> line:<br />
<br />
[core]<br />
Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/i686</nowiki><br />
Include = /etc/pacman.d/mirrorlist<br />
<br><br />
'''edit:''' The release of pacman 3.1 introduced the /etc/pacman.d/mirrorlist with the variable $repo, no need to maintain separate list for each repository.<br />
<br />
Pacman will now try to connect to this mirror first. You can do the same for ''testing'', ''extra'', and ''community'''.<br />
<br />
'''Use the same mirror for all repositories. Otherwise packages may get installed that are incompatible to each other (like kernel26 from ''core'' and another (older) kernel module from ''extra'').'''<br />
<br />
== Mirror List ==<br />
<br />
This is a list of all known Arch Linux mirrors, that's more up to date than the [http://www.archlinux.org/download/ official download page] or the [http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/base/pacman/ files in <tt>/etc/pacman.d/</tt>]. If you know of a mirror that is not listed, please add it. Mirrors which are no longer updated or have been unavailable for a long time can be deleted.<br />
<br />
Here is a hint to check just how up-to-date your chosen mirror is:<br />
# pick a server and browse to "extra/os/"<br />
# load http://www.archlinux.org/ in another tab or window<br />
# compare the last-modified date of the "i686" directory on the mirror to the "Extra" date on the homepage, in the "Package Repositories" box to the right.<br />
<br><br />
Many sites also provide http service, but keep in mind that pacman relies on ftp to determine if a repository got updated. With http it fetches the repository database each time you run <tt>pacman -Sy</tt>, even if it didn't change since the last run.<br />
<br />
[http://users.archlinux.de/~gerbra/mirrorcheck.html This website] provides updates on the current status of the Arch mirrors and how up to date they are.<br />
<br />
'''Attention: Do not add new mirrors to the list below. If you want your mirror to be added to official list - file a feature request. In the meantime add it to the "Unofficial mirrors" list at the end of this page.'''<br />
<br />
=== Australia ===<br />
*http://mirror.aarnet.edu.au/pub/archlinux/ <sub>[http://mirror.aarnet.edu.au/pub/archlinux/ http]</sub> <sub>[rsync://mirror.aarnet.au/pub/archlinux/]</sub><br />
*http://mirror.optus.com.au/pub/archlinux/ <sub>[http://mirror.optus.com.au/pub/archlinux/ http]</sub> <sub>[rsync://mirror.optus.com.au/pub/archlinux/]</sub><br />
*http://ftp.iinet.net.au/pub/archlinux/ <sub>[http://ftp.iinet.net.au/pub/archlinux/ http]</sub> <sub>[rsync://ftp.iinet.net.au/archlinux/]</sub><br />
*http://mirror.pacific.net.au/linux/archlinux/ <sub>[http://mirror.pacific.net.au/linux/archlinux/ http]</sub> <sub>[rsync://mirror.pacific.net.au/linux/archlinux/]</sub><br />
*http://mirror.internode.on.net/pub/archlinux/ <sub>[http://mirror.internode.on.net/pub/archlinux/ http]</sub> <sub>[rsync://mirror.internode.on.net/pub/archlinux/]</sub><br />
<br />
=== Austria ===<br />
*ftp://gd.tuwien.ac.at/opsys/linux/archlinux/ <sub>[http://gd.tuwien.ac.at/opsys/linux/archlinux/ http]</sub><br />
<br />
=== Belgium ===<br />
*ftp://ftp.belnet.be/mirror/archlinux.org/ <sub>[http://ftp.belnet.be/mirror/archlinux.org/ http]</sub><br />
<br />
=== Brazil ===<br />
*ftp://archlinux.c3sl.ufpr.br/archlinux/ <sub>[http://archlinux.c3sl.ufpr.br/ http]</sub> <sub>[rsync://archlinux.c3sl.ufpr.br/archlinux rsync]</sub><br />
*ftp://ftp.las.ic.unicamp.br/pub/archlinux <sub>[http://www.las.ic.unicamp.br/pub/archlinux http]</sub> <sub>[rsync://rsync.las.ic.unicamp.br/pub/archlinux rsync]</sub><br />
<br />
=== Canada ===<br />
*ftp://mirror.csclub.uwaterloo.ca/archlinux/ <sub>[http://mirror.csclub.uwaterloo.ca/archlinux/ http]</sub> <sub>[rsync://mirror.csclub.uwaterloo.ca/archlinux/ rsync]</sub><br />
*ftp://mirrors.portafixe.com/archlinux/ <sub>[http://mirrors.portafixe.com/archlinux/ http]</sub><br />
<br />
=== Czech Republic ===<br />
*ftp://ftp.sh.cvut.cz/MIRRORS/arch/ <sub>[http://ftp.sh.cvut.cz/MIRRORS/arch/ http]</sub><br />
<br />
=== Estonia ===<br />
*ftp://ftp.estpak.ee/pub/archlinux/ <sub>[http://ftp.estpak.ee/pub/archlinux/ http]</sub><br />
<br />
=== France ===<br />
*ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/ <sub>[http://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/ http]</sub> <sub>[rsync://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/ rsync]</sub><br />
*ftp://mir1.archlinuxfr.org/archlinux <sub>[http://mir1.archlinuxfr.org/archlinux http]</sub> <sub>[rsync://mir1.archlinuxfr.org/archlinux rsync]</sub><br />
*ftp://mir2.archlinuxfr.org/archlinux <sub>[http://mir2.archlinuxfr.org/archlinux http]</sub> <sub>[rsync://mir2.archlinuxfr.org/archlinux rsync]</sub><br />
*http://mir.archlinux.fr/<br />
*ftp://ftp.free.fr/mirrors/ftp.archlinux.org/<br />
*ftp://ftp.rez-gif.supelec.fr/Linux/archlinux/<br />
=== Germany ===<br />
*ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/ <sub>[http://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/ http]</sub> <sub>[rsync://ftp-stud.hs-esslingen.de/archlinux/ rsync]</sub><br />
*ftp://ftp5.gwdg.de/pub/linux/archlinux/ <sub>[http://ftp5.gwdg.de/pub/linux/archlinux/ http]</sub> <sub>[rsync://ftp5.gwdg.de/pub/linux/archlinux/ rsync]</sub><br />
*ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/ <sub>[http://ftp.hosteurope.de/mirror/ftp.archlinux.org/ http]</sub><br />
*ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/ <sub>[http://ftp.tu-chemnitz.de/pub/linux/archlinux/ http]</sub><br />
*ftp://ftp.archlinuxppc.org/i686/<br />
*ftp://ftp.uni-kl.de/pub/linux/archlinux/ <sub>[http://ftp.uni-kl.de/pub/linux/archlinux/ http]</sub> <sub>[rsync: ftp.uni-kl.de::pub/linux/archlinux/ rsync]</sub><br />
*ftp://ftp.uni-bayreuth.de/pub/linux/archlinux <sub>[http://ftp.uni-bayreuth.de/linux/archlinux http]</sub> <sub>[rsync://rsync.uni-bayreuth.de/archlinux/ rsync]</sub><br />
*http://mirrors.igprolin-online.org/pub/archlinux<br />
<br />
=== Great Britain ===<br />
*http://www.mirrorservice.org/sites/ftp.archlinux.org/<br />
*ftp://mirrors.uk2.net/pub/archlinux/ <sub>[http://archlinux.mirrors.uk2.net/ http]</sub><br />
<br />
=== Greece ===<br />
*ftp://ftp.ntua.gr/pub/linux/archlinux/ <sub>[http://ftp.ntua.gr/pub/linux/archlinux/ http]</sub><br />
<br />
=== Hungary ===<br />
*ftp://ftp.mfa.kfki.hu/pub/mirrors/ftp.archlinux.org/<br />
<br />
=== Ireland ===<br />
*ftp://ftp.heanet.ie/mirrors/ftp.archlinux.org/ <sub>[http://ftp.heanet.ie/mirrors/ftp.archlinux.org/ http]</sub><br />
<br />
=== Indonesia ===<br />
*ftp://archlinux.cbn.net.id/pub/archlinux/ <sub>[http://archlinux.cbn.net.id/ http]</sub><br />
<br />
=== Israel ===<br />
*http://mirror.isoc.org.il/pub/archlinux/<br />
<br />
=== Italy ===<br />
*ftp://mi.mirror.garr.it/mirrors/archlinux/ <sub>[http://mi.mirror.garr.it/mirrors/archlinux/ http]</sub><br />
<br />
=== Netherlands ===<br />
*ftp://ftp.nluug.nl/pub/metalab/distributions/archlinux/ <sub>[http://ftp.nluug.nl/pub/metalab/distributions/archlinux/ http]</sub><br />
*ftp://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/ <sub>[http://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/ http]</sub><br />
<br />
=== Norway ===<br />
* http://mirror.archlinux.no/ <sub>[ftp://mirror.archlinux.no/ ftp]</sub>(rsync available)<br />
<br />
=== Poland ===<br />
*ftp://mirror.icis.pcz.pl/archlinux/<br />
*ftp://ftp.piotrkosoft.net/pub/mirrors/ftp.archlinux.org/ [http://piotrkosoft.net/pub/mirrors/ftp.archlinux.org/ http]<br />
*http://unix.net.pl/archlinux.org/<br />
<br />
=== Portugal ===<br />
*ftp://cesium.di.uminho.pt/pub/archlinux/ <sub>[http://cesium.di.uminho.pt/pub/archlinux/ http]</sub><br />
<br />
=== Romania ===<br />
*ftp://ftp.iasi.roedu.net/mirrors/archlinux.org/ <sub>[http://ftp.iasi.roedu.net/mirrors/archlinux.org/ http]</sub><br />
<br />
=== Russia ===<br />
*ftp://mirror.yandex.ru/archlinux/ <sub>[http://mirror.yandex.ru/archlinux/ http]</sub> (rsync available)<br />
*http://archlinux.freeside.ru/<br />
<br />
=== Sweden ===<br />
*ftp://ftp.ds.hj.se/pub/os/linux/archlinux/ <sub>[http://ftp.ds.hj.se/pub/os/linux/archlinux/ http]</sub><br />
*ftp://ftp.gigabit.nu/ <sub>[http://ftp.gigabit.nu/ http]</sub><br />
<br />
=== Switzerland ===<br />
*ftp://archlinux.puzzle.ch/ <sub>[http://archlinux.puzzle.ch/ http]</sub><br />
<br />
=== Turkey ===<br />
*http://server.elsistech.com/archlinux/<br />
*ftp://ftp.linux.org.tr/<br />
<br />
=== Ukraine ===<br />
*ftp://archlinux.hell.org.ua/archlinux/ <sub>[http://archlinux.hell.org.ua/archlinux http]</sub>(rsync available)<br />
*ftp://ftp.linux.kiev.ua/pub/Linux/ArchLinux/ <sub>[http://ftp.linux.kiev.ua/pub/Linux/ArchLinux/ http]</sub><br />
<br />
=== United States ===<br />
*http://archlinux.linuxfreedom.com<br />
*ftp://ftp.archlinux.org/<br />
*ftp://locke.suu.edu/linux/dist/archlinux/<br />
*http://archlinux.unixheads.org/<br />
*ftp://mirrors.easynews.com/linux/archlinux/ <sub>[http://mirrors.easynews.com/linux/archlinux/ http]</sub><br />
*ftp://ftp.gtlib.gatech.edu/pub/linux/distributions/archlinux/ [http://www.gtlib.gatech.edu/pub/linux/distributions/archlinux/ http]<br />
*ftp://mirror.cs.vt.edu/pub/ArchLinux/ <sub>[http://mirror.cs.vt.edu/pub/ArchLinux/ http]</sub> (rsync available)<br />
*ftp://ibiblio.org/pub/linux/distributions/archlinux/ <sub>[http://distro.ibiblio.org/pub/linux/distributions/archlinux/ http]</sub><br />
*http://archlinux.umflint.edu/<br />
*http://mirror.neotuli.net/<br />
*ftp://mirror.rit.edu/archlinux/ <sub>[http://mirror.rit.edu/archlinux/ http]</sub> <sub>[rsync://mirror.rit.edu/archlinux/ rsync]</sub><br />
* http://schlunix.org/archlinux/<br />
* http://mirror.umoss.org/archlinux/ <sub>[rsync://mirror.umoss.org/archlinux/ rsync]</sub><br />
<br />
=== Vietnam ===<br />
*ftp://ftp.indochinalinux.com/archlinux/ (frequent DNS problems, IP is 202.78.230.5)<br />
<br />
== Unofficial mirrors ==<br />
'''These mirrors are not listed in <code>/etc/pacman.d/mirrorlist</code>.'''<br />
<br />
=== Global ===<br />
* http://prdownloads.sourceforge.net/archlinux/ ( Doesn't have recent ISO releases. Use it only if for some reason you want to use an older ISO. )<br />
* http://mirrors.igprolin-online.org/pub/archlinux/<br />
<br />
=== Canada ===<br />
* http://mirrors.portafixe.com/archlinux/<br />
* ftp://mirrors.portafixe.com/archlinux/<br />
<br />
=== China ===<br />
* http://mirrors.lcuc.org.cn/archlinux/<br />
* http://mirror.lupaworld.com/archlinux/<br />
* http://public.gooth.cn/archlinux/ (only include i686)<br />
<br />
=== Germany ===<br />
* http://arch.uplinkzero.com/<br />
<br />
=== Malaysia ===<br />
* http://oss.mmu.edu.my/distro/arch (ISOs only)<br />
* http://mirror.oscc.org.my/archlinux/<br />
<br />
=== New Caledonia ===<br />
* ftp://archlinux.nautile.nc/archlinux/ <sub>[http://archlinux.nautile.nc/archlinux/ http]</sub> <sub>[rsync://archlinux.nautile.nc/archlinux/ rsync]</sub> (no ISO image)<br />
<br />
=== Norway ===<br />
* ftp://jane.tihlde.org/pub/archlinux/ <sub>[http://jane.tihlde.org/pub/archlinux/ http] </sub> <sub> [rsync://jane.tihlde.org/pub/archlinux/ rsync] </sub><br />
* http://power.klette.us/mirror/<br />
<br />
=== Poland ===<br />
* ftp://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ [http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ http] - up-to-date, but no Core repository<br />
<br />
=== South Africa ===<br />
TENET Mirror<br />
* http://archlinux.mirror.ac.za/<br />
* ftp://archlinux.mirror.ac.za/<br />
Stellenbosch University<br />
* http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/<br />
* ftp://ftp.sun.ac.za/pub/mirrors/archlinux/<br />
University of Cape Town<br />
* http://ftp.leg.uct.ac.za/pub/linux/arch/<br />
* ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
<br />
=== Taiwan ===<br />
* ftp://cle.linux.org.tw/pub/ArchLinux/ (no ''testing'', no new isos)<br />
<br />
=== United States ===<br />
* http://archlinux.linuxfreedom.com Contains all the ISO images<br />
* ftp://mirrors.acm.jhu.edu/arch/ <sub>[http://mirrors.acm.jhu.edu/arch http]</sub> <sub>[rsync://mirrors.acm.jhu.edu/arch rsync]</sub><br />
* ftp://ftp.osuosl.org/pub/archlinux/ <sub>[http://ftp.osuosl.org/pub/archlinux/ http]</sub> (i686 only - ''current'' and ''extra'') - outdated<br />
<br />
== IPv6-ready mirrors ==<br />
*http://power.klette.us/mirror/ (Norway)<br />
*http://arch.iskrembilen.com/ (Norway, rsync available)<br />
*niue.belnet.be (Belgium)<br />
*ftp.estpak.ee (Estonia)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*ftp.sixnix.net/ftp6.sixnix.net (Finland) - dead</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Mirrors&diff=56116
Mirrors
2008-12-24T11:46:54Z
<p>Zatricky: added ZA TENET servers - see http://www.mirror.ac.za/</p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|:Mirrors}}<br />
{{i18n_entry|简体中文|:Mirrors (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
== Enabling your favorite mirror ==<br />
<br />
The default pacman configuration for ''core'' looks like this:<br />
<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
If you want to use the HostEurope mirror as your default mirror, just add it before the <tt>Include</tt> line:<br />
<br />
[core]<br />
Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/i686</nowiki><br />
Include = /etc/pacman.d/mirrorlist<br />
<br><br />
'''edit:''' The release of pacman 3.1 introduced the /etc/pacman.d/mirrorlist with the variable $repo, no need to maintain separate list for each repository.<br />
<br />
Pacman will now try to connect to this mirror first. You can do the same for ''testing'', ''extra'', and ''community'''.<br />
<br />
'''Use the same mirror for all repositories. Otherwise packages may get installed that are incompatible to each other (like kernel26 from ''core'' and another (older) kernel module from ''extra'').'''<br />
<br />
== Mirror List ==<br />
<br />
This is a list of all known Arch Linux mirrors, that's more up to date than the [http://www.archlinux.org/download/ official download page] or the [http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/base/pacman/ files in <tt>/etc/pacman.d/</tt>]. If you know of a mirror that is not listed, please add it. Mirrors which are no longer updated or have been unavailable for a long time can be deleted.<br />
<br />
Here is a hint to check just how up-to-date your chosen mirror is:<br />
# pick a server and browse to "extra/os/"<br />
# load http://www.archlinux.org/ in another tab or window<br />
# compare the last-modified date of the "i686" directory on the mirror to the "Extra" date on the homepage, in the "Package Repositories" box to the right.<br />
<br><br />
Many sites also provide http service, but keep in mind that pacman relies on ftp to determine if a repository got updated. With http it fetches the repository database each time you run <tt>pacman -Sy</tt>, even if it didn't change since the last run.<br />
<br />
[http://users.archlinux.de/~gerbra/mirrorcheck.html This website] provides updates on the current status of the Arch mirrors and how up to date they are.<br />
<br />
'''Attention: Do not add new mirrors to the list below. If you want your mirror to be added to official list - file a feature request. In the meantime add it to the "Unofficial mirrors" list at the end of this page.'''<br />
<br />
=== Australia ===<br />
*http://mirror.aarnet.edu.au/pub/archlinux/ <sub>[http://mirror.aarnet.edu.au/pub/archlinux/ http]</sub> <sub>[rsync://mirror.aarnet.au/pub/archlinux/]</sub><br />
*http://mirror.optus.com.au/pub/archlinux/ <sub>[http://mirror.optus.com.au/pub/archlinux/ http]</sub> <sub>[rsync://mirror.optus.com.au/pub/archlinux/]</sub><br />
*http://ftp.iinet.net.au/pub/archlinux/ <sub>[http://ftp.iinet.net.au/pub/archlinux/ http]</sub> <sub>[rsync://ftp.iinet.net.au/archlinux/]</sub><br />
*http://mirror.pacific.net.au/linux/archlinux/ <sub>[http://mirror.pacific.net.au/linux/archlinux/ http]</sub> <sub>[rsync://mirror.pacific.net.au/linux/archlinux/]</sub><br />
*http://mirror.internode.on.net/pub/archlinux/ <sub>[http://mirror.internode.on.net/pub/archlinux/ http]</sub> <sub>[rsync://mirror.internode.on.net/pub/archlinux/]</sub><br />
<br />
=== Austria ===<br />
*ftp://gd.tuwien.ac.at/opsys/linux/archlinux/ <sub>[http://gd.tuwien.ac.at/opsys/linux/archlinux/ http]</sub><br />
<br />
=== Belgium ===<br />
*ftp://ftp.belnet.be/mirror/archlinux.org/ <sub>[http://ftp.belnet.be/mirror/archlinux.org/ http]</sub><br />
<br />
=== Brazil ===<br />
*ftp://archlinux.c3sl.ufpr.br/archlinux/ <sub>[http://archlinux.c3sl.ufpr.br/ http]</sub> <sub>[rsync://archlinux.c3sl.ufpr.br/archlinux rsync]</sub><br />
*ftp://ftp.las.ic.unicamp.br/pub/archlinux <sub>[http://www.las.ic.unicamp.br/pub/archlinux http]</sub> <sub>[rsync://rsync.las.ic.unicamp.br/pub/archlinux rsync]</sub><br />
<br />
=== Canada ===<br />
*ftp://mirror.csclub.uwaterloo.ca/archlinux/ <sub>[http://mirror.csclub.uwaterloo.ca/archlinux/ http]</sub> <sub>[rsync://mirror.csclub.uwaterloo.ca/archlinux/ rsync]</sub><br />
*ftp://mirrors.portafixe.com/archlinux/ <sub>[http://mirrors.portafixe.com/archlinux/ http]</sub><br />
<br />
=== Czech Republic ===<br />
*ftp://ftp.sh.cvut.cz/MIRRORS/arch/ <sub>[http://ftp.sh.cvut.cz/MIRRORS/arch/ http]</sub><br />
<br />
=== Estonia ===<br />
*ftp://ftp.estpak.ee/pub/archlinux/ <sub>[http://ftp.estpak.ee/pub/archlinux/ http]</sub><br />
<br />
=== France ===<br />
*ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/ <sub>[http://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/ http]</sub> <sub>[rsync://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/ rsync]</sub><br />
*ftp://mir1.archlinuxfr.org/archlinux <sub>[http://mir1.archlinuxfr.org/archlinux http]</sub> <sub>[rsync://mir1.archlinuxfr.org/archlinux rsync]</sub><br />
*ftp://mir2.archlinuxfr.org/archlinux <sub>[http://mir2.archlinuxfr.org/archlinux http]</sub> <sub>[rsync://mir2.archlinuxfr.org/archlinux rsync]</sub><br />
*http://mir.archlinux.fr/<br />
*ftp://ftp.free.fr/mirrors/ftp.archlinux.org/<br />
*ftp://ftp.rez-gif.supelec.fr/Linux/archlinux/<br />
=== Germany ===<br />
*ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/ <sub>[http://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/ http]</sub> <sub>[rsync://ftp-stud.hs-esslingen.de/archlinux/ rsync]</sub><br />
*ftp://ftp5.gwdg.de/pub/linux/archlinux/ <sub>[http://ftp5.gwdg.de/pub/linux/archlinux/ http]</sub> <sub>[rsync://ftp5.gwdg.de/pub/linux/archlinux/ rsync]</sub><br />
*ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/ <sub>[http://ftp.hosteurope.de/mirror/ftp.archlinux.org/ http]</sub><br />
*ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/ <sub>[http://ftp.tu-chemnitz.de/pub/linux/archlinux/ http]</sub><br />
*ftp://ftp.archlinuxppc.org/i686/<br />
*ftp://ftp.uni-kl.de/pub/linux/archlinux/ <sub>[http://ftp.uni-kl.de/pub/linux/archlinux/ http]</sub> <sub>[rsync: ftp.uni-kl.de::pub/linux/archlinux/ rsync]</sub><br />
*ftp://ftp.uni-bayreuth.de/pub/linux/archlinux <sub>[http://ftp.uni-bayreuth.de/linux/archlinux http]</sub> <sub>[rsync://rsync.uni-bayreuth.de/archlinux/ rsync]</sub><br />
*http://mirrors.igprolin-online.org/pub/archlinux<br />
<br />
=== Great Britain ===<br />
*http://www.mirrorservice.org/sites/ftp.archlinux.org/<br />
*ftp://mirrors.uk2.net/pub/archlinux/ <sub>[http://archlinux.mirrors.uk2.net/ http]</sub><br />
<br />
=== Greece ===<br />
*ftp://ftp.ntua.gr/pub/linux/archlinux/ <sub>[http://ftp.ntua.gr/pub/linux/archlinux/ http]</sub><br />
<br />
=== Hungary ===<br />
*ftp://ftp.mfa.kfki.hu/pub/mirrors/ftp.archlinux.org/<br />
<br />
=== Ireland ===<br />
*ftp://ftp.heanet.ie/mirrors/ftp.archlinux.org/ <sub>[http://ftp.heanet.ie/mirrors/ftp.archlinux.org/ http]</sub><br />
<br />
=== Indonesia ===<br />
*ftp://archlinux.cbn.net.id/pub/archlinux/ <sub>[http://archlinux.cbn.net.id/ http]</sub><br />
<br />
=== Israel ===<br />
*http://mirror.isoc.org.il/pub/archlinux/<br />
<br />
=== Italy ===<br />
*ftp://mi.mirror.garr.it/mirrors/archlinux/ <sub>[http://mi.mirror.garr.it/mirrors/archlinux/ http]</sub><br />
<br />
=== Netherlands ===<br />
*ftp://ftp.nluug.nl/pub/metalab/distributions/archlinux/ <sub>[http://ftp.nluug.nl/pub/metalab/distributions/archlinux/ http]</sub><br />
*ftp://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/ <sub>[http://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/ http]</sub><br />
<br />
=== Norway ===<br />
* http://mirror.archlinux.no/ <sub>[ftp://mirror.archlinux.no/ ftp]</sub>(rsync available)<br />
<br />
=== Poland ===<br />
*ftp://mirror.icis.pcz.pl/archlinux/<br />
*ftp://ftp.piotrkosoft.net/pub/mirrors/ftp.archlinux.org/ [http://piotrkosoft.net/pub/mirrors/ftp.archlinux.org/ http]<br />
*http://unix.net.pl/archlinux.org/<br />
<br />
=== Portugal ===<br />
*ftp://cesium.di.uminho.pt/pub/archlinux/ <sub>[http://cesium.di.uminho.pt/pub/archlinux/ http]</sub><br />
<br />
=== Romania ===<br />
*ftp://ftp.iasi.roedu.net/mirrors/archlinux.org/ <sub>[http://ftp.iasi.roedu.net/mirrors/archlinux.org/ http]</sub><br />
<br />
=== Russia ===<br />
*ftp://mirror.yandex.ru/archlinux/ <sub>[http://mirror.yandex.ru/archlinux/ http]</sub> (rsync available)<br />
*http://archlinux.freeside.ru/<br />
<br />
=== Sweden ===<br />
*ftp://ftp.ds.hj.se/pub/os/linux/archlinux/ <sub>[http://ftp.ds.hj.se/pub/os/linux/archlinux/ http]</sub><br />
*ftp://ftp.gigabit.nu/ <sub>[http://ftp.gigabit.nu/ http]</sub><br />
<br />
=== Switzerland ===<br />
*ftp://archlinux.puzzle.ch/ <sub>[http://archlinux.puzzle.ch/ http]</sub><br />
<br />
=== Turkey ===<br />
*http://server.elsistech.com/archlinux/<br />
*ftp://ftp.linux.org.tr/<br />
<br />
=== Ukraine ===<br />
*ftp://archlinux.hell.org.ua/archlinux/ <sub>[http://archlinux.hell.org.ua/archlinux http]</sub>(rsync available)<br />
*ftp://ftp.linux.kiev.ua/pub/Linux/ArchLinux/ <sub>[http://ftp.linux.kiev.ua/pub/Linux/ArchLinux/ http]</sub><br />
<br />
=== United States ===<br />
*http://archlinux.linuxfreedom.com<br />
*ftp://ftp.archlinux.org/<br />
*ftp://locke.suu.edu/linux/dist/archlinux/<br />
*http://archlinux.unixheads.org/<br />
*ftp://mirrors.easynews.com/linux/archlinux/ <sub>[http://mirrors.easynews.com/linux/archlinux/ http]</sub><br />
*ftp://ftp.gtlib.gatech.edu/pub/linux/distributions/archlinux/ [http://www.gtlib.gatech.edu/pub/linux/distributions/archlinux/ http]<br />
*ftp://mirror.cs.vt.edu/pub/ArchLinux/ <sub>[http://mirror.cs.vt.edu/pub/ArchLinux/ http]</sub> (rsync available)<br />
*ftp://ibiblio.org/pub/linux/distributions/archlinux/ <sub>[http://distro.ibiblio.org/pub/linux/distributions/archlinux/ http]</sub><br />
*http://archlinux.umflint.edu/<br />
*http://mirror.neotuli.net/<br />
*ftp://mirror.rit.edu/archlinux/ <sub>[http://mirror.rit.edu/archlinux/ http]</sub> <sub>[rsync://mirror.rit.edu/archlinux/ rsync]</sub><br />
* http://schlunix.org/archlinux/<br />
* http://mirror.umoss.org/archlinux/ <sub>[rsync://mirror.umoss.org/archlinux/ rsync]</sub><br />
<br />
=== Vietnam ===<br />
*ftp://ftp.indochinalinux.com/archlinux/ (frequent DNS problems, IP is 202.78.230.5)<br />
<br />
== Unofficial mirrors ==<br />
'''These mirrors are not listed in <code>/etc/pacman.d/mirrorlist</code>.'''<br />
<br />
=== Global ===<br />
* http://prdownloads.sourceforge.net/archlinux/ ( Doesn't have recent ISO releases. Use it only if for some reason you want to use an older ISO. )<br />
* http://mirrors.igprolin-online.org/pub/archlinux/<br />
<br />
=== Canada ===<br />
* http://mirrors.portafixe.com/archlinux/<br />
* ftp://mirrors.portafixe.com/archlinux/<br />
<br />
=== China ===<br />
* http://mirrors.lcuc.org.cn/archlinux/<br />
* http://mirror.lupaworld.com/archlinux/<br />
* http://public.gooth.cn/archlinux/ (only include i686)<br />
<br />
=== Germany ===<br />
* http://arch.uplinkzero.com/<br />
<br />
=== Malaysia ===<br />
* http://oss.mmu.edu.my/distro/arch (ISOs only)<br />
* http://mirror.oscc.org.my/archlinux/<br />
<br />
=== New Caledonia ===<br />
* ftp://archlinux.nautile.nc/archlinux/ <sub>[http://archlinux.nautile.nc/archlinux/ http]</sub> <sub>[rsync://archlinux.nautile.nc/archlinux/ rsync]</sub> (no ISO image)<br />
<br />
=== Norway ===<br />
* ftp://jane.tihlde.org/pub/archlinux/ <sub>[http://jane.tihlde.org/pub/archlinux/ http] </sub> <sub> [rsync://jane.tihlde.org/pub/archlinux/ rsync] </sub><br />
* http://power.klette.us/mirror/<br />
<br />
=== Poland ===<br />
* ftp://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ [http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ http] - up-to-date, but no Core repository<br />
<br />
=== South Africa ===<br />
* http://archlinux.mirror.ac.za/<br />
* ftp://archlinux.mirror.ac.za/<br />
<br />
=== Taiwan ===<br />
* ftp://cle.linux.org.tw/pub/ArchLinux/ (no ''testing'', no new isos)<br />
<br />
=== United States ===<br />
* http://archlinux.linuxfreedom.com Contains all the ISO images<br />
* ftp://mirrors.acm.jhu.edu/arch/ <sub>[http://mirrors.acm.jhu.edu/arch http]</sub> <sub>[rsync://mirrors.acm.jhu.edu/arch rsync]</sub><br />
* ftp://ftp.osuosl.org/pub/archlinux/ <sub>[http://ftp.osuosl.org/pub/archlinux/ http]</sub> (i686 only - ''current'' and ''extra'') - outdated<br />
<br />
== IPv6-ready mirrors ==<br />
*http://power.klette.us/mirror/ (Norway)<br />
*http://arch.iskrembilen.com/ (Norway, rsync available)<br />
*niue.belnet.be (Belgium)<br />
*ftp.estpak.ee (Estonia)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*ftp.sixnix.net/ftp6.sixnix.net (Finland) - dead</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Mirrors&diff=56113
Talk:Mirrors
2008-12-24T10:17:13Z
<p>Zatricky: /* archlinux.fr down? */</p>
<hr />
<div>== archlinux.fr down? ==<br />
<br />
Can't reach the main site or any of its subdomains. :/<br />
--[[User:Zatricky|Zatricky]] 11:55, 23 December 2008 (EST)<br />
<br />
nvm. up again --[[User:Zatricky|Zatricky]] 05:16, 24 December 2008 (EST)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Mirrors&diff=56112
Talk:Mirrors
2008-12-24T10:16:59Z
<p>Zatricky: /* archlinux.fr down? */</p>
<hr />
<div>== archlinux.fr down? ==<br />
<br />
Can't reach the main site or any of its subdomains. :/<br />
--[[User:Zatricky|Zatricky]] 11:55, 23 December 2008 (EST)<br />
nvm. up again --[[User:Zatricky|Zatricky]] 05:16, 24 December 2008 (EST)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Mirrors&diff=56029
Talk:Mirrors
2008-12-23T16:56:25Z
<p>Zatricky: /* archlinux.fr down? */</p>
<hr />
<div>== archlinux.fr down? ==<br />
<br />
Can't reach the main site or any of its subdomains. :/<br />
--[[User:Zatricky|Zatricky]] 11:55, 23 December 2008 (EST)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Mirrors&diff=56028
Talk:Mirrors
2008-12-23T16:55:18Z
<p>Zatricky: </p>
<hr />
<div>== archlinux.fr down? ==<br />
<br />
At least the ''manual'' method works. :)<br />
--[[User:Zatricky|Zatricky]] 11:55, 23 December 2008 (EST)</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Talk:Installing_VMware_Server_on_Arch64&diff=53396
Talk:Installing VMware Server on Arch64
2008-11-13T18:40:27Z
<p>Zatricky: Installing VMware Server 64 on Arch64</p>
<hr />
<div>If you want a easy installation of '''Vmware Workstation on Arch64''' follow these steps:<br />
<br />
- Install and run '''xinetd'''<br />
<br />
- Download the '''tar.gz''' version of '''Vmware-Workstation-64bits''' (you need to register before)<br />
<br />
<br />
(The next steps are taken from http://wiki.archlinux.org/index.php/Installing_VMware)<br />
<br />
- mkdir -p /etc/rc.d/vmware.d/rc{0,1,2,3,4,5,6}.d<br />
<br />
- ln -s /bin/lsmod /sbin/lsmod<br />
<br />
- run vmware-install.pl<br />
<br />
- when it asks where the directories for rc0.d thru rc6.d are, use /etc/rc.d/vmware.d.<br />
<br />
- when it asks where the init directory is, use /etc/rc.d.<br />
<br />
- run vmware-config.pl<br />
<br />
<br />
- Install '''emul32-xlibs''' from aur (remember change arch parameter from PKGBUILD)<br />
<br />
- Add this lines to '''/etc/ld.so.conf'''<br />
/opt/lib32/lib<br />
/opt/lib32/usr/lib<br />
/emul/linux/x86/lib<br />
/emul/linux/x86/usr/lib<br />
/emul/linux/x86/usr/qt/3/lib<br />
- Run '''ldconfig'''<br />
<br />
<br />
- RUN IT!!<br />
<br />
--[[User:Nak|Nak]] 17:45, 30 May 2007 (GMT+1)<br />
<br />
== Installing VMware Server 64 on Arch64 ==<br />
<br />
The guide seems to imply that on Arch64 you can only install 32bit VMWare Server.<br />
<br />
How do I go about installing 64bit VMWare Server?</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Simple_stateful_firewall&diff=52886
Simple stateful firewall
2008-11-07T23:41:59Z
<p>Zatricky: rm'd superfluous </code> tag</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:Security (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Simple stateful firewall HOWTO}}<br />
{{i18n_entry|Italiano|Semplice HOWTO per un firewall stateful}}<br />
{{i18n_links_end}}<br />
<br />
This page explains how to set up a simple stateful firewall using iptables. It also tries to explain what the rules mean and why they are needed. For simplicity, this HOWTO is split into two parts. The first part deals with a single machine, the second part sets up a NAT gateway.<br />
<br />
'''BIG FAT WARNING: For simplicity, the rules are given in the order that they are executed later. If you are logged into a remote machine, following the rules in the exact order they are given MAY result in your machine being unavailable to the network. Only do the steps below while you are logged in locally unless you know what you are doing. You have been warned.'''<br />
<br />
= Prerequisites =<br />
<br />
Before we start, we need to make sure that the necessary tools are available:<br />
<br />
$ pacman -Q iptables<br />
iptables 1.3.5-1<br />
<br />
If '''iptables''' is installed, you have to make sure that your kernel supports iptables. All Arch Linux stock kernels have iptables support.<br />
<br />
This HOWTO assumes that there are currently no iptables rules set. To check this, try the command<br />
<br />
# iptables -nvL<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination <br />
<br />
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination <br />
<br />
Chain OUTPUT (policy ACCEPT 0K packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination <br />
<br />
If the output looks like the above (except the packet counters), there are no rules set and you are good to go. If not, reset the tables like this:<br />
<br />
# iptables -P INPUT ACCEPT<br />
# iptables -P FORWARD ACCEPT<br />
# iptables -P OUTPUT ACCEPT<br />
# iptables -F<br />
# iptables -X<br />
<br />
= Setting up a single machine =<br />
<br />
== Creating necessary chains ==<br />
<br />
For this basic setup, we will create two custom chains. Their meaning is explained later:<br />
<br />
# iptables -N open<br />
# iptables -N interfaces<br />
<br />
== The INPUT chain ==<br />
<br />
Every packet that is received by any network interface and has one of the local host's IP addresses in the destination header will pass the '''INPUT''' chain first. In this chain we make sure that only the packets that we want are accepted.<br />
<br />
The first rule will accept all '''ICMP''' messages. '''ICMP''' means '''Internet Control Message Protocol'''. Some '''ICMP''' messages are very important, some are less important (like echo requests (pings)). None of them hurts, so it is generally a good idea not to block them:<br />
<br />
# iptables -A INPUT -p icmp -j ACCEPT<br />
<br />
The next rule will make sure that none of the traffic that belongs to already established connections will be dropped. This can be done with the '''state''' match. A package can have one of the four states '''ESTABLISHED''', '''RELATED''', '''NEW''' and '''INVALID'''. We want to accept all packets that are in state '''ESTABLISHED''' or '''RELATED''', hence the name "stateful firewall":<br />
<br />
# iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT<br />
<br />
In most cases, we do not want to deny all incoming connections. That's why we set up the two custom chains '''open''' and '''interfaces'''. For now, we are adding a rule for each of them:<br />
<br />
# iptables -A INPUT -j interfaces<br />
# iptables -A INPUT -j open<br />
<br />
Now, with the last two rules, we drop everything that hasn't been explicitly accepted above. For '''TCP''' packets, we deny the connection with a '''tcp-reset'''. Incoming '''UDP''' packets are answered with an '''ICMP''' message. This way, we imitate Linux's default behaviour:<br />
<br />
# iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset <br />
# iptables -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable <br />
<br />
All other protocols than '''TCP''', '''UDP''' and '''ICMP''' are dropped (unless they matched the state match above). We do this by setting the policy for the '''INPUT''' chain to '''DROP'''<br />
<br />
# iptables -P INPUT DROP<br />
<br />
== The FORWARD chain ==<br />
<br />
If you want to set up your machine as a NAT gateway, please look at the second section of this HOWTO. For a single machine, we simply set the policy of the '''FORWARD''' chain to '''DROP''' and move on:<br />
<br />
# iptables -P FORWARD DROP<br />
<br />
== The OUTPUT chain ==<br />
<br />
We have no intention of filtering any outgoing traffic. This would make the setup much more complicated and requires some extra thought. In this simple case, we set the '''OUTPUT''' policy to '''ACCEPT'''.<br />
<br />
# iptables -P OUTPUT ACCEPT<br />
<br />
== The interfaces chain ==<br />
<br />
We use the '''interfaces''' chain to accept any traffic from trusted interfaces. The first rule is absolutely necessary:<br />
<br />
# iptables -A interfaces -i lo -j ACCEPT<br />
<br />
This accepts every traffic from the loopback interface, which is necessary for many applications to work properly. You can add more interfaces here. For example, if you want to accept all incoming traffic from the interface '''eth0''', add this rule:<br />
<br />
# iptables -A interfaces -i eth0 -j ACCEPT<br />
<br />
Incoming connections on other interfaces will be denied, unless they hit another exception in the '''open''' chain.<br />
<br />
== The open chain ==<br />
<br />
The '''open''' chain contains rules for accepting incoming connections on specific ports or protocols. For example, if you want to accept ssh connections on every interface, add this rule:<br />
<br />
# iptables -A open -p tcp --dport 22 -j ACCEPT<br />
<br />
It is probably not a good idea to let the world connect to your machine on port 22 unless you run a public server. Therefore, you can limit which machines can connect to port 22 by modifying the /etc/hosts.allow file :<br />
<br />
<pre><br />
# Let local users connect via ssh<br />
sshd: 127.0.0.1<br />
<br />
# Allow these adress to connect via ssh<br />
sshd: 192.168.0.1<br />
sshd: 172.272.0.32<br />
</pre><br />
<br />
To accept incoming HTTP connections on the interface ppp0:<br />
<br />
# iptables -A open -i ppp0 -p tcp --dport 80 -j ACCEPT<br />
<br />
To accept all incoming tcp connections with destination ports 65000 to 65005 on interface foo:<br />
<br />
# iptables -A open -i foo -p tcp --dport 65000:65005 -j ACCEPT<br />
<br />
The same is of course possible with udp:<br />
<br />
# iptables -A open -i foo -p udp --dport 65000:65005 -j ACCEPT<br />
<br />
or with other protocols than tcp and udp:<br />
<br />
# iptables -A open -i foo -p 123 -j ACCEPT<br />
<br />
See man iptables for more advanced rules, like matching multiple ports or protocols.<br />
<br />
== Protection against common attacks ==<br />
<br />
=== Force SYN packets check ===<br />
<br />
Make sure NEW incoming tcp connections are SYN packets; otherwise we need to drop them:<br />
<br />
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP<br />
<br />
=== Force Fragments packets check ===<br />
<br />
Packets with incoming fragments. Drop them.<br />
<br />
iptables -A INPUT -f -j DROP<br />
<br />
=== XMAS packets ===<br />
<br />
Incoming malformed XMAS packets. Drop them:<br />
<br />
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP<br />
<br />
=== Drop all NULL packets ===<br />
<br />
Incoming malformed NULL packets:<br />
<br />
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP<br />
<br />
=== Spoofing attack ===<br />
<br />
Blocking reserved private networks incoming from the internet<br />
<br />
iptables -I INPUT -i eth0 -s 10.0.0.0/8 -j DROP<br />
iptables -I INPUT -i eth0 -s 172.16.0.0/12 -j DROP<br />
iptables -I INPUT -i eth0 -s 192.168.0.0/16 -j DROP<br />
iptables -I INPUT -i eth0 -s 127.0.0.0/8 -j DROP<br />
<br />
You can also add the following line to your /etc/sysctl.conf to enables source address verification which is inbuilt into Linux kernel itself.<br />
net.ipv4.conf.all.rp_filter = 1<br />
<br />
== "Hide" your computer == <br />
<br />
If you are running a desktop machine, it might be a good idea to block some incoming request.<br />
<br />
=== Block Ping Request ===<br />
<br />
A 'Ping' request is an ICMP packet sent to the destination address to ensure connectivity between the devices. If your network works well, you can safely block all ping request.<br />
<br />
iptables -A INPUT -p icmp --icmp-type echo-request -i eth0 -j DROP<br />
<br />
You can also add the following line to your /etc/sysctl.conf file<br />
<br />
net.ipv4.icmp_echo_ignore_all = 1<br />
<br />
=== ICMP type match blocking ===<br />
<br />
If your computer is not a router (like most desktop)<br />
<br />
iptables -I INPUT -p icmp --icmp-type redirect -j DROP<br />
iptables -I INPUT -p icmp --icmp-type router-advertisement -j DROP<br />
iptables -I INPUT -p icmp --icmp-type router-solicitation -j DROP<br />
iptables -I INPUT -p icmp --icmp-type address-mask-request -j DROP<br />
iptables -I INPUT -p icmp --icmp-type address-mask-reply -j DROP<br />
<br />
=== Block nmap's uptime detection ===<br />
<br />
Prevent uptime detection from port scanners like nmap<br />
<br />
Add the following line to your /etc/sysctl.conf file<br />
net.ipv4.tcp_timestamps = 0<br />
<br />
--- Other kernel parameters<br />
<br />
Add the following lines to your /etc/sysctl.conf file to prevent certain kind of attacks :<br />
<br />
net.ipv4.conf.all.accept_source_route=0<br />
net.ipv4.icmp_echo_ignore_broadcasts=1<br />
net.ipv4.icmp_ignore_bogus_error_messages=1<br />
<br />
== Saving the rules ==<br />
<br />
Now, the rules are ready and should be saved to your hard drive. First, we edit the configuration file '''/etc/conf.d/iptables''':<br />
<br />
# Configuration for iptables rules<br />
<br />
IPTABLES=/usr/sbin/iptables<br />
<br />
IPTABLES_CONF=/etc/iptables/iptables.rules<br />
IPTABLES_FORWARD=0 # disable IP forwarding!!!<br />
<br />
You can specify another filename than '''iptables.rules''' if you want.<br />
<br />
Now, save the rules with the command<br />
<br />
# /etc/rc.d/iptables save<br />
<br />
and make sure your rules are loaded when you boot by editing '''/etc/rc.conf''', iptables should be added preferably before 'network'.<br />
<br />
DAEMONS=(... iptables network ...)<br />
<br />
= Setting up a NAT gateway =<br />
<br />
This section of the HOWTO deals with NAT gateways. It is assumed that you already read the first part of the HOWTO and set up the '''INPUT''', '''OUTPUT''', '''open''' and '''interfaces''' chains like described above. All rules so far have been created in the '''filter''' table. In this section, we will also have to use the '''nat''' table.<br />
<br />
== Setting up the filter table ==<br />
<br />
Before we start, make sure that the '''FORWARD''' chain is empty:<br />
<br />
# iptables -F FORWARD<br />
<br />
=== Creating necessary chains ===<br />
<br />
In our setup, we will use another two chains in the filter table, the '''fw-interfaces''' and '''fw-open''' chains. Create them with the commands<br />
<br />
# iptables -N fw-interfaces<br />
# iptables -N fw-open<br />
<br />
=== Setting up the FORWARD chain ===<br />
<br />
Setting up the '''FORWARD''' chain is similar to the '''INPUT''' chain in the first section.<br />
<br />
Some networks and servers block '''ICMP''' messages and are preventing '''path MTU detection'''. If your outgoing interface's MTU is lower than the MTU on the local network (like with PPPoE connections), this may prevent you from communicating with such servers. The first rule works around this problem, at least for TCP connections:<br />
<br />
# iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu<br />
<br />
Now we set up a rule with the '''state''' match, identical to the one in the '''INPUT''' chain:<br />
<br />
# iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT<br />
<br />
The next step is to enable forwarding for trusted interfaces and to make all packets pass the '''fw-open''' chain.<br />
<br />
# iptables -A FORWARD -j fw-interfaces <br />
# iptables -A FORWARD -j fw-open <br />
<br />
The remaining packets are denied with an '''ICMP''' message:<br />
<br />
# iptables -A FORWARD -j REJECT --reject-with icmp-host-unreachable<br />
# iptables -P FORWARD DROP<br />
<br />
=== Setting up the fw-interfaces and fw-open chains ===<br />
<br />
The meaning of the '''fw-interfaces''' and '''fw-open''' chains is explained later, when we deal with the '''POSTROUTING''' and '''PREROUTING''' chains in the '''nat''' table, respectively.<br />
<br />
== Setting up the nat table ==<br />
<br />
All over this section, we assume that the outgoing interface (the one with the public internet IP) is '''ppp0'''. Keep in mind that you have to change the name in all following rules if your outgoing interface has another name.<br />
<br />
=== Setting up the POSTROUTING chain ===<br />
<br />
Now, we have to define who is allowed to connect to the internet. Let's assume we have the subnet '''192.168.0.0/255.255.255.0''' (which means all addresses that are of the form 192.168.0.*) on '''eth0'''. We first need to accept the machines on this interface in the FORWARD table, that's why we created the '''fw-interfaces''' chain above:<br />
<br />
# iptables -A fw-interfaces -i eth0 -j ACCEPT<br />
<br />
Now, we have to alter all outgoing packets so that they have our public IP address as the source address, instead of the local LAN address. To do this, we use the '''MASQUERADE''' target:<br />
<br />
# iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -o ppp0 -j MASQUERADE<br />
<br />
Don't forget the '''-o ppp0''' parameter above, if you omit it, your network will be screwed up.<br />
<br />
Let's assume we have another subnet, '''10.3.0.0/255.255.0.0''' (which means all addresses 10.3.*.*) on interface '''eth1'''. We add the same rules as above again:<br />
<br />
# iptables -A fw-interfaces -i eth1 -j ACCEPT<br />
# iptables -t nat -A POSTROUTING -s 10.3.0.0/255.255.0.0 -o ppp0 -j MASQUERADE<br />
<br />
The last step is to enable IP Forwarding (if it isn't already enabled):<br />
<br />
# echo 1 > /proc/sys/net/ipv4/ip_forward<br />
<br />
Machines from these subnets can now use your new NAT machine as their gateway. Note that you may want to set up a DNS and DHCP server like '''dnsmasq''' or a combination of '''bind''' and '''dhcpd''' to simplify network settings DNS resolution on the client machines. This is not the topic of this HOWTO.<br />
<br />
=== Setting up the PREROUTING chain ===<br />
<br />
Sometimes, we want to forward an incoming connection from the gateway to a LAN machine. To do this, we use the '''fw-open''' chain defined above, as well as the '''PREROUTING''' chain in the '''nat''' table<br />
<br />
I will give two simple examples: First, we want to forward all incoming SSH connections (port 22) to the ssh server in the machine '''192.168.0.5''':<br />
<br />
# iptables -A fw-open -d 192.168.0.5 -p tcp --dport 22 -j ACCEPT<br />
# iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 22 -j DNAT --to 192.168.0.5<br />
<br />
The second example will show you how to forward packets to a different port than the incoming port. We want to forward any incoming connection on port '''8000''' to our web server on '''192.168.0.6''', port '''80''':<br />
<br />
# iptables -A fw-open -d 192.168.0.6 -p tcp --dport 80 -j ACCEPT<br />
# iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 8000 -j DNAT --to 192.168.0.6:80<br />
<br />
The same setup also works with udp packets.<br />
<br />
== Saving the rules ==<br />
<br />
Like above, we have to save the rules. Only this time, we have to enable IP forwarding in '''/etc/conf.d/iptables''':<br />
<br />
# Configuration for iptables rules<br />
<br />
IPTABLES=/usr/sbin/iptables<br />
<br />
IPTABLES_CONF=/etc/iptables/iptables.rules<br />
IPTABLES_FORWARD=1 # enable IP forwarding!!!<br />
<br />
Save the rules<br />
<br />
# /etc/rc.d/iptables save<br />
<br />
and make sure your rules are loaded when you boot<br />
<br />
DAEMONS=(... iptables ...)<br />
<br />
= Working with knockd =<br />
knockd is a [http://www.portknocking.org/ port knocking] daemon that can provide an added layer of security to your network. The knockd [http://www.zeroflux.org/cgi-bin/cvstrac.cgi/knock/wiki wiki] provides three example port knocking configurations. These configs can be easily altered to intergrate properly with firewall described here. You should simply substitue the <tt>INPUT</tt> chain specification, with the custom <tt>open</tt> chain used in the firewall.<br />
<br />
For example:<br />
[options]<br />
logfile = /var/log/knockd.log<br />
[opencloseSSH]<br />
sequence = 2222:udp,3333:tcp,4444:udp<br />
seq_timeout = 15<br />
tcpflags = syn,ack<br />
start_command = /usr/sbin/iptables -A open -s %IP% -p tcp --syn --dport 22 -j ACCEPT<br />
cmd_timeout = 10<br />
stop_command = /usr/sbin/iptables -D open -s %IP% -p tcp --syn --dport 22 -j ACCEPT <br />
<br />
It is wise to randomly select the ports that you use for the knock sequence. Random.org [[http://www.random.org/nform.html link]] can help you generate a selection of ports between 1 and 65535. Once you have selected your port range check that you haven't inadvertantly selected a commonly used port; this [https://www.grc.com/PortDataHelp.htm port database] can help you check.</div>
Zatricky
https://wiki.archlinux.org/index.php?title=Graphical_GRUB&diff=52883
Graphical GRUB
2008-11-07T21:05:47Z
<p>Zatricky: obsolete</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:Eye candy (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|:Graphical_GRUB}}<br />
{{i18n_entry|简体中文|:Graphical_GRUB (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
<br />
== Obsoletion ==<br />
<br />
This mod has since been obsoleted by a community package, [http://aur.archlinux.org/packages.php?ID=2416 '''grub-gfx'''].<br />
<br />
== Introduction ==<br />
<br />
This is a mod to the current grub package found on Arch base repository which adds support for a splash image (a background).<br />
<br />
While the patch is not officially supported by grub developers due to their policy of only bugfixes on their grub 0.9x series, it is used by many distributions like Fedora/Red Hat, SuSE, Gentoo, MEPIS, and others. The patch I use is based on the one included by Fedora Core 3 grub srpm and rediffed to the latest vanilla grub version.<br />
<br />
After the installation is done, you will have a grub screen with the following background.<br />
http://www.mundolink.net/users/mariov/images/arch-grub-096.png<br />
<br />
<br />
Due to demand, the old splash image is optionally available for those who like it more.<br />
http://www.mundolink.net/users/mariov/images/arch-grub.png<br />
<br />
'''New:''' In addition to the standard package, a new alternate one is available for those who follow the [[Reiser4FShowto]] steps and want a grub package with both reiserfs4 and splashimage.<br />
<br />
== Pre Install Notes ==<br />
# Make a copy of your menu.lst for backup. It is not replaced by the installation steps below, unless you remove your current grub package.<br />
# We are dealing with your boot system info, so there is a small chance that things can be screw up. But I haven't got any issue.<br />
# If want to compile the package with the old splash image, or your custom splash image instead of the current one, you need to edit the PKGBUILD and change the md5sum assigned to <code>splash.xpm.gz</code>.<br />
# The alternate package with reiser4 requires '''libaal''', '''reiser4progs''', and a '''reiser4 patched kernel'''. Those are not on Arch repos, you can get them and read about all the process involved on [[Reiser4FShowto]], or grab my updated PKGBUILDs:[http://www.mundolink.net/users/mariov/arch/packages/libaal/PKGBUILD libaal], and [http://www.mundolink.net/users/mariov/arch/packages/reiser4progs/PKGBUILD reiser4progs].<br />
# Be sure not to upgrade grub via pacman after following this guide, as the version used in this guide is older than the current version available via pacman. You can set pacman to ignore any grub upgrades by editing your pacman.conf accordingly.<br />
<br />
== Installation ==<br />
'''Note:''' Reiser package not updated since reiser patch need to be rediffed.<br />
Files changed for 0.97-1: <code>PKGBUILD</code>, <code>menu.lst</code>.<br />
<br />
'''Note:''' grub-gfx can be found in the community-repo, so you just need to edit the menu.lst and add the splash file to your /boot directory.<br />
<br />
<br />
1. Grab the following files and save them on a folder on your <code>/var/abs/local</code> path:<br />
*[http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/*checkout*/system/grub-gfx/PKGBUILD?rev=HEAD&cvsroot=AUR&only_with_tag=CURRENT&content-type=text/plain PKGBUILD].<br />
* [http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/*checkout*/system/grub-gfx/menu.lst?rev=HEAD&cvsroot=AUR&only_with_tag=CURRENT&content-type=text/plain menu.lst]<br />
* [http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/*checkout*/system/grub-gfx/install-grub?rev=HEAD&cvsroot=AUR&only_with_tag=CURRENT&content-type=text/plain install-grub] o copiarlo desde /var/abs/base/grub/install-grub<br />
* [http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/system/grub-gfx/grub-0.97-graphics.patch?cvsroot=AUR&only_with_tag=CURRENT grub-0.97-graphics.patch]<br />
*[http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/*checkout*/system/grub-gfx/splash.xpm.gz?rev=HEAD&cvsroot=AUR&only_with_tag=CURRENT&content-type=image/x-xpixmap splash.xpm.gz]* '''Only for reiser4 support:''' grab the [http://www.mundolink.net/users/mariov/arch/packages/grub/reiser4/grub-0.96-reiser4.patch reiser4 patch]<br />
<br />
<br />
2. Build the package:<br />
# makepkg <br />
<br />
<br />
3. Install the package:<br />
# pacman -U grub-0.97-1.pkg.tar.gz <br />
<br />
<br />
4. Edit your <code>menu.lst</code> and add the following splash instruction anywhere before your OS's menu entries:<br />
splashimage /boot/grub/splash.xpm.gz<br />
For example:<br />
# general configuration:<br />
timeout 5<br />
default 0<br />
splashimage /boot/grub/splash.xpm.gz<br />
'''Important:''' Since grub 0.96-4 the splash path is <code>/boot/grub/splash.xpm.gz</code> and not <code>/grub/splash.xpm.gz</code>. Previous users need to correct the path.<br />
<br />
<p>Actually you should have: <code>splashimage /path/to/your/image.xpm{.gz} </code> relative to the grub's root<br />
partition<br/><br />
If you have separate partition for /boot:<br/><br />
<code>splashimage /grub/splash.xpm.gz</code><br/><br />
If you don't:<br/><br />
<code>splashimage /boot/grub/splash.xpm.gz</code><br/><br />
Wrong path makes grub hang with black screen and blinking cursor (without the prompt) :-(<br />
</p><br />
<br />
5. Install the new grub boot images to your <code>/boot</code> dir. Change ''x'' with your boot drive letter (ie. <code>hda</code>):<br />
# install-grub /dev/hd''x'' (or sd''x'')<br />
<br />
6. '''ONLY''' if your system dual boot '''AND''' your primary boot loader is '''NTLDR''' - remember to update your boot binary file (<code>dd if=/dev/hdx of=/linux.bin bs=512 count=1</code>) and copy the file to your NTFS boot partition. If you don't know what I'm talking, don't worry and just skip this step.<br />
<br />
== Troubleshooting ==<br />
==== Black display menu visible ====<br />
Stages probably not updated, try again <code>install-grub ''(your partition where /boot belongs, or MBR)''</code>. To check if your stage2 supports splash image, use [http://ruslug.rutgers.edu/~mcgrof/grub-images/checksplash.sh checksplash.sh] script.<br />
<br />
==== Black display, no menu, or corrupted display ====<br />
Check the splashimage instruction. If you have a separate <code>/boot</code> partition try <code>splashimage /grub/splash.xpm.gz</code>. Also check that you have a <code>splash.xpm.gz</code> in grub's dir.<br />
<br />
<br />
== FAQ ==<br />
==== 1. Can I use my custom image in grub? ====<br />
Yes, but it needs to fulfill these requisites: 640x480 resolution, 14 color xpm picture gzip compressed.<br />
<br />
==== 2. Do I need to recompile or reinstall grub when changing a splash? ====<br />
Any splash can be used at any time, and no compilation is required after this package is installed, just replace <code>splash.xpm.gz</code> with another one, or edit <code>menu.lst</code> and change the path of splashimage instruction to match the desired picture to show.<br />
<br />
==== 3. I currently use lilo, can I replace it with grub? ====<br />
Yes you can, but AFAIK the menu.lst get your drive partition info on Arch installation and not grub installation (and same applies to <code>lilo.conf</code>). So you need to edit the menu.lst after package installation and add your boot device and kernel image configuration. That kind of problem is beyond the scope of this guide. If that's your case, first get working the the standard grub package on the current repository, and then update to this package. For more info or sample grub configs check [[GRUB]] or [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2 Gentoo Handbook - Configure the bootloader].<br />
<br />
==== 4. Where can I get more information about splash images on grub? ====<br />
[http://ruslug.rutgers.edu/~mcgrof/grub-images/ GNU Grub Splashimage Howto] - General Grub bootsplash info and sample images.<br><br />
[http://ruslug.rutgers.edu/~mcgrof/grub-images/checksplash.sh checksplash.sh] - script that check if your stage2 support splashimage.<br />
<br />
==== 5. I would like to test your package, but do not know how to build one? ====<br />
Simply, download the [http://www.mundolink.net/users/mariov/arch/packages/grub/grub-0.97-1.pkg.tar.gz pre-compiled package] and install it using step 3, 4 and 5 of the Installation guide. :-)<br />
<br />
<br />
== Current Issues ==<br />
None at the moment.<br />
<br />
== TODO ==<br />
I will investigate the patch used by SuSE/Novell. It is a new modified one that allows for a greater resolution (not just 640x480) and more fancy stuff like menus. But that will means a heavy modified grub install, and thus completely sure it will not be accepted on Arch repos, and please don't ask when it will be done.<br />
<br />
<br />
== Change Log ==<br />
2005-05-16 Updated to 0.97<br><br />
2005-03-02 Added alternate PKGBUILD with reiser4 support and related grub patch.<br><br />
2005-02-27 PKGBUILD 0.96-4, Fix splashimage path issue by adding a boot symlink on boot.<br><br />
2005-02-26 Fixed some document steps.<br><br />
2005-02-04 Provided old splash image for those who like it more.<br><br />
2005-02-03 PKGBUILD 0.96-3, removed dependency on gzip. Splash is taken from $startdir instead of the uncompressed one on <code>$statdir/src</code>. Pre-compiled package provided. (FAQ question #4).<br><br />
2005-02-02 Updated to grub 0.96, rediffed patch, new splash based on tpowa's KDE 3.4 wallpaper.<br><br />
2005-01-09 Added autoreconf entry to fix compilation of new files added by patch. Update to FAQ.<br><br />
2005-01-06 First public release of PKGBUILD based on grub 0.95.<br><br />
<br />
<br />
----<br />
<br />
Hope you enjoy it.<br />
<br />
[http://bbs.archlinux.org/viewtopic.php?t=9081&highlight= Original by '''darkcoder''']<br><br />
Wikified by [[User:Romashka|Romashka]].</div>
Zatricky