Ühes varasemas artiklis oli juttu, kuidas teha MacBook-i jaoks sobilik Linux-i mälupulk. See oli üsnagi vaevaline protsess. Samas, kui üks mälupulk on juba valmis, siis selle kloonimine käib juba tunduvalt kiiremini, kui värske süsteemi nullist installeerimine. Panen siia kirja, kuidas kloonisin ning mida tähele panna mälupulga valikul.

Esiteks oli mul süsteem installitud Samsungi 128GB mälupulgale (tootekood MUF-128BC/EU).

Siis tuli mõte, et võiks teha igaks juhuks süsteemist koopia ja pigem siis juba väljareklaamitud "kiiremale" mälupulgale, milleks valisin tormakalt "Kingston 128GB HyperX Savage USB 3.13.0 350MBs R, 250MBs W" (tootekood HXS3/128GB). See mälupulk võib olla hea suurte videofailide kiireks transpordiks ühest seadmest teise, kuid Linuxit ei soovita sellele kindlasti installeerida. Proovisin selle ise järgi ja võin seda kinnitada. Põhjus on selles, et juhuslik kirjutamiskiirus on sellel eriti vilets.

 

Nagu pildilt näha, see on vaid ligi 0.02MB/s ehk umbes 20kB/s. Nüüd peaks olema selgemast selgem, et arvuti kettamäluna kasutamiseks on see täiesti kõlbmatu.

Lisaks sellele võiks mälupulk olla väikeste mõõtmetega, et ei oleks ohtu seda ära painutada või koguni murda. Lehekülg http://www.everythingusb.com/mini-drives.html annab alustuseks üsna hea ülevaate. Kõige rohkem pakub siin huvi tabel "väikeste failide test". Selle põhjal võib välistada Transcend ja Kingston mälupulgad. Lexar mälupulk tundub paljulubav. Selle kohta leidsin internetist testi: http://www.cdrinfo.com/Sections/Reviews/Print.aspx?ArticleId=45899. Siin on juhuslik kirjutamise kiirus 1.8MB/s ringis. See pole iseenesest paha, kuid ei ole ka eriline supertulemus.

Kaht ülejäänut mälupulka oli mul endal võimalik testida.

SanDisk Ultra Fit 64GB USB3.0 (tootekood: SDCZ43-064G-GAM46):

Nagu näha, on sellel juhuslik kirjutamiskiirus ligi 2.4 MB/s.

 

 SAMSUNG MEMORY DRIVE FLASH USB3 64GB/FIT (tootekood: MUF-64BB/EU):

Nagu näha, on sellel juhuslik kirjutamiskiirus ligi 1.6 MB/s, mis jääb ligi 1.5-kordselt Sandisk-le. Järjestikune kirjutamiskiirus on küll sellel parem.

 

Nüüd siis samm-sammuline õpetus, kuidas mälupulka kloonida.

Esiteks, kui meil on mälupulgad täpselt sama marki ja sama mahuga, siis ei ole meil midagi keerulist vaja teha. Piisab ühest käsklusest root õigustes:

root@ubuntu:/home/ubuntu# dd if=/dev/sdX of=/dev/sdY status=progress

Siin  /dev/sdX on lähteseadme nimi (näiteks /dev/sdb) ja /dev/sdY on sihtseadme nimi (näiteks /dev/sdc).

 

Kuna soovime, et saaksime hakkama algsest mälupulgast suuremamahuliste ja väiksemamahuliste mälupulkadega, siis järgnev õpetus on selline, mis peaks töötama igal juhul. Clonezilla on hea tööriist, kuid praegusel juhul see ei sobi, sest see ei saanud hakkama, kui siht-mälupulk oli väiksema mahuga.

  • Laadi süsteem Ubuntu Live USB mälupulgalt.
  • Käivita terminal ja mine root õigustesse (sudo su)
  • Ühenda algne mälupulk, mida soovid kloonida ja vaata, mis seadmega tegemist: 
root@ubuntu:/home/ubuntu# dmesg | tail
[  310.490449] sd 4:0:0:0: Embedded Enclosure Device
[  310.491322] sd 4:0:0:0: [sde] 250609664 512-byte logical blocks: (128 GB/120 GiB)
[  310.492108] sd 4:0:0:0: [sde] Write Protect is off
[  310.492111] sd 4:0:0:0: [sde] Mode Sense: 43 00 00 00
[  310.492902] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  310.496962] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 12 ep 4 with no TDs queued?
[  310.503583]  sde: sde1 sde2 sde3
[  310.505359] sd 4:0:0:0: [sde] Attached SCSI removable disk
[  310.800562] EXT4-fs (sde2): mounted filesystem with ordered data mode. Opts: (null)
[  310.801602] hfsplus: Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended.  mounting read-only.
root@ubuntu:/home/ubuntu#

