| 
| Autor | Sõnum |  
| akbgf Vana Pingviin
 
  
  
 
 Liitunud: 07.10.2009
 Postitused: 763
 Asukoht: Tõravere
 Distributsioon: OpenSUSE, Ubuntu
 
  
   |  
 
 
| 
| 
 |  
| Kasutan USB-ketast varundamiseks ja mitte ei saa aru, miks selleks nii kaua aega kulub. Kasutan selleks rsync-i ja mikes handy rotating-filesystem-snapshot utility
 http://www.mikerubel.org/computers/rsync_snapshots/ modifitseeritud varianti.
 
 Võib ju diskuteerida, et miks just niisugust, aga probleem on hoopis selles, et ühe WD 2T USB-2 kettale varukoopia tegemiseks kulub 2-3 tundi, Seagate 4T USB-3 kettale kümme-üksteist tundi kauem nii ketast USB-3 kui USB-2 sisendisse ühendades. Kogu varukoopia suurus on umbes 1T, aga päevane muutus mõistagi palju väiksem. Faile varukoopias umbes 1.2 miljonit.
 
 lsusb -v väljundid on niisugused:
 
 WD My Book 1111
 
  	  | Kood: |  	  | Bus 001 Device 016: ID 1058:1111 Western Digital Technologies, Inc. 
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.00
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0
 bDeviceProtocol         0
 bMaxPacketSize0        64
 idVendor           0x1058 Western Digital Technologies, Inc.
 idProduct          0x1111
 bcdDevice           20.03
 iManufacturer           1 Western Digital
 iProduct                2 My Book 1111
 iSerial                 3 574341565934393235343036
 bNumConfigurations      1
 Configuration Descriptor:
 bLength                 9
 bDescriptorType         2
 wTotalLength           32
 bNumInterfaces          1
 bConfigurationValue     1
 iConfiguration          0
 bmAttributes         0xc0
 Self Powered
 MaxPower                2mA
 Interface Descriptor:
 bLength                 9
 bDescriptorType         4
 bInterfaceNumber        0
 bAlternateSetting       0
 bNumEndpoints           2
 bInterfaceClass         8 Mass Storage
 bInterfaceSubClass      6 SCSI
 bInterfaceProtocol     80 Bulk-Only
 iInterface              0
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x81  EP 1 IN
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0200  1x 512 bytes
 bInterval               0
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x02  EP 2 OUT
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0200  1x 512 bytes
 bInterval               0
 Device Qualifier (for other device speed):
 bLength                10
 bDescriptorType         6
 bcdUSB               2.00
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0
 bDeviceProtocol         0
 bMaxPacketSize0        64
 bNumConfigurations      1
 Device Status:     0x0001
 Self Powered
 | 
 
 Seagate RSS LLC USB-2 sisendis:
 
  	  | Kood: |  	  | Bus 001 Device 017: ID 0bc2:a0a4 Seagate RSS LLC 
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.10
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0
 bDeviceProtocol         0
 bMaxPacketSize0        64
 idVendor           0x0bc2 Seagate RSS LLC
 idProduct          0xa0a4
 bcdDevice            1.00
 iManufacturer           2 Seagate
 iProduct                3 Backup+ Desk
 iSerial                 1 NA5K0LES
 bNumConfigurations      1
 Configuration Descriptor:
 bLength                 9
 bDescriptorType         2
 wTotalLength           85
 bNumInterfaces          1
 bConfigurationValue     1
 iConfiguration          0
 bmAttributes         0xc0
 Self Powered
 MaxPower              100mA
 Interface Descriptor:
 bLength                 9
 bDescriptorType         4
 bInterfaceNumber        0
 bAlternateSetting       0
 bNumEndpoints           2
 bInterfaceClass         8 Mass Storage
 bInterfaceSubClass      6 SCSI
 bInterfaceProtocol     80 Bulk-Only
 iInterface              0
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x81  EP 1 IN
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0200  1x 512 bytes
 bInterval               0
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x02  EP 2 OUT
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0200  1x 512 bytes
 bInterval               0
 Interface Descriptor:
 bLength                 9
 bDescriptorType         4
 bInterfaceNumber        0
 bAlternateSetting       1
 bNumEndpoints           4
 bInterfaceClass         8 Mass Storage
 bInterfaceSubClass      6 SCSI
 bInterfaceProtocol     98
 iInterface              0
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x81  EP 1 IN
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0200  1x 512 bytes
 bInterval               0
 Data-in pipe (0x03)
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x02  EP 2 OUT
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0200  1x 512 bytes
 bInterval               0
 Data-out pipe (0x04)
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x83  EP 3 IN
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0200  1x 512 bytes
 bInterval               0
 Status pipe (0x02)
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x04  EP 4 OUT
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0200  1x 512 bytes
 bInterval               0
 Command pipe (0x01)
 Binary Object Store Descriptor:
 bLength                 5
 bDescriptorType        15
 wTotalLength           22
 bNumDeviceCaps          2
 USB 2.0 Extension Device Capability:
 bLength                 7
 bDescriptorType        16
 bDevCapabilityType      2
 bmAttributes   0x00000002
 Link Power Management (LPM) Supported
 SuperSpeed USB Device Capability:
 bLength                10
 bDescriptorType        16
 bDevCapabilityType      3
 bmAttributes         0x00
 wSpeedsSupported   0x000e
 Device can operate at Full Speed (12Mbps)
 Device can operate at High Speed (480Mbps)
 Device can operate at SuperSpeed (5Gbps)
 bFunctionalitySupport   1
 Lowest fully-functional device speed is Full Speed (12Mbps)
 bU1DevExitLat          10 micro seconds
 bU2DevExitLat        2047 micro seconds
 Device Status:     0x0001
 Self Powered
 | 
 
 
 Seagate RSS LLC USB-3 sisendis:
 
  	  | Kood: |  	  | Bus 003 Device 003: ID 0bc2:a0a4 Seagate RSS LLC 
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               3.00
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0
 bDeviceProtocol         0
 bMaxPacketSize0         9
 idVendor           0x0bc2 Seagate RSS LLC
 idProduct          0xa0a4
 bcdDevice            1.00
 iManufacturer           2 Seagate
 iProduct                3 Backup+ Desk
 iSerial                 1 NA5K0LES
 bNumConfigurations      1
 Configuration Descriptor:
 bLength                 9
 bDescriptorType         2
 wTotalLength          121
 bNumInterfaces          1
 bConfigurationValue     1
 iConfiguration          0
 bmAttributes         0xc0
 Self Powered
 MaxPower               36mA
 Interface Descriptor:
 bLength                 9
 bDescriptorType         4
 bInterfaceNumber        0
 bAlternateSetting       0
 bNumEndpoints           2
 bInterfaceClass         8 Mass Storage
 bInterfaceSubClass      6 SCSI
 bInterfaceProtocol     80 Bulk-Only
 iInterface              0
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x81  EP 1 IN
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0400  1x 1024 bytes
 bInterval               0
 bMaxBurst              15
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x02  EP 2 OUT
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0400  1x 1024 bytes
 bInterval               0
 bMaxBurst              15
 Interface Descriptor:
 bLength                 9
 bDescriptorType         4
 bInterfaceNumber        0
 bAlternateSetting       1
 bNumEndpoints           4
 bInterfaceClass         8 Mass Storage
 bInterfaceSubClass      6 SCSI
 bInterfaceProtocol     98
 iInterface              0
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x81  EP 1 IN
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0400  1x 1024 bytes
 bInterval               0
 bMaxBurst              15
 MaxStreams             32
 Data-in pipe (0x03)
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x02  EP 2 OUT
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0400  1x 1024 bytes
 bInterval               0
 bMaxBurst              15
 MaxStreams             32
 Data-out pipe (0x04)
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x83  EP 3 IN
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0400  1x 1024 bytes
 bInterval               0
 bMaxBurst              15
 MaxStreams             32
 Status pipe (0x02)
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x04  EP 4 OUT
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0400  1x 1024 bytes
 bInterval               0
 bMaxBurst               0
 Command pipe (0x01)
 Binary Object Store Descriptor:
 bLength                 5
 bDescriptorType        15
 wTotalLength           22
 bNumDeviceCaps          2
 USB 2.0 Extension Device Capability:
 bLength                 7
 bDescriptorType        16
 bDevCapabilityType      2
 bmAttributes   0x00000002
 Link Power Management (LPM) Supported
 SuperSpeed USB Device Capability:
 bLength                10
 bDescriptorType        16
 bDevCapabilityType      3
 bmAttributes         0x00
 wSpeedsSupported   0x000e
 Device can operate at Full Speed (12Mbps)
 Device can operate at High Speed (480Mbps)
 Device can operate at SuperSpeed (5Gbps)
 bFunctionalitySupport   1
 Lowest fully-functional device speed is Full Speed (12Mbps)
 bU1DevExitLat          10 micro seconds
 bU2DevExitLat        2047 micro seconds
 Device Status:     0x0001
 Self Powered
 | 
 
 
 OS on OpenSUSE-12.3, Linux 3.7.10-1.16-pae i686 i686 i386 GNU/Linux,
 arvutiks Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz.
 
 Kas keegi oskab anda mõne vihje, milleks see aeg kulub?
 'Load' on kogu aeg üle 2, samas protsessori kasutus väike.
 
 E(16:05):
 Tegin lihtsa kopeerimise, 13 faili, neist neli suured, üheksa väga väikesed, kokku 448M.
 
 # time cp -a ...
 real    6m13.639s
 user    0m0.008s
 sys     0m2.184s
 
 Seega umbes 1.2 M/s.
 Failisüsteem USB-kettal on ext3.
 Mount parameetrid:
 /dev/sdc1 on /mnt/backup type ext3 (rw,nosuid,nodev,noexec,relatime,sync,data=ordered)
 |  
