hikey970-ubuntu-image icon indicating copy to clipboard operation
hikey970-ubuntu-image copied to clipboard

Expend disk failed

Open randoms opened this issue 7 years ago • 10 comments
trafficstars

hikey970% sudo resize2fs /dev/sdd12
[sudo] password for hi: 
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/sdd12 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 7
resize2fs: Invalid argument While checking for on-line resizing support

randoms avatar Jun 19 '18 08:06 randoms

Try again and you will find it only resize to maximum size of that partition. p.s. Can you show me your cat /proc/partitions ?

mengzhuo avatar Jun 19 '18 08:06 mengzhuo

try again

hikey970% sudo resize2fs /dev/sdd12
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/sdd12 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 7
Performing an on-line resize of /dev/sdd12 to 13848576 (4k) blocks.
resize2fs: Operation not permitted While trying to add group #49

/proc/partitions contents

hikey970% cat /proc/partitions
major minor  #blocks  name

   1        0       8192 ram0
   1        1       8192 ram1
   1        2       8192 ram2
   1        3       8192 ram3
   1        4       8192 ram4
   1        5       8192 ram5
   1        6       8192 ram6
   1        7       8192 ram7
   1        8       8192 ram8
   1        9       8192 ram9
   1       10       8192 ram10
   1       11       8192 ram11
   1       12       8192 ram12
   1       13       8192 ram13
   1       14       8192 ram14
   1       15       8192 ram15
 179        0   15187968 mmcblk0
 179        1      65536 mmcblk0p1
 179        2    1776640 mmcblk0p2
   8        0       4096 sda
   8       16       4096 sdb
   8       32       8192 sdc
   8       48   62464000 sdd
   8       49       1024 sdd1
   8       50      12288 sdd2
   8       51       6144 sdd3
   8       52      12288 sdd4
   8       53     262144 sdd5
   8       54       1024 sdd6
   8       55      81920 sdd7
   8       56      16384 sdd8
   8       57      16384 sdd9
   8       58      16384 sdd10
   8       59       2048 sdd11
   8       60   55394304 sdd12
   8       61    1048576 sdd13
   8       62       1024 sdd14

fdisk results

Device        Start      End  Sectors  Size Type
/dev/sdd1       256      511      256    1M Microsoft basic data
/dev/sdd2       512     3583     3072   12M Microsoft basic data
/dev/sdd3      3584     5119     1536    6M Microsoft basic data
/dev/sdd4      5120     8191     3072   12M Linux filesystem
/dev/sdd5      8192    73727    65536  256M Microsoft basic data
/dev/sdd6     73728    73983      256    1M Microsoft basic data
/dev/sdd7     73984    94463    20480   80M EFI System
/dev/sdd8     94464    98559     4096   16M EFI System
/dev/sdd9     98560   102655     4096   16M Microsoft basic data
/dev/sdd10   102656   106751     4096   16M Microsoft basic data
/dev/sdd11   106752   107263      512    2M Microsoft basic data
/dev/sdd12   107264 13955839 13848576 52.8G Linux filesystem
/dev/sdd13 13955840 14217983   262144    1G Linux filesystem
/dev/sdd14 14217984 14218239      256    1M Microsoft basic data

df -h results

hikey970% df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       6.0G  766M  5.0G  14% /
devtmpfs        2.8G     0  2.8G   0% /dev
tmpfs           2.9G     0  2.9G   0% /dev/shm
tmpfs           2.9G  464K  2.9G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.9G     0  2.9G   0% /sys/fs/cgroup
tmpfs           577M     0  577M   0% /run/user/1000

The partition size has changed, but the root file system size was not changed.

randoms avatar Jun 19 '18 09:06 randoms

Thanks for report and it's a known bug as labeled .

You can use vendor partition as root partition

fastboot flash vendor *sparse.img

and change root from sdd12 to sdd13 during grub menu. then resize2fs sdd12 to expand to 50GB

mengzhuo avatar Jun 19 '18 10:06 mengzhuo

Out of curiosity, grub menu can be seen over the serial port from the USB-C. But I cannot type anything or select anything. How did you get bi-directional communication over this port? I only get info from the device, nothing is received by the device.

janrinze avatar Jun 21 '18 15:06 janrinze

img_2923 You might need to check your UART here is my settings.

mengzhuo avatar Jun 21 '18 15:06 mengzhuo

is that 1.8 Volts? most USB to serial are either 3.3V or 5V. The unused usb-C connector on the picture holds the serial console. That serial console only outputs data and does not accept incoming data.

janrinze avatar Jun 21 '18 17:06 janrinze

is that 1.8 Volts? most USB to serial are either 3.3V or 5V.

1.8v and it is same with Hikey960

https://www.96boards.org/documentation/consumer/hikey960/hardware-docs/hardware-user-manual.md.html#uart

The unused usb-C connector on the picture holds the serial console.

That serial console only outputs data and does not accept incoming data.

it will be recognized as “96board” and fastboot will flash data with it.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mengzhuo/hikey970-ubuntu-image/issues/7#issuecomment-399190073, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2DnuxKXvlvY6WsEzVSsAi9WIixmgSPks5t-925gaJpZM4UtBck .

mengzhuo avatar Jun 21 '18 19:06 mengzhuo

The USB-C next to the HDMI is for fastboot. The USB-C next to the two buttons is the serial console, does output only.

the pins you connected on the header port are 1.8 V serial. All USB to serial cables do either 3.3 volt or 5 volt. none do 1.8 volts. So i was wondering what you have to interface to the 1.8 volt serial.

janrinze avatar Jun 21 '18 19:06 janrinze

The USB-C next to the HDMI is for fastboot. The USB-C next to the two buttons is the serial console, does output only.

You can try my configuration instead of explaining to me.

the pins you connected on the header port are 1.8 V serial. All USB to serial cables do either 3.3 volt or 5 volt. none do 1.8 volts. So i was wondering what you have to interface to the 1.8 volt serial.

It’s a giveaway from my Hikey960 vendor.

USB to TTL serial cable using PL2303 with TXD 1.8v (Chinese) https://m.tb.cn/h.3bticRo

You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mengzhuo/hikey970-ubuntu-image/issues/7#issuecomment-399219611, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2DnkXI2TXDDwW-iOFTfLuGBHNg03mfks5t-_a3gaJpZM4UtBck .

mengzhuo avatar Jun 21 '18 22:06 mengzhuo

For the Resize to fs error. I found that using android-fsutils (img2simg) Causes this. Uninstall the android fsutils and install simg2img.

sudo apt-get install simg2img

Bigcountry907 avatar Mar 04 '19 16:03 Bigcountry907