How to extend the file system online?
Hi, all,
After I used LVM2 to create PV, VG, LV on the attached storage
disks, I want to format logical volume as a file system and
possibly extend the file system of LV online. But when I prefer to
"ext3" file system, I find the tool "resize2fs" only can resize
ext3 file system offline.
OS: Linux Fedora Core2(kernel 2.6.7-1.494.2.2smp)
LVM version: 2.00.15(2004-04-19)
Library version: 1.00.14-ioctl(2004-04-06)
Driver version: 4.1.0
Operations:
pvcreate /dev/sda
pvcreate /dev/sdb
vgcreate vg1 /dev/sda /dev/sdb
lvcreate -L 100G -n lv1 vg1
mke2fs /dev/vg1/lv1
mount /dev/vg1/lv1 /mnt
lvextend -L +50G /dev/vg1/lv1
Then I used "resize2fs" tool to extend file system, but failed.I know it must be done when "umount" the lv1.
If another tool can finish that running under Linux?
Or if any other file system can be mounted and resized online under
Linux?
XFS? I don't know.
Anyone can help me? Thanks!
Rocty Wang
2004-10-09
Quoted 44 lines · Rocty Wang
Hi, all,
After I used LVM2 to create PV, VG, LV on the attached storage
disks, I want to format logical volume as a file system and
possibly extend the file system of LV online. But when I prefer to
“ext3” file system, I find the tool “resize2fs” only can resize
ext3 file system offline.
OS: Linux Fedora Core2(kernel 2.6.7-1.494.2.2smp)
LVM version: 2.00.15(2004-04-19)
Library version: 1.00.14-ioctl(2004-04-06)
Driver version: 4.1.0
Operations:
pvcreate
/dev/sdapvcreate
/dev/sdbvgcreate vg1
/dev/sda/dev/sdblvcreate –L 100G –n lv1 vg1
mke2fs
/dev/vg1/lv1mount
/dev/vg1/lv1/mntlvextend –L +50G
/dev/vg1/lv1Then I used “resize2fs” tool to extend file system, but failed.
I know it must be done when “umount” the lv1.
If another tool can finish that running under Linux?
Or if any other file system can be mounted and resized online under Linux?
Quoted 8 lines
XFS? I don’t know.
Anyone can help me? Thanks!
Rocty Wang
2004-10-09
You can try ReiserFS, which does allow to be resized while mounted. --Arshavir
Quoted 1 line · Arshavir Grigorian
You can try ReiserFS, which does allow to be resized while mounted.
Additional comments:
ReiserFS 3 can be enlarged while mounted, but shrunk only when unmounted.
ReiserFS 4 can not yet be resized at all.
EXT2/3 can be enlarged online with a kernel patch and utils from
http://ext2resize.sourceforge.net/
XFS must be mounted while enlarging but can AFAIK not be shrunk, even off-line.
JFS must be mounted while enlarging but can not be shrunk, same as XFS.
Some more info is in the HOW-TO:
http://linux.co.uk/howtos/LVM-HOWTO/extendlv.html
and on Newsforge:
http://www.newsforge.com/os/03/10/07/2028234.shtml?tid=2&tid=82&tid=94
/ Rickard Olsson,IT-Konsult/
/ Telefon: +46 70 635 01 42/
/ http://www.webhackande.se/
[linux-lvm] [Debian/Knoppix] LVM2 at boot time
Hi,
My system is Knoppix 3.6 with 2.6.7 kernel and LVM2. My /home and /usr/local file systems are on logical volumes. The lvm script is in /etc/init.d, with a link in /etc/rcS.d, S26lvm (mountall has a greater number). dm-mod is in /etc/modules
At boot time, everything stops; I have to type "modprobe dm-mod", <Ctrl-D>, and everything is OK. What's wrong with my boot config.? Any hint appreciated.
Signature · 1 line
Laurent Bloch -- [email protected] -- http://laurent-bloch.org