[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2737
  • Last Modified:

lvextend and resize2fs without umount?

can we increase the filesystem without umount? Would it corrupt any data?
  • 4
  • 2
  • 2
3 Solutions
Backup and try.
Better safe than sorry, would be the advice to resize while the filesystem is not in use by other services. and a goof backup exists just in case.
the resize2fs is more risky as compared to the lvextend
Presumably you have already expanded the Volume group (vgextend) or do you have excess room in the volume group?
if you want resize or work with mounted system, mount it with read only parametrs, so you not lose any data.

but many programs for resize today, not allow you work with mounted system anyway.
mokkanAuthor Commented:
thank you. what is the difference between resize2fs and ext2online?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

ext2online will only resize ext2 mounted filesystem.

resize2fs will resize an ext2 or ext3 unmounted file system.
mokkanAuthor Commented:
How can we execute on mounted file system?
mokkanAuthor Commented:
How can we execute on mounted ext3 file system? Or what command we can execute?
Different between mounted system, or not  mounted, in Linux filesystem, mounted file system always
wright/read data

you can get list of open files by

sudo lsof

so if you resize partition, you must have free space, ext2online i think just add new free space in allocation table, but i think they can only large size..

So whats bad if you work with Resize, fsck and other things in mounted file system:

Programm, change file allocation, and in same time, Linux may wright data in same place, so data moved, and Linux wright new data, on empty space, or in programm/log/tmp, or cache data.. so it can broke this file..

 Most Vaulrnable if you work in mounted FS is : /var , /etc , /tmp /usr (config files), but if programm like resize2fs, start moving any system file, and any daemon/program, or process, wright data on disk, they could seriously damage your system.. but this is 5-10% of chance, becouse most of all /sbin /boot /bin files, are always static..

btw resize2fs, can also move partitions..

so best way, to prevent any damage is remout filesystem in RO mode..
most of "damage or not" depends, where your logical disc is


[[       /root            ext 4               ] [         /boot     ext4       ][           /partition that i want to resize    ]       empty space       ]

so in this state, this is safaty to resize it.. but here:

[[empty space  [            /root               ][        /partition for resize ] [        /boot        ]

to resize your partition
1. you need move /root partition to start of system (i miss that / you can't load this disk on most system, becouse of 1024 cylinder problem)
2. then you add size into !START of logical disk, so, and other files into /partition for resize
move on their allocation table

like we start from

file 1 0x00000001
file 2 0x00000004
file 3 0x00000005


file 1 0x00000005
file 2 0x00000008
file 3 0x00000009

so on mount system if any process wright data on file 2, they just damage file 1 and overwright it.

in first state you just add more disk space so discriptors not changes, and file system not been damaged.
mokkanAuthor Commented:
thank you.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now