|  |  |  |  
| 
 
 |  |  
|  |    |  
| arti Pingviini aktivist
 
  
  
 Vanus: 30
 Liitunud: 17.10.2011
 Postitused: 114
 Asukoht: Väike-Maarja
 Distributsioon: Arch Linux
 
  
   |  
 
 
| 
| 
 |  
| palju niisama dd käsuga kiirust kätte saad ? (see käsk kirjutab umbes 1GB jagu kraami kettale) 
  	  | Kood: |  	  | dd if=/dev/zero of=/mnt/backup/write_test bs=4096 count=256K			 | 
 dd käsu ajal võid kudagil teises terminalis top käsu lahti hoida ja vaadata palju kernel cpu aega ära kasutab, vb usb3 draiverid kehvad
 
 võid proovida mõne uuema kerneliga kui on võimalik, 3.7 on juba suhteliselt vana kernel mis minuteada enam upstreamist uuendusi ei saa
 
 võid proovida ka mount optionied tweakida, näiteks midagi sellist:
 
  	  | Kood: |  	  | sudo mount -o remount,defaults,rw,nosuid,nodev,noexec /mnt/backup			 | 
 |  
|  |  |  |  
| 
 
 |  |  
|  |    |  
| akbgf Vana Pingviin
 
  
  
 
 Liitunud: 07.10.2009
 Postitused: 763
 Asukoht: Tõravere
 Distributsioon: OpenSUSE, Ubuntu
 
  
   |  
 
 
