# Systemd-growfs resize to 128M only

**URL:** https://hub.mender.io/t/systemd-growfs-resize-to-128m-only/1446
**Category:** General Discussions
**Created:** [January 17, 2020, 11:10am UTC](https://hub.mender.io/t/systemd-growfs-resize-to-128m-only/1446 "2020-01-17T11:10:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [January 17, 2020, 11:10am UTC](https://hub.mender.io/t/systemd-growfs-resize-to-128m-only/1446/1 "2020-01-17T11:10:18Z")

</div>

Hi,

I’m using systemd-growfs feature to grow data to end of SDcard. I’m on warrior branch but only define:

```auto
MENDER_DATA_PART_FSTAB_OPTS_append = ",x-systemd.growfs"

```

and it looks like service is started but report only this:

```auto
Sep 23 18:47:19 a33-som-m80 systemd[1]: Starting Grow File System on /data...
Sep 23 18:47:19 a33-som-m80 systemd-growfs[230]: Successfully resized "/data" to 128.0M bytes (131072 blocks of 1024 bytes).
Sep 23 18:47:19 a33-som-m80 systemd[1]: Started Grow File System on /data.

```

I didn’t change data partition size. It’s even weird that fdisk report that card have 15G but for some reason growfs code check only size of partition. Am I missing something here? Define data part size to 10G or so? Confused 😕

Thanks

---

<div class="post-metadata">

### Author: ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)
#### Post date: [January 17, 2020, 11:23am UTC](https://hub.mender.io/t/systemd-growfs-resize-to-128m-only/1446/2 "2020-01-17T11:23:35Z")

</div>

You should add,

```auto
MENDER_FEATURES_ENABLE_append = "mender-growfs-data"

```

Otherwise you will not get this, which will resize the underlying block device before resizing the filesystem image.

> <https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-core/recipes-mender/mender/mender.inc#L252-L271>

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [January 17, 2020, 11:36am UTC](https://hub.mender.io/t/systemd-growfs-resize-to-128m-only/1446/3 "2020-01-17T11:36:41Z")

</div>

@mirzak thanks I see it now. Was looking down to thread [here](https://tracker.mender.io/browse/MEN-2337?focusedCommentId=99241&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel) where it was discussed I had feeling nothing else is necessary (adding extra systemd script) but didn’t read till end. I realized I’m on thud not warrior so need to work on it other way. Thanks for pointers.

---

<div class="post-metadata">

### Author: ![mkozjak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mkozjak/32/202_2.png) [@mkozjak](https://hub.mender.io/u/mkozjak)
#### Post date: [April 2, 2020, 7:08am UTC](https://hub.mender.io/t/systemd-growfs-resize-to-128m-only/1446/4 "2020-04-02T07:08:20Z")

</div>

Hey, Marek, maybe you found a suitable solution for a pre-242 systemd to grow data partition and fs on initial boot?

---

<div class="post-metadata">

### Author: ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)
#### Post date: [April 2, 2020, 7:54am UTC](https://hub.mender.io/t/systemd-growfs-resize-to-128m-only/1446/5 "2020-04-02T07:54:41Z")

</div>

Hi @mkozjak, it is possible to create a manual systemd script, similar to what is done here, and use parted to resize your partition on boot.

> <https://github.com/mendersoftware/mender-convert/pull/179/files>

---

<div class="post-metadata">

### Author: ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)
#### Post date: [April 2, 2020, 7:57am UTC](https://hub.mender.io/t/systemd-growfs-resize-to-128m-only/1446/6 "2020-04-02T07:57:18Z")

</div>

Additionally in the simplest form (without relying on the systemd growfs feature) you can run:

```bash
# Resizes partition
parted --script /dev/mmcblk0 resizepart 4 100%

# Resizes filesystem
resize2fs /dev/mmcblk0p4

```

So it is a matter of putting something similar to above in a script that runs on boot.

---

<div class="post-metadata">

### Author: ![mkozjak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mkozjak/32/202_2.png) [@mkozjak](https://hub.mender.io/u/mkozjak)
#### Post date: [April 2, 2020, 8:20am UTC](https://hub.mender.io/t/systemd-growfs-resize-to-128m-only/1446/7 "2020-04-02T08:20:30Z")

</div>

Thank you so much, guys!