Nagu näha, on mälupulgaks, mida soovime kloonida /dev/sde. Haagime selle lahti:

root@ubuntu:/home/ubuntu# umount /dev/sde1
root@ubuntu:/home/ubuntu# umount /dev/sde2

Ühendame sihtmälupulga, millele soovime süsteemi koopiat saada ja jälgime viimaseid süsteemi teateid:

root@ubuntu:/home/ubuntu# dmesg | tail
[ 1151.845156] usb-storage 2-2.4:1.0: USB Mass Storage device detected
[ 1151.845347] scsi host5: usb-storage 2-2.4:1.0
[ 1152.846386] scsi 5:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
[ 1152.846764] sd 5:0:0:0: Attached scsi generic sg6 type 0
[ 1152.846972] sd 5:0:0:0: [sdf] 121307136 512-byte logical blocks: (62.1 GB/57.8 GiB)
[ 1152.848058] sd 5:0:0:0: [sdf] Write Protect is off
[ 1152.848063] sd 5:0:0:0: [sdf] Mode Sense: 43 00 00 00
[ 1152.848360] sd 5:0:0:0: [sdf] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1152.856281]  sdf: sdf1
[ 1152.857398] sd 5:0:0:0: [sdf] Attached SCSI removable disk
root@ubuntu:/home/ubuntu#

Nagu näha, on sihtmälupulgaks /dev/sdf.  Haagime ka selle lahti:

root@ubuntu:/home/ubuntu# umount /dev/sdf1

Säilitame algse ketta partitsioonitabeli failis: 

root@ubuntu:/home/ubuntu# sfdisk -d /dev/sde > part_table

Teeme sellest koopia:

root@ubuntu:/home/ubuntu# cp part_table part_table.new

Kuna meil on algsest 128GB suurusega mälupulgast 2 korda väiksema mahuga 64GB mälupulk, siis teeme Linuxi partitsiooni 2 korda väiksemaks ning kustutame ketta viimase partitsioonitabeli failist part_table.new rea "last-lba:". Kustutame ka saaleala: 

root@ubuntu:/home/ubuntu# nano part_table.new
root@ubuntu:/home/ubuntu# cat part_table
label: gpt
label-id: 9CBB15CF-EE67-4645-BF0D-94B643673A7A
device: /dev/sde
unit: sectors
first-lba: 34
last-lba: 250609630

/dev/sde1 : start=        2048, size=     1048576, type=48465300-0000-11AA-AA11-00306543ECAC, uuid=B1620C92-5464-4A45-9596-749E0B9E96E0, name="Apple HFS/HFS+"
/dev/sde2 : start=     1050624, size=   233017344, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=890654F7-EDFC-44B9-A587-D6DD84CDFC8C
/dev/sde3 : start=   234067968, size=     4268032, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=EBFEA9AB-6453-406E-8A25-78DEF89364C7
root@ubuntu:/home/ubuntu# cat part_table.new
label: gpt
label-id: 9CBB15CF-EE67-4645-BF0D-94B643673A7A
device: /dev/sde
unit: sectors
first-lba: 34

/dev/sde1 : start=        2048, size=     1048576, type=48465300-0000-11AA-AA11-00306543ECAC, uuid=B1620C92-5464-4A45-9596-749E0B9E96E0, name="Apple HFS/HFS+"
/dev/sde2 : start=     1050624, size=   116508672, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=890654F7-EDFC-44B9-A587-D6DD84CDFC8C
root@ubuntu:/home/ubuntu#

Loome sihtketta partitsioonitabeli:

root@ubuntu:/home/ubuntu# sfdisk /dev/sdf < part_table.new
Checking that no-one is using this disk right now ... OK

Disk /dev/sdf: 57.9 GiB, 62109253632 bytes, 121307136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Old situation:

Device     Boot Start       End   Sectors  Size Id Type
/dev/sdf1          32 121307135 121307104 57.9G  c W95 FAT32 (LBA)

>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new GPT disklabel (GUID: 9CBB15CF-EE67-4645-BF0D-94B643673A7A).
Created a new partition 1 of type 'Apple HFS/HFS+' and of size 512 MiB.
/dev/sdf2: Created a new partition 2 of type 'Linux filesystem' and of size 55.6 GiB.
/dev/sdf3: 
New situation:

