{"action":"created","issue":{"url":"https://api.github.com/repos/igorpecovnik/lib/issues/353","repository_url":"https://api.github.com/repos/igorpecovnik/lib","labels_url":"https://api.github.com/repos/igorpecovnik/lib/issues/353/labels{/name}","comments_url":"https://api.github.com/repos/igorpecovnik/lib/issues/353/comments","events_url":"https://api.github.com/repos/igorpecovnik/lib/issues/353/events","html_url":"https://github.com/igorpecovnik/lib/issues/353","id":159174551,"number":353,"title":"resize2fs failing on ODROID-C1","user":{"login":"ThomasKaiser","id":12658961,"avatar_url":"https://avatars.githubusercontent.com/u/12658961?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasKaiser","html_url":"https://github.com/ThomasKaiser","followers_url":"https://api.github.com/users/ThomasKaiser/followers","following_url":"https://api.github.com/users/ThomasKaiser/following{/other_user}","gists_url":"https://api.github.com/users/ThomasKaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasKaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasKaiser/subscriptions","organizations_url":"https://api.github.com/users/ThomasKaiser/orgs","repos_url":"https://api.github.com/users/ThomasKaiser/repos","events_url":"https://api.github.com/users/ThomasKaiser/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasKaiser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/igorpecovnik/lib/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-08T14:15:35Z","updated_at":"2016-06-09T21:43:13Z","closed_at":"2016-06-09T21:43:13Z","body":"On ODROID-C1 partitions were enlarged from within `firstrun` but fs will not be expanded. I used the official jessie build that is a few weeks old. When trying out `resize2fs` an error is thrown:\r\n\r\n    root@odroidc1:/home/tk# resize2fs /dev/mmcblk0p2\r\n    resize2fs 1.42.12 (29-Aug-2014)\r\n    Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required\r\n    old_desc_blocks = 1, new_desc_blocks = 1\r\n    resize2fs: No space left on device While checking for on-line resizing support\r\n\r\nAnd the partitioning looks like this\r\n\r\n    root@odroidc1:/home/tk# cat /proc/partitions \r\n    major minor  #blocks  name\r\n    \r\n     179        0   15159296 mmcblk0\r\n     179        1      32768 mmcblk0p1\r\n     179        2   15125504 mmcblk0p2\r\n\r\nWhile roots like this:\r\n\r\n    /dev/mmcblk0p2  1.3G  1.1G  210M  84% /\r\n\r\nUnfortunately `/etc/init.d/resize2fs` fails also (I let the output redirect and it look's like [this](http://pastebin.com/XdcFE665) and since `$rootfstype` will be empty nothing will happen). I tried to reproduce it manually and the whole thing fails at the `blkid` call:\r\n\r\n    root@odroidc1:/home/tk# lsb_release -cs\r\n    jessie\r\n    root@odroidc1:/home/tk# set -e\r\n    root@odroidc1:/home/tk# device=\"/dev/\"$(lsblk -idn -o NAME | grep mmcblk0)\r\n    root@odroidc1:/home/tk# echo $device\r\n    /dev/mmcblk0\r\n    root@odroidc1:/home/tk# PARTITIONS=$(($(fdisk -l $device | grep $device | wc -l)-1))\r\n    root@odroidc1:/home/tk# echo $PARTITIONS\r\n    2\r\n    root@odroidc1:/home/tk# device=\"/dev/\"$(lsblk -idn -o NAME | grep mmcblk0)\"p\"$PARTITIONS\r\n    root@odroidc1:/home/tk# echo $device\r\n    /dev/mmcblk0p2\r\n    root@odroidc1:/home/tk# N=/etc/init.d/resize2fs\r\n    root@odroidc1:/home/tk# root_device=$(mountpoint -d /)\r\n    root@odroidc1:/home/tk# echo $root_device\r\n    179:2\r\n    root@odroidc1:/home/tk# for file in /dev/* ; do\r\n    > CURRENT_DEVICE=$(printf \"%d:%d\" $(stat --printf=\"0x%t 0x%T\" $file))\r\n    > if [ $CURRENT_DEVICE = $root_device ]; then\r\n    > root_partition=$file\r\n    > break;\r\n    > fi\r\n    > done\r\n    root@odroidc1:/home/tk# echo $root_partition\r\n    /dev/mmcblk0p2\r\n    root@odroidc1:/home/tk# rootfstype=$(blkid -s TYPE -o value $root_partition)\r\n    tk@odroidc1:~$ whoami\r\n    tk\r\n\r\nAnd now I'm out. So tried to repeat this manually:\r\n\r\n    tk@odroidc1:~$ sudo -s\r\n    root@odroidc1:/home/tk# echo $rootfstype\r\n    \r\n    root@odroidc1:/home/tk# root_partition=/dev/mmcblk0p2\r\n    root@odroidc1:/home/tk# blkid -s TYPE -o value $root_partition\r\n    root@odroidc1:/home/tk# echo $?\r\n    2\r\n\r\nSince we changed that whole procedure in `firstrun` a while ago (only for `wheezy` relying on the aforementioned lenghty procedure) I tried it out with our new approach:\r\n\r\n    root@odroidc1:/home/tk# findmnt / | awk -F\" \" '/\\/dev\\// {print $2\"\\t\"$3}'\r\n    /dev/mmcblk0p2\text4\r\n\r\nSo the question is: Should I change `resize2fs` just like `firstrun` or is there something else that might fix this more easily. Also is anybody able to test this with wheezy later? Since I will definitely not build any images with this outdated distro any longer."},"comment":{"url":"https://api.github.com/repos/igorpecovnik/lib/issues/comments/225035910","html_url":"https://github.com/igorpecovnik/lib/issues/353#issuecomment-225035910","issue_url":"https://api.github.com/repos/igorpecovnik/lib/issues/353","id":225035910,"user":{"login":"ThomasKaiser","id":12658961,"avatar_url":"https://avatars.githubusercontent.com/u/12658961?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasKaiser","html_url":"https://github.com/ThomasKaiser","followers_url":"https://api.github.com/users/ThomasKaiser/followers","following_url":"https://api.github.com/users/ThomasKaiser/following{/other_user}","gists_url":"https://api.github.com/users/ThomasKaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasKaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasKaiser/subscriptions","organizations_url":"https://api.github.com/users/ThomasKaiser/orgs","repos_url":"https://api.github.com/users/ThomasKaiser/repos","events_url":"https://api.github.com/users/ThomasKaiser/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasKaiser/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T21:43:13Z","updated_at":"2016-06-09T21:43:13Z","body":"I tried now to check util-linux version which seems to work: http://sprunge.us/aagA\r\n\r\nClosed due to https://github.com/igorpecovnik/lib/commit/2e284be77d62f7516901f7657f8e773c271aa953"}}
{"actor":{"display_login":"ThomasKaiser"}}