| 
| 
 |  
| > palju niisama dd käsuga kiirust kätte saad ? (see käsk kirjutab umbes 1GB jagu kraami kettale) 
 Päris palju saan:
 # time dd if=/dev/zero of=/mnt/backup/tst/zero.bin bs=10M count=100
 100+0 records in
 100+0 records out
 1048576000 bytes (1.0 GB) copied, 18.0616 s, 58.1 MB/s
 real    0m18.348s
 user    0m0.000s
 sys     0m1.440s
 
 Top näitas dd 7-8% CPU, 0.1% MEM
 
 
 > võid proovida mõne uuema kerneliga kui on võimalik, 3.7 on juba
 > suhteliselt vana kernel mis minuteada enam upstreamist uuendusi ei saa
 
 Hm, septembri alguses installeerisin sellal 'current' stabiilse.
 Repod on
 openSUSE-12.3-1.7
 openSUSE-12.3-Update, teisi muidugi ka.
 
 Tuuma versiooni kohta ütleb yast, et uuemat pole, aga muutuste logi lõpeb tõesti 31. mail 2013.
 
 
 Kopeerisin 257M faili sdb-lt sda-le:
 # time cp ....
 real    0m2.860s
 user    0m0.004s
 sys     0m0.228s
 
 sda-lt USB-kettale:
 # time cp suur /mnt/backup/tst
 real    3m55.901s
 user    0m0.008s
 sys     0m1.260s
 
 top näitab alla 1% CPU cp ja usb-storage,
 aga 'load' on 2, xosview näitab enamasti CPU7 io-wait 100%.
 
 
 > võid proovida ka mount optionied tweakida, näiteks midagi sellist:
 > mount -o remount,defaults,rw,nosuid,nodev,noexec /mnt/backup
 
 Sellega mount parameetrid ei muutunud, relatime ja data=ordered on ext3 vaikimisi parameetrid, ju vist sync ka.
 
 Kopeerisin sama faili dd-ga. Kui bloki suurust ei andnud, siis ei jõudnud ära oodata, kümne minutiga sai 1.6% kopeeritud.
 
 Suure blokiga:
 
 # time dd if=/tmp/suur of=/mnt/backup/tst/suur bs=10M
 25+1 records in
 25+1 records out
 268460752 bytes (268 MB) copied, 4.06943 s, 66.0 MB/s
 
 Probleem näikse selles olevat, et cp ja rsync kasutavad väikseid blokke.
 
 
 E (11.11.2013):
 Tegin veel mõne proovi.
 
 # time dd if=/dev/zero of=/mnt/backup/tst/zero.bin bs=100M count=10
 1048576000 bytes (1.0 GB) copied, 11.764 s, 89.1 MB/s
 
 # time dd if=/dev/zero of=/mnt/backup/tst/zero.bin bs=10M count=100
 1048576000 bytes (1.0 GB) copied, 16.7582 s, 62.6 MB/s
 
 # time dd if=/dev/zero of=/mnt/backup/tst/zero.bin bs=1M count=1000
 1048576000 bytes (1.0 GB) copied, 68.0652 s, 15.4 MB/s
 
 # time dd if=/dev/zero of=/mnt/backup/tst/zero.bin bs=100k count=10000
 1024000000 bytes (1.0 GB) copied, 531.61 s, 1.9 MB/s
 
 Ketta poole pöördumise aeg umbes 50 ms. Aeg kulub sinna, USB-3-l on  kiirust küll.
 Kas 50 ms on kettaseadme või OS-i probleem, ei oska arvata.
 |  