Device       Start       End   Sectors  Size Type
/dev/sdf1     2048   1050623   1048576  512M Apple HFS/HFS+
/dev/sdf2  1050624 117559295 116508672 55.6G Linux filesystem

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
root@ubuntu:/home/ubuntu#

Kuna vaba ruumi jäi üle, teen ülejäänust saaleala fdiski abil:

root@ubuntu:/home/ubuntu# fdisk /dev/sdf

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdf: 57.9 GiB, 62109253632 bytes, 121307136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9CBB15CF-EE67-4645-BF0D-94B643673A7A

Device       Start       End   Sectors  Size Type
/dev/sdf1     2048   1050623   1048576  512M Apple HFS/HFS+
/dev/sdf2  1050624 117559295 116508672 55.6G Linux filesystem

Command (m for help): n
Partition number (3-128, default 3): 
First sector (117559296-121307102, default 117559296): 
Last sector, +sectors or +size{K,M,G,T,P} (117559296-121307102, default 121307102): 

Created a new partition 3 of type 'Linux filesystem' and of size 1.8 GiB.

Command (m for help): 


#Muudan partitsiooni tüüpi käsklusega t (kood on 19):

Command (m for help): t
Partition number (1-3, default 3): 
Hex code (type L to list all codes): 19

Changed type of partition 'Linux filesystem' to 'Linux swap'.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

root@ubuntu:/home/ubuntu#

Partitsioonid on nüüd olemas. Kopeerin esimese partitsiooni üksühele: 

root@ubuntu:/home/ubuntu# dd if=/dev/sde1 of=/dev/sdf1 status=progress
1048576+0 records in
1048576+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 38.3341 s, 14.0 MB/s

Vormindame Linuxi partitsiooni:

root@ubuntu:/home/ubuntu# mkfs.ext4 /dev/sdf2
mke2fs 1.42.13 (17-May-2015)
Creating filesystem with 14563584 4k blocks and 3645440 inodes
Filesystem UUID: 7618c18b-ce8c-496f-9acc-70465a45a20b
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   

root@ubuntu:/home/ubuntu#

Nüüd kopeerime failid lähtekettalt sihtkettale:

root@ubuntu:/home/ubuntu# cd /mnt
root@ubuntu:/mnt# mkdir src
root@ubuntu:/mnt# mkdir dest
root@ubuntu:/mnt/src# mount /dev/sde2 /mnt/src/
root@ubuntu:/mnt# mount /dev/sdf2 /mnt/dest/
root@ubuntu:/mnt# cd /mnt/src/
root@ubuntu:/mnt/src# ls
bin   cdrom  etc   initrd.img      lib    lost+found  mnt  proc  run   snap  sys  usr  vmlinuz
boot  dev    home  initrd.img.old  lib64  media       opt  root  sbin  srv   tmp  var  vmlinuz.old

root@ubuntu:/mnt/src# cp -ax * /mnt/dest/
root@ubuntu:/mnt/src#

Ei tohi siiski unustada üht asja. Linuxi partitsiooni uuid ei klapi lähtemälupulga omaga ja kui me seda ära ei muudaks, siis jääks meie alglaadimise protsess pooleli:


Vaatame, missugune uuid on algsel kettal ning muudame: 

