IRC log of #cubox of Sun 13 Sep 2015. All times are in CEST < Back to index

05:01 murder hey people, just got a seagata expansion usb3 5tb HDD to use with my cubox
05:01 murder the primary purpose for this HDD is broken due to USB 2.0 limitation
05:01 murder so, I bought a SATA deck and put it in it
05:01 murder however, it seems debian jessie for cubox i4pro doesnt support 5tb disks, is that true?
05:02 murder because when trying to mount, it doesnt succeed
05:02 mk01 ?
05:02 murder also, when issuing a 'fdisk', it doesnt read every sector
05:02 mk01 how is the disc identified and logged into "dmesg" ?
05:02 murder so, I've been using this HDD with usb 2.0 of cubox i4pro
05:02 murder hmm
05:03 murder now its mounted as usb 2.0
05:03 murder what you want me to look at?
05:03 mk01 log in, type "dmesg"
05:03 murder ok ..
05:03 mk01 and look for output like this :
05:03 mk01 [ 5.680808] usb-storage 1-1.2.1.4:1.0: USB Mass Storage device detected
05:03 mk01 [ 5.681303] usb-storage 1-1.2.1.4:1.0: Quirks match for vid 152d pid 2329: 8020
05:03 mk01 [ 5.681407] scsi host1: usb-storage 1-1.2.1.4:1.0
05:03 mk01 [ 6.546386] scsi 0:0:0:0: Direct-Access Hitachi HTS727550A9E362 JF3A PQ: 0 ANSI: 2 CCS
05:03 mk01 [ 6.547919] sd 0:0:0:0: Attached scsi generic sg0 type 0
05:03 mk01 [ 6.551785] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
05:04 mk01 [ 6.552577] sd 0:0:0:0: [sda] Write Protect is off
05:04 mk01 [ 6.552602] sd 0:0:0:0: [sda] Mode Sense: 28 00 00 00
05:04 mk01 [ 6.553140] sd 0:0:0:0: [sda] No Caching mode page found
05:04 mk01 [ 6.553164] sd 0:0:0:0: [sda] Assuming drive cache: write through
05:04 mk01 [ 6.627862] sda: sda1 sda9
05:04 murder dont worry, I'm kinda used to Linux, I was just looking to paste it on sprunge
05:04 mk01 ok .
05:05 mk01 so my opening question was, how is this disk identified when attached via eSata
05:05 murder http://sprunge.us/diGN
05:05 murder this is how it looks like when attached to sata tray
05:05 murder opz, sorry, to usb2.0
05:06 murder you want me to mount it using sata and check ?
05:06 mk01 so reattach to esata and check the same, yes
05:06 murder okay
05:06 murder one moment
05:06 mk01 take your time
05:07 murder I have to switch my boot to emmc because I'm using the current sata tray with a 300gb HDD running this linux
05:07 murder so I'll reconnect from another machine
05:12 murder sd 0:0:0:0: [sda] 9767541168 512-byte logical blocks: (5.00 TB/4.54 TiB)
05:12 murder sd 0:0:0:0: [sda] 4096-byte physical blocks
05:12 murder sd 0:0:0:0: [sda] Write Protect is off
05:12 murder sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
05:12 murder sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2
05:12 murder sd 0:0:0:0: [sda] Attached SCSI disk
05:12 murder here.
05:12 murder thats how it looks like
05:12 mk01 looks fine to me
05:13 murder okay, lets try it.
05:13 mk01 the same number of logical 0.5k blocks
05:13 mk01 and same capacity
05:13 mk01 ok, go on
05:13 murder Device Boot Start End Blocks Id System
05:13 murder /dev/sda1 * 2048 1195341823 597669888 83 Linux
05:13 murder /dev/sda2 1195341824 1220942591 12800384 7 HPFS/NTFS/exFAT
05:14 murder root@prime:~# mount -t ext4 /dev/sda2 /tmp/mnt/
05:14 murder mount: wrong fs type, bad option, bad superblock on /dev/sda2,
05:14 murder missing codepage or helper program, or other error
05:14 murder In some cases useful info is found in syslog - try
05:14 murder dmesg | tail or so
05:14 murder erors:
05:14 murder EXT4-fs (sda2): VFS: Can't find ext4 filesystem
05:14 murder F2FS-fs (sda2): Magic Mismatch, valid(0xf2f52010) - read(0x4b4a330d)
05:14 murder F2FS-fs (sda2): Can't find valid F2FS filesystem in 2th superblock
05:14 murder FAT-fs (sda1): bogus number of reserved sectors
05:15 murder I guess my problem is with GPT
05:15 murder this disk isnt partitioned with GPT
05:15 murder however, it accepts USB 2.0 normally
05:16 mk01 murder: does the part table looks the same when on USB ?
05:16 murder hmm..
05:16 murder I dont know
05:16 murder let me see
05:16 mk01 wait wait
05:16 murder ok
05:17 murder look how parted sees it:
05:17 murder Number Start End Size Type File system Flags
05:17 murder 1 1049kB 612GB 612GB primary boot
05:17 murder 2 612GB 625GB 13.1GB primary
05:17 mk01 can you post the whole fdisk output ?
05:17 murder yes
05:17 mk01 where it reports block size ?
05:18 mk01 it is disk with native 4k sectors I suppose ?
05:18 murder http://sprunge.us/eLYh
05:18 mk01 ((sure, perhaps all new have that))
05:18 murder i didnt touch the sectors, so yes, thats what disk and parted reports
05:21 mk01 use gdisk (guid compatible fdisk) to convert that MBR into GPT, or destroy the MBR and create GPT while preserve the start-end blocks
05:21 murder ok
05:21 mk01 (the data should be safe)
05:22 murder OK; writing new GUID partition table (GPT) to /dev/sda.
05:22 mk01 you converted ?
05:23 murder yes
05:23 murder ill reboot
05:23 mk01 ok
05:23 mk01 ok
05:23 mk01 maybe enough is umount
05:23 mk01 and partprobe /dev/sdb
05:23 murder it wasnt mounted
05:25 murder something is terribly wrong.
05:26 mk01 ((as much as you keep the fdisk output and recreate MBR with those values - you should be always able to revert back))
05:27 mk01 just don't run any kind of auto recoveries, or FS fsck's or partition finders etc
05:27 murder the problem is fdisk doesnt report a real value
05:27 murder it doesnt read more than 2tb
05:28 mk01 that;s because into structure of MBR one can't fit so big number that 0.5k block will cover the capacity
05:29 murder now, I cant mount it, basically, previosly I had 2 partitions, as you could see
05:29 murder the first one was something like 4.5tb and the other one the rest
05:30 murder since I couldnt think of a better way to save current layout, because the current layout is totally unreal
05:30 murder I created a new partition using the whole disk
05:30 murder including the last partition, that was a ntfs if I remember correctly
05:30 murder now, what I need to do, is use something that recreates the ext4 structure without losing first partition data, that was ext4 already
05:31 murder and uses the new available space that was from the secondary parititon before
05:31 murder do you have any idea?
05:31 mk01 for that
05:32 mk01 the new one big part must start where previously it was starting
05:32 mk01 so at 2048
05:32 murder 1 2048 9767541134 4.5 TiB 8300 Linux filesystem
05:33 murder yes.
05:33 murder its there already
05:33 mk01 then there is resize2fs
05:33 mk01 what will expand the FS to the new boundaries
05:34 murder cant use it, it doesnt locate the superblock
05:37 mk01 murder: initially , you created part on USB with fdisk ?
05:38 murder yes
05:38 mk01 then reconnect like this
05:38 mk01 (via USB)
05:38 mk01 create new part via
05:38 mk01 fdisk
05:38 mk01 (can be just one as you wish)
05:39 mk01 and just use the defaults (for start and end)
05:39 mk01 NOW the 2048 start isn't probably the same start as it was created
05:39 mk01 (that's why superblocks can't be found)
05:40 murder ok
05:40 murder but then Ill lose the GPT partition
05:40 murder so no purpose
05:40 mk01 yes, I'm aware of that
05:40 mk01 but we haven't stored the geometry on UDSB
05:40 mk01 (((to see how it was created)))
05:40 mk01 and only way I can think of to get it
05:41 murder ok
05:41 mk01 ((for further manipulation /hacks))
05:41 murder hope i dont use 4tb data in there
05:41 murder heh
05:41 mk01 is to recreate the condition - and partition (it's start)
05:41 mk01 and save the geometry fo reference
05:43 murder what was the previous geometry we had?
05:43 murder I had to reconnect and lost terminal
05:44 mk01 on SATA you mean ?
05:44 murder on USB
05:44 mk01 05:14 murder: Device Boot Start End Blocks Id System
05:44 mk01 05:14 murder: /dev/sda1 * 2048 1195341823 597669888 83 Linux
05:44 mk01 05:14 murder: /dev/sda2 1195341824 1220942591 12800384 7 HPFS/NTFS/exFAT
05:44 mk01 murder: we don't have that from USB
05:44 murder shit
05:45 mk01 that's why I asked you to re-create MBR with defaults (on USB)
05:45 mk01 because it will be the same
05:45 murder you want me to create the mbr, but using the same layout as before that was used in USB
05:45 mk01 (start - which is what is needed to hit superblocks)
05:45 murder or keep what I want now? using the entire disk
05:45 mk01 I don';t care 1 or 2 partitions
05:46 murder I'm using resize2fs now
05:46 murder lets see
05:47 murder it would be much simpler if I just didnt care about the data
05:47 murder I'd have tried to parted it and format
05:48 mk01 looij
05:48 mk01 look
05:48 mk01 if on USB
05:48 mk01 the geom matches
05:48 mk01 and you see the ext4
05:48 murder first
05:49 murder when I recreated it using fdisk, he tried to push me for start at 256
05:49 murder First sector (256-1220942644, default 256): 2048
05:49 murder but I put 2048 as you can see
05:49 mk01 yes, because 2048/4096*512 = 256
05:50 mk01 (on USB it uses 4096k for calculations)
05:50 mk01 on eSata it used 512b
05:50 murder usb 2.0 is so terrible for mixed usage
05:50 murder I mean, any USB I guess
05:50 mk01 to sum up
05:50 mk01 do you have NOW all ok ?
05:50 mk01 partition accessible ?
05:50 murder not acessible, I'm resize2fs it
05:51 murder I think I shouldnt do it before I tried to copy the geometry
05:51 mk01 sure, but resize2fs wasn't failing on 'superblock not found', right ?
05:51 murder was failing when using esata
05:51 murder now with usb it accepts
05:52 mk01 sure, we speak about NOW about USB
05:52 mk01 ;)
05:52 mk01 so once resized
05:52 mk01 convert to GPT (while on USB)
05:52 murder is resize2fs supposed to count IO usage?
05:53 mk01 this way 512/4096 block size will match
05:53 murder because I'm monitoring iostat and sda shows 0 IO
05:53 mk01 as for MBR
05:53 murder done
05:54 murder good. it worked.
05:54 murder it mounted as well.
05:54 murder now I will convert to GPT
06:43 murder shit
06:43 murder mk01: I think the kernel doesnt support GPT
06:44 murder this is so strange
06:47 mk01 check that kernel is comppiled with: CONFIG_EFI_PARTITION and CONFIG_LBDAF
06:49 murder yes they are there
06:50 mk01 and again it uses values recalculated ? (so 2048 is not 2048 but 2048/4096*512 (256)) ?
06:50 murder where?
06:51 mk01 I don't know. you are saying "this is so strange"
06:51 mk01 so perhaps you can dive into some details :)
06:51 murder yes, sorry
06:51 murder so, I've used fdisk to use old partition table
06:51 murder ok, could mount it
06:52 murder then I used gdisk to use the entire disk as one partition
06:52 mk01 yes
06:52 mk01 I was there
06:52 mk01 I remember ;)
06:52 murder fine, just fine, ran resize2fs and it resized to the entire disk as well
06:52 murder mounted, working, could read dir contents
06:52 mk01 then you converted
06:52 murder but that all in USB
06:52 mk01 yes I know
06:52 mk01 so you converted to GPT ...
06:52 murder yes.
06:52 mk01 retested on USB
06:53 mk01 after reboot that it works ?
06:53 murder no, was direct to esata
06:53 murder I was supposed to boot usb after that?
06:53 mk01 I would just reboot again to DOUBLE check that even after conversion - to GPT - you can still read it
06:54 murder alright
06:54 murder let me try again
06:54 mk01 also, grab
06:54 mk01 GEOMETRY
06:54 mk01 from it
06:55 mk01 ((once you will be on USB attach with the disk))
06:55 mk01 that we have it
06:55 murder ok
06:55 mk01 do you have jessie on it ?
06:55 mk01 (on the system)
06:56 murder yes
06:56 murder with a somewhat-new kernel
06:56 murder 3.14.43
06:57 murder ok, fdisk again, deleted all partitions, created a new one that starts at 2048 and goes to the max that fdisk can handle, /dev/sda1 2048 1220942644 588795092 83 Linux
06:57 murder it mounts
06:57 murder strange, because
06:58 murder that 1220942644 end and 588795092 blocks
06:58 mk01 I was asking because on jessie fdisk
06:58 mk01 root@xbian ~ # fdisk -v
06:58 mk01 fdisk from util-linux 2.25.2
06:58 mk01 supports GPT as well
06:58 murder 2.20 here
07:00 murder do you feel comfortable to use fdisk in place of gdisk?
07:00 mk01 you can upgrade (then you don't have to use different tools)
07:00 murder because gdisk seems a good alternative to not lose data
07:00 murder I've just did
07:00 murder fdisk from util-linux 2.25.2
07:00 mk01 yep, that's it
07:00 mk01 so do fdisk -l
07:01 murder Disk /dev/sda: 4.6 TiB, 5000981073920 bytes, 1220942645 sectors
07:01 murder Units: sectors of 1 * 4096 = 4096 bytes
07:01 murder Sector size (logical/physical): 4096 bytes / 4096 bytes
07:01 murder I/O size (minimum/optimal): 4096 bytes / 4096 bytes
07:01 murder Disklabel type: dos
07:01 murder Disk identifier: 0x00000000
07:01 murder Device Boot Start End Sectors Size Id Type
07:01 murder /dev/sda1 2048 1220942644 1220940597 4.6T 83 Linux
07:01 mk01 ok, that matches
07:01 mk01 (calculations)
07:02 mk01 now reatach to esata and reboot
07:02 murder ok
07:02 mk01 and let's see what we get from this fdisk again
07:03 murder I've heard that MIGHT BE that some sata docks has this kind of limitation
07:03 murder but how'd that work? since sata is just the communication layer
07:04 murder now ..
07:04 murder look at this
07:04 mk01 I have the feeling that on SATA the data are read directly from DEVICE IDENTIFY data and while on USB, SCSI emulation kicks in
07:04 murder Disk /dev/sda: 4.6 TiB, 5000981078016 bytes, 9767541168 sectors
07:04 murder Units: sectors of 1 * 512 = 512 bytes
07:04 murder Sector size (logical/physical): 512 bytes / 4096 bytes
07:04 murder I/O size (minimum/optimal): 4096 bytes / 4096 bytes
07:04 murder Disklabel type: dos
07:04 murder Disk identifier: 0x00000000
07:04 murder Device Boot Start End Sectors Size Id Type
07:04 murder /dev/sda1 2048 1220942644 1220940597 582.2G 83 Linux
07:05 mk01 ok, so let's recalculate
07:05 murder its the same numbers
07:05 murder oh no, sectors changed
07:05 mk01 yes, but dofferent sector size
07:05 mk01 exactly
07:05 mk01 so we have to adapt
07:06 mk01 new partition should start at 2048 / 4096 * 512 = 256
07:06 murder GPT?
07:06 mk01 no
07:06 mk01 just start fdisk
07:06 mk01 delete this
07:06 mk01 one partition
07:06 mk01 create new
07:07 murder First sector (2048-4294967295, default 2048): 256
07:07 murder Value out of range.
07:07 mk01 just I calc wrong. it is the other way. 2048 / 512 * 4096 = 16384
07:07 murder ok
07:07 murder Last sector, +sectors or +size{K,M,G,T,P} (16384-4294967294, default 4294967294):
07:07 murder this number changed
07:08 murder Last sector, +sectors or +size{K,M,G,T,P} (16384-4294967294, default 4294967294):
07:08 murder Created a new partition 1 of type 'Linux' and of size 2 TiB.
07:08 mk01 so max size 2tb ?
07:08 murder yes
07:08 murder used dos
07:09 mk01 if you don't save the new layout and restart fdisk with -b 4096 ?
07:10 murder you mean, create this new one with -b 4096 as argument?
07:10 mk01 let me think
07:10 mk01 ....
07:10 mk01 create new
07:10 mk01 but GPT
07:10 mk01 sart at 16384
07:10 mk01 start at 16384
07:11 mk01 and to full disk
07:11 mk01 what happens
07:11 murder ok, /dev/sda1 16384 9767541134 9767524751 4.6T Linux filesystem
07:11 murder well.
07:11 murder I think I love you
07:11 murder sorry.
07:11 mk01 finally !
07:11 mk01 nope ?
07:11 murder it works.
07:11 murder mounted
07:11 mk01 great
07:12 murder /dev/sda1 4.6T 4.4T 131G 98% /mnt/usb
07:12 murder just to make sure
07:12 murder let me reboot
07:12 mk01 so the problem was on SATA it goes low level with 512b
07:12 mk01 on USB due to the limitations of MBR
07:12 mk01 it was calculating with 4096
07:13 mk01 so the physical location didn't match
07:13 murder I wont ever partition via usb
07:13 murder if I tell I bought this disk last year
07:13 murder and could never put it online via esata
07:13 murder I had terribles and terribles headaches due to using it to boot linux
07:13 murder usb is terrible for operating systems
07:14 murder thanks, a lot
07:14 mk01 welcome
07:15 mk01 ((only I'm not sure it will be readable on USB, but you can try))
07:15 mk01 I have bunch of 3tb disks, but never tried them on USB
07:16 murder I dont care USB
07:16 murder was using just because I was in hurry by the time
07:16 murder and used it USB
07:16 murder and when I realized I wanted to use esata, due to the throughput problem
07:16 mk01 yes, I know. just I'm interested - and perhaps you are now my only chance to get answer
07:16 murder I already had circa 4tb data in it and afraid of losing it
07:16 mk01 (as myself I will never try :) )
07:17 murder this is absolutely marvelous
07:17 murder now, I have another problem
07:17 murder dont kill me.
07:17 mk01 tell me
07:17 murder I will split it now
07:17 murder will some other partitions
07:17 mk01 you can, yes
07:17 murder with*
07:18 murder but I'll keep the 16384 sector start
07:18 mk01 shrinking is not so easy as expand
07:18 murder I know
07:18 mk01 (ok, it is, but requires a bit more steps)
07:19 mk01 YES, ALWAYS keep the start
07:19 murder I will create these at the end of the disk, otherwise I'll have a lame headache of moving the current partition data to the end
07:19 mk01 (as again - superblocks are at logical locations from START). so if you move start, their locations won't match
07:19 mk01 just dp this
07:20 mk01 do*
07:21 mk01 if you want add 1T partition
07:21 mk01 resize2fs to size CURRENT - 1.1T
07:21 mk01 then fidks
07:21 mk01 fdisk
07:21 mk01 delete
07:21 mk01 create (keep 16384)
07:22 mk01 size as size of the shrinked ext4 + 100G
07:23 mk01 ((this is calculated with the reserve from "CURRENT - 1.1T")
07:23 mk01 then create the second
07:23 mk01 then use resize2fs AGAIN on 1st - let it resize to MAX
07:23 mk01 ((so it will align those 100G))
07:24 mk01 the reason is because you don;t need to do the precise sector calculations
07:24 mk01 in this case
07:25 mk01 because can happen you will shrink FS exactly -TB, then partition -TB, if you miss (by wrong calc) only let's say few blocks
07:25 murder hm
07:26 mk01 where ext4 still had data - you will be sad
07:26 mk01 or maybe "parted" will do that for you , don't know
07:26 mk01 always used this trick
07:26 murder doesnt resize2fs do that?
07:27 mk01 resize2fs is not manipulating partitons - only FS itself
07:27 mk01 that's the problem
07:27 mk01 but again, no big deal. just take time and understand , what is happening. and all will be good ;)
07:27 mk01 so once again
07:28 mk01 1. shrink filesystem to a size lower than your expected final size of 1st partition - for instance if you want it 4T, resize filesystem to 3.5T
07:29 mk01 2. recreate 1st partition (in fdisk) with the same start, with size +4T
07:29 mk01 3. create 2nd partition
07:29 mk01 4. resize2fs 1st partition to 'max'
07:30 mk01 (without size specs it will just expand to max)
07:30 mk01 format 2nd partition
07:30 mk01 all fine
07:30 mk01 (did I wrote it now better ? )
07:31 murder yes
07:31 murder perfectly
07:32 mk01 ok so good luck then
07:32 mk01 enjoy your new disk ;)
07:32 murder thanks
07:32 murder a lot.
07:32 mk01 gladly
07:32 mk01 bye
07:33 mk01 (I have to sleep :) )
07:33 murder ok!
07:35 mk0 07:35 * mk01 away
07:39 mk01 (I couldn't resist)
07:39 mk01 to google a bit
07:39 murder lol
07:39 mk01 and yes it is like this:
07:39 mk01 on SATA the geom is directly read from drice
07:39 mk01 drive
07:39 mk01 while if on USB
07:40 mk01 the "chipset" of the box kicks in
07:40 mk01 and you have no guarantee there - what which USB box - will report and how it will recalculate
07:40 mk01 so ...
07:41 mk01 and that was last for today
07:41 mk01 bye ;)
07:42 murder bye bye
09:01 topi` jnettlet: does that mean that a userspace process can use up to 3.84 GB of RAM (when having 4GB physical)?
09:02 topi` where does the kernel memory fit then :)
09:02 topi` (I assume the difference is being used for 2D/3D graphics)
12:31 jnettlet topi`, linux has 3.84GB of useable memory because the iMX6 is 32-bit and can only address that much. We get a bit more than the usual 3.8GB because of the way we verify what our upper bounds is.
12:32 jnettlet topi`, then the kernel and GPU take a bit.
19:48 vpeter I'm not sure if this is correct place to mentioned that some better answer should be written here? http://forum.solid-run.com/kodi-xbmc-player-on-cubox-i-and-hummingboard-f7/osmc-on-cubox-t2703.html
20:25 flips I ran Arch, it only lacked the bluetooth firmware loader ...
20:30 vpeter flips: So it can be installed?
20:32 flips I had no issues ...
20:32 flips (just registered in the Forum)
20:33 vpeter I think some users just expect little to much. And gave up on first prolbem.
20:45 vpeter flips: So debian still works? :)
20:46 flips Yes, no problems so far. After I got multiboot working, I've mostly been running OpenELEC, but I'm running the Armbian Debian from partition 3
21:21 Artox reading that forum topic: how can archlinux be the measurement for SR?
21:33 jnettlet flips, thanks for some reason in the thread
22:40 flips :)
22:53 Artox Success
22:53 Artox I just regulated volume on spdif output :)
22:53 Artox mk01: lookslike dmix was not what I've been looking for
22:53 Artox but sth called softvol
22:54 Artox but still not sure how to integrate it properly
22:54 Artox so much about alsa that I do not know
22:55 Artox http://pastebin.com/RtRnCv8Q
22:55 Artox thats my .asoundrc
22:55 Artox for the moment
22:55 Artox but aplay -L shows so many devices
22:55 Artox and some howtos choose softvol to have dmix as slave
23:00 Artox plughw looks like what I want
23:00 Artox then one question remains: how to choose between spdif and hdmi
23:00 Artox oh, nvm
23:12 Artox http://pastebin.com/ECsnJnEA
23:12 Artox this is my second attempt
23:12 Artox and I been thinking to add a third softvol-analogue
23:13 Artox jnettlet: do you think such a config file would be okay in images?