|  |  |  |  
| 
 
 |  |  
|  |    |  
| chris Pingviini aktivist
 
  
 
 
 Liitunud: 16.02.2009
 Postitused: 146
 Asukoht: Tallinn
 Distributsioon: Debian 6.0/7.0
 
  
   |  
 
 
| 
| 
 |  
| No kinni istub I/O-s, siis on tavaliselt kaks varianti: surev riistvara või niru draiver. Sureva riistvara saab välistada teise arvuti/op.-süsteemiga (kiire kopeerimine == korras riistvara).
 Niru draiver on ainult asendatav uuemaga. Tavakasutaja võtab selleks kasutusele uusima kerneli; oskajam katsetab lisaks veel USB arendajate olevaid eksperimntaalseid draivereid.
 |  
|  |  |  |  
| 
 
 |  |  
|  |   |  
| akbgf Vana Pingviin
 
  
  
 
 Liitunud: 07.10.2009
 Postitused: 763
 Asukoht: Tõravere
 Distributsioon: OpenSUSE, Ubuntu
 
  
   |  
 
 
| 
| 
 |  
| > No kinni istub I/O-s, siis on tavaliselt kaks varianti: surev riistvara või niru draiver. 
 Tuttuuel kettal on vara surra.
 
 > Sureva riistvara saab välistada teise arvuti/op.-süsteemiga (kiire kopeerimine == korras riistvara).
 
 See lihtne võimalus osutus raskemaks kui oleks arvanud. Leidsin USB-3-ga arvuti, mida sai korra proovimiseks kasutada - sellel oli mingi Debian 2.6 tuumaga, mis ei teadnud USB-3-st midagi. Teisel RH Enterprise Server, ka 2.6 tuumaga. Ühel uuel kobedal sülearvutil on USB-3 ja MSW, see ei osanud ext3-ga midagi peale hakata.
 
 > Niru draiver on ainult asendatav uuemaga. Tavakasutaja võtab selleks kasutusele uusima kerneli; oskajam katsetab lisaks veel USB arendajate olevaid eksperimntaalseid draivereid.
 
 Ega see niiväga selge ole, kuhu aeg võib kuluda, usb_storage on ainult interface USB-seadme ja SCSI vahel. Kuskil seal on veel usb_core. Keegi võrgus kurtis, et USB-ketas jäi aeglaseks Chaintechi emaplaadi mingi silla pärast - mul ka Chaintech. Mul pole vaba USB-3-ga arvutit, millel OS-e ja draivereid proovida.  Tegin uue 3.9 tuumaga Knoppixi plaadi ja proovisin seda - käras küll. Ilmselt 'current' ja stabiilne SUSE (tuum 3.7.10) ei saa ikka USB-3-ga hakkama. Ei oska arvata, kui suurt rolli see mängib, et Knoppixil on kõik USB-moodulid tuuma sisse kompileeritud. SUSE kasutab oma jaoks kohandatud tuumi, ehk sellepärast on neil stabiilse distro tuumad eakamad, The Linux Kernel Archive pakub 3.12.
 
 Kas kellelgi on SUSE 'tested factory'-ga kogemusi, kas selle võib tööarvutile panna? Factorys pakutakse tuuma 3.11.
 Masin on 24/7 rakkes ja USB-3 ketta ostsin, et varundamisega hakkama saaks. Enne proovisin, et ära tundis, aga kiirusi ei testinud, uskusin spetsifikatsioone.
 
 
 E (14.11.2013):
 
  	  | chris kirjutas: |  	  | oskajam katsetab lisaks veel USB arendajate olevaid eksperimntaalseid draivereid.			 | 
 Proovisin lähtetekstist kompileeritud SUSE factory 3.11.6-5.1 usb-storage moodulit ja The Linux Kernel Archives 3.9.11 usb-storage moodulit.
 Kumbagi ei saanud laadida. SUSE oma ütles, et Unknown symbol kmalloc_caches,
 3.9.11 mooduli laadimine lõppes seg-faultiga ja [permanent] poolt kinni hoitava laetud usb_storage mooduliga, millega ei saa midagi teha, aga välja ka ei saa, et vana asemele panna.
 Ei saa välja ei kinnihoidvat protsessi killides ega rmmod -f-ga.
 
 
 E: 03.12.2013:
 
 Vist lahendatud.
 
 Mount
 /dev/sdc1 on /mnt/backup type ext3 (rw,nosuid,nodev,noexec,relatime,sync,data=ordered)
 
 sync teeb aeglaseks.
 |  
|  |  |  |  
| 
 
 |  |  
|  |    |  
| chris Pingviini aktivist
 
  
 
 
 Liitunud: 16.02.2009
 Postitused: 146
 Asukoht: Tallinn
 Distributsioon: Debian 6.0/7.0
 
  
   |  
 
 
| 
| 
 |  
|  	  | akbgf kirjutas: |  	  | Mount 
/dev/sdc1 on /mnt/backup type ext3 (rw,nosuid,nodev,noexec,relatime,sync,data=ordered)
 
 sync teeb aeglaseks.
 | 
 Teeb tõesti.
 |  
|  |  |  |  
| 
 
 |  |  
|  |   |  
|  |  |