root@ubuntu:/home/ubuntu# umount /dev/sdf2
root@ubuntu:/home/ubuntu# blkid
/dev/sda1: LABEL="EFI" UUID="67E3-17ED" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="77c9b9ea-2820-4a35-b1ce-14eeb718c550"
/dev/sda2: UUID="4b0dffb8-116a-3c15-82bb-e600ea4e84fd" LABEL="Macintosh HD" TYPE="hfsplus" PARTLABEL="Macintosh HD" PARTUUID="9eb89476-089f-40ee-8282-ca15cd696232"
/dev/sda3: UUID="ce15f085-23c8-312f-b8a7-032aefa63adc" LABEL="Recovery HD" TYPE="hfsplus" PARTUUID="566b48c9-0a4c-4e28-bc0a-b15feeccaeeb"
/dev/sda4: LABEL="BOOTCAMP" UUID="34F5EE1202469FF7" TYPE="ntfs" PARTLABEL="BOOTCAMP" PARTUUID="6668bf40-7b08-44c4-9a2f-2439b97b567b"
/dev/loop0: TYPE="squashfs"
/dev/sdb1: UUID="2016-07-19-21-27-51-00" LABEL="Ubuntu 16.04.1 LTS amd64" TYPE="iso9660" PTUUID="40a863e7" PTTYPE="dos" PARTUUID="40a863e7-01"
/dev/sdb2: SEC_TYPE="msdos" UUID="0F7B-9366" TYPE="vfat" PARTUUID="40a863e7-02"
/dev/sdd1: LABEL="My Book" UUID="A2CA0AEBCA0ABC13" TYPE="ntfs"
/dev/sde1: UUID="1377ab46-39b3-3b2a-945c-cd42fe36bb96" LABEL="Ubuntu" TYPE="hfsplus" PARTLABEL="Apple HFS/HFS+" PARTUUID="b1620c92-5464-4a45-9596-749e0b9e96e0"
/dev/sde2: UUID="5e6559fc-f5e2-462f-9ab3-8a7aed3fd243" TYPE="ext4" PARTUUID="890654f7-edfc-44b9-a587-d6dd84cdfc8c"
/dev/sde3: UUID="824910eb-ecfe-440d-89e7-fde115028d37" TYPE="swap" PARTUUID="ebfea9ab-6453-406e-8a25-78def89364c7"
/dev/sdf1: UUID="1377ab46-39b3-3b2a-945c-cd42fe36bb96" LABEL="Ubuntu" TYPE="hfsplus" PARTLABEL="Apple HFS/HFS+" PARTUUID="b1620c92-5464-4a45-9596-749e0b9e96e0"
/dev/sdf2: UUID="7618c18b-ce8c-496f-9acc-70465a45a20b" TYPE="ext4" PARTUUID="890654f7-edfc-44b9-a587-d6dd84cdfc8c"
/dev/sdf3: PARTUUID="7bd0976b-0ca9-4ea0-ac50-96a8518228a1"
root@ubuntu:/home/ubuntu# sudo tune2fs /dev/sdf2 -U 5e6559fc-f5e2-462f-9ab3-8a7aed3fd243
tune2fs 1.42.13 (17-May-2015)
root@ubuntu:/home/ubuntu# blkid
/dev/sda1: LABEL="EFI" UUID="67E3-17ED" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="77c9b9ea-2820-4a35-b1ce-14eeb718c550"
/dev/sda2: UUID="4b0dffb8-116a-3c15-82bb-e600ea4e84fd" LABEL="Macintosh HD" TYPE="hfsplus" PARTLABEL="Macintosh HD" PARTUUID="9eb89476-089f-40ee-8282-ca15cd696232"
/dev/sda3: UUID="ce15f085-23c8-312f-b8a7-032aefa63adc" LABEL="Recovery HD" TYPE="hfsplus" PARTUUID="566b48c9-0a4c-4e28-bc0a-b15feeccaeeb"
/dev/sda4: LABEL="BOOTCAMP" UUID="34F5EE1202469FF7" TYPE="ntfs" PARTLABEL="BOOTCAMP" PARTUUID="6668bf40-7b08-44c4-9a2f-2439b97b567b"
/dev/loop0: TYPE="squashfs"
/dev/sdb1: UUID="2016-07-19-21-27-51-00" LABEL="Ubuntu 16.04.1 LTS amd64" TYPE="iso9660" PTUUID="40a863e7" PTTYPE="dos" PARTUUID="40a863e7-01"
/dev/sdb2: SEC_TYPE="msdos" UUID="0F7B-9366" TYPE="vfat" PARTUUID="40a863e7-02"
/dev/sdd1: LABEL="My Book" UUID="A2CA0AEBCA0ABC13" TYPE="ntfs"
/dev/sde1: UUID="1377ab46-39b3-3b2a-945c-cd42fe36bb96" LABEL="Ubuntu" TYPE="hfsplus" PARTLABEL="Apple HFS/HFS+" PARTUUID="b1620c92-5464-4a45-9596-749e0b9e96e0"
/dev/sde2: UUID="5e6559fc-f5e2-462f-9ab3-8a7aed3fd243" TYPE="ext4" PARTUUID="890654f7-edfc-44b9-a587-d6dd84cdfc8c"
/dev/sde3: UUID="824910eb-ecfe-440d-89e7-fde115028d37" TYPE="swap" PARTUUID="ebfea9ab-6453-406e-8a25-78def89364c7"
/dev/sdf1: UUID="1377ab46-39b3-3b2a-945c-cd42fe36bb96" LABEL="Ubuntu" TYPE="hfsplus" PARTLABEL="Apple HFS/HFS+" PARTUUID="b1620c92-5464-4a45-9596-749e0b9e96e0"
/dev/sdf2: UUID="5e6559fc-f5e2-462f-9ab3-8a7aed3fd243" TYPE="ext4" PARTUUID="890654f7-edfc-44b9-a587-d6dd84cdfc8c"
/dev/sdf3: PARTUUID="7bd0976b-0ca9-4ea0-ac50-96a8518228a1"
root@ubuntu:/home/ubuntu#

