# Properly way to use fsck on mounted storage

**URL:** <https://help.nextcloud.com/t/properly-way-to-use-fsck-on-mounted-storage/23794>\
**Category:** ℹ️ Support\
**Tags:** ncp\
**Created:** [November 20, 2017, 5:57pm UTC](https://help.nextcloud.com/t/properly-way-to-use-fsck-on-mounted-storage/23794 "2017-11-20T17:57:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Floppik](https://help.nextcloud.com/letter_avatar/floppik/32/6_449c533f586939b6e5f246632a46421f.png) [@Floppik](https://help.nextcloud.com/u/Floppik)\
**Post date:** [November 20, 2017, 5:57pm UTC](https://help.nextcloud.com/t/properly-way-to-use-fsck-on-mounted-storage/23794/1 "2017-11-20T17:57:56Z")

</div>

Hi! due to frequent power cuts, on mounted storage in nextcloudpi disk errors started to appear:

> Nov 20 16:03:11 nextcloudpi kernel: [315.359346] EXT4-fs (sda1): error count since last fsck: 605  
> Nov 20 16:03:11 nextcloudpi kernel: [315.359379] EXT4-fs (sda1): initial error at time 1505367405: ext4\_iget:4501: inode 18220209  
> Nov 20 16:03:11 nextcloudpi kernel: [315.359418] EXT4-fs (sda1): last error at time 1510904741: ext4\_iget:4515: inode 18220209

How can i properly run a fsck to check disk and solve errors?

---

<div class="post-metadata">

**Author:** ![budy](https://help.nextcloud.com/user_avatar/help.nextcloud.com/budy/32/697_2.png) [@budy](https://help.nextcloud.com/u/budy)\
**Post date:** [November 20, 2017, 6:34pm UTC](https://help.nextcloud.com/t/properly-way-to-use-fsck-on-mounted-storage/23794/2 "2017-11-20T18:34:49Z")

</div>

It’s as easy as this: you NEVER run fsck in any meaningful way on a currently mounted volume! Ever!

Unmount the volume and then run fsck or you risk loosing data if you don’t really know, what you’re doing.

You shoud:

- shutdown apache2 on you RPi
- check your mounts using mount on the cli
- unmount the volume that is mounted from /dev/sda1
- then run fsck -v /dev/sda1

If you want to play it really safe, backup your data, before confirming and action by answering y to ans question fsck throws at you.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 2, 2024, 3:25pm UTC](https://help.nextcloud.com/t/properly-way-to-use-fsck-on-mounted-storage/23794/3 "2024-12-02T15:25:01Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 2:11pm UTC](https://help.nextcloud.com/t/properly-way-to-use-fsck-on-mounted-storage/23794/4 "2024-12-04T14:11:39Z")

</div>