Seejärel taaskäivitame arvuti uuelt mälupulgalt. Mida teha saaleala partitsiooniga? Tundub, et Ubuntu Linux soovib selle igal võimalusel kasutusele võtta. Tegin siis selle asja korda, kuid sättisin nii, et saaleala kasutataks minimaalselt:

root@tiit-macbook:/home/tiit# fdisk -l /dev/sdb
Disk /dev/sdb: 57,9 GiB, 62109253632 bytes, 121307136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9CBB15CF-EE67-4645-BF0D-94B643673A7A

Seade          Start       End  Sektorid  Size Tüüp
/dev/sdb1       2048   1050623   1048576  512M Apple HFS/HFS+
/dev/sdb2    1050624 117559295 116508672 55,6G Linux filesystem
/dev/sdb3  117559296 121307102   3747807  1,8G Linuxi swap
root@tiit-macbook:/home/tiit# mkswap /dev/sdb3
Setting up swapspace version 1, size = 1,8 GiB (1918869504 bytes)
no label, UUID=2656b21c-6145-456b-b671-119100c3bb2f
root@tiit-macbook:/home/tiit# blkid
/dev/sda1: LABEL="EFI" UUID="67E3-17ED" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="77c9b9ea-2820-4a35-b1ce-14eeb718c550"
/dev/sda2: UUID="4b0dffb8-116a-3c15-82bb-e600ea4e84fd" LABEL="Macintosh HD" TYPE="hfsplus" PARTLABEL="Macintosh HD" PARTUUID="9eb89476-089f-40ee-8282-ca15cd696232"
/dev/sda3: UUID="ce15f085-23c8-312f-b8a7-032aefa63adc" LABEL="Recovery HD" TYPE="hfsplus" PARTUUID="566b48c9-0a4c-4e28-bc0a-b15feeccaeeb"
/dev/sda4: LABEL="BOOTCAMP" UUID="34F5EE1202469FF7" TYPE="ntfs" PARTLABEL="BOOTCAMP" PARTUUID="6668bf40-7b08-44c4-9a2f-2439b97b567b"
/dev/sdb1: UUID="1377ab46-39b3-3b2a-945c-cd42fe36bb96" LABEL="Ubuntu" TYPE="hfsplus" PARTLABEL="Apple HFS/HFS+" PARTUUID="b1620c92-5464-4a45-9596-749e0b9e96e0"
/dev/sdb2: UUID="5e6559fc-f5e2-462f-9ab3-8a7aed3fd243" TYPE="ext4" PARTUUID="890654f7-edfc-44b9-a587-d6dd84cdfc8c"
/dev/sdb3: UUID="2656b21c-6145-456b-b671-119100c3bb2f" TYPE="swap" PARTUUID="7bd0976b-0ca9-4ea0-ac50-96a8518228a1"
root@tiit-macbook:/home/tiit# nano /etc/fstab
root@tiit-macbook:/home/tiit# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb2 during installation
UUID=5e6559fc-f5e2-462f-9ab3-8a7aed3fd243 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdb3 during installation
UUID=2656b21c-6145-456b-b671-119100c3bb2f none            swap    sw              0       0
UUID=1377ab46-39b3-3b2a-945c-cd42fe36bb96 /boot/efi auto defaults 0 0
root@tiit-macbook:/home/tiit# swapon /dev/sdb3
root@tiit-macbook:/home/tiit# swapon -s
Filename                Type        Size    Used    Priority
/dev/sdb3                                  partition    1873896    0    -1
root@tiit-macbook:/home/tiit#nano /etc/sysctl.conf

Lisasin siia faili rea:

vm.swappiness=1

Nüüd siis veel tulemustest. Samsung FIT 64GB mälupulgalt käivitus Ubuntu umbes 30 sekundiga. Sandisk Ultra Fit oli mõni sekund aeglasem. Üldiselt tunduvad need mälupulgad olevat suhteliselt samas klassis. Lõpetuseks veel testid Linuxis:

#SAMSUNG MEMORY DRIVE FLASH USB3 64GB/FIT

tiit@tiit-macbook:~$ bonnie++ -d /tmp -r 2048
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version  1.97       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
tiit-macbook     4G  1102  72 28989   1 34591   1 +++++ +++ +++++ +++  61.7   0
Latency              6283us    4662ms    5234ms    2622us      40us      97us
Version  1.97       ------Sequential Create------ --------Random Create--------
tiit-macbook        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16  1139   0 +++++ +++  9759   5  9686   5 +++++ +++ +++++ +++
Latency               402us     719us     331us      90us      35us      56us
1.97,1.97,tiit-macbook,1,1488186811,4G,,1102,72,28989,1,34591,1,+++++,+++,+++++,+++,61.7,0,16,,,,,1139,0,+++++,+++,9759,5,9686,5,+++++,+++,+++++,+++,6283us,4662ms,5234ms,2622us,40us,97us,402us,719us,331us,90us,35us,56us
tiit@tiit-macbook:~$

tiit@tiit-macbook:~$ dd if=/dev/zero of=./largefile bs=1M count=1024
1024+0 kirjet sisse
1024+0 kirjet välja
1073741824 baiti (1,1 GB, 1,0 GiB) kopeeritud, 29,1436 s, 36,8 MB/s
tiit@tiit-macbook:~$ sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"
[sudo] password for tiit:
tiit@tiit-macbook:~$ dd if=./largefile of=/dev/null bs=4k
262144+0 kirjet sisse
262144+0 kirjet välja
1073741824 baiti (1,1 GB, 1,0 GiB) kopeeritud, 9,38188 s, 114 MB/s
tiit@tiit-macbook:~$
  
#SanDisk Ultra Fit 64GB USB3.0

tiit@tiit-macbook:~$ bonnie++ -d /tmp -r 2048
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version  1.97       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
tiit-macbook     4G  1253  82 21774   1 20453   1 +++++ +++ +++++ +++  3953  28
Latency              5776us    1564ms    5215ms    1686us      25us    5818us
Version  1.97       ------Sequential Create------ --------Random Create--------
tiit-macbook        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 17253   9 +++++ +++ 31424  14 26748  15 +++++ +++ +++++ +++
Latency                46us     350us     262us      90us      33us     228us
1.97,1.97,tiit-macbook,1,1488183498,4G,,1253,82,21774,1,20453,1,+++++,+++,+++++,+++,3953,28,16,,,,,17253,9,+++++,+++,31424,14,26748,15,+++++,+++,+++++,+++,5776us,1564ms,5215ms,1686us,25us,5818us,46us,350us,262us,90us,33us,228us
tiit@tiit-macbook:~$ dd if=/dev/zero of=./largefile bs=1M count=1024
1024+0 kirjet sisse
1024+0 kirjet välja
1073741824 baiti (1,1 GB, 1,0 GiB) kopeeritud, 0,382226 s, 2,8 GB/s
tiit@tiit-macbook:~$ sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"
tiit@tiit-macbook:~$ dd if=./largefile of=/dev/null bs=4k
262144+0 kirjet sisse
262144+0 kirjet välja
1073741824 baiti (1,1 GB, 1,0 GiB) kopeeritud, 9,95021 s, 108 MB/s
tiit@tiit-macbook:~$

 

 

Linke:

http://www.asjade.net/artiklid/86-macbook-usb-ubuntu-linux

http://www.samsung.com/us/computing/memory-storage/usb-flash-drives/muf-128bc-am-muf-128bc-am/

https://www.sandisk.com/home/usb-flash/ultra-fit-usb

http://www.markit.eu/ee/et/flashdrive-sandisk-ultra-fit-64gb-usb3-0-128/v2p11925074

http://askubuntu.com/questions/134749/how-can-i-fix-the-lag-when-running-ubuntu-installed-on-a-usb-drive

http://www.everythingusb.com/mini-drives.html

http://www.cdrinfo.com/Sections/Reviews/Print.aspx?ArticleId=45899

http://www.samsung.com/us/computing/memory-storage/usb-flash-drives/usb-3-0-flash-drive-fit-64gb-muf-64bb-muf-64bb-am/

http://clonezilla.org/

http://unix.stackexchange.com/questions/131311/moving-var-home-to-separate-partition

http://askubuntu.com/questions/440326/how-can-i-turn-off-swap-permanently

https://www.jamescoyle.net/how-to/599-benchmark-disk-io-with-dd-and-bonnie

http://www.binarytides.com/linux-test-drive-speed/