hello all,
I am trying to expand my /var file system which resides on a logical volume. I successfully issued the lvextend command. However when I try to issue the ext2online command I receive a return code of 3 which the man pages indicates:
ext2online /var ext2online v1.1.18 - 2001/03/18 for EXT2FS 0.5b ext2online: group 0, block 7 not reserved
ext2online: unable to resize /dev/mapper/root_vg-lv_var
echo $? 3
3 Error in pre-resizing (user space) operation
Can someone tell me what I'm doing wrong. I would prefer doing this online...
thanks,
James
James Marcinek spake the following on 8/17/2006 3:32 PM:
hello all,
I am trying to expand my /var file system which resides on a logical volume. I successfully issued the lvextend command. However when I try to issue the ext2online command I receive a return code of 3 which the man pages indicates:
ext2online /var ext2online v1.1.18 - 2001/03/18 for EXT2FS 0.5b ext2online: group 0, block 7 not reserved
ext2online: unable to resize /dev/mapper/root_vg-lv_var
echo $? 3
3 Error in pre-resizing (user space) operation
Can someone tell me what I'm doing wrong. I would prefer doing this online...
thanks,
James
I think it would be much safer to do it offline. Online resizing only came to be in kernel 2.6.7 somewhere, and I haven't seen anything saying it was real safe yet.
do you use resize2fs to do this. If so can you give an example so I make sure I do the syntax properly (man page doesn't show)
thanks,
james
Scott Silva wrote:
James Marcinek spake the following on 8/17/2006 3:32 PM:
hello all,
I am trying to expand my /var file system which resides on a logical volume. I successfully issued the lvextend command. However when I try to issue the ext2online command I receive a return code of 3 which the man pages indicates:
ext2online /var ext2online v1.1.18 - 2001/03/18 for EXT2FS 0.5b ext2online: group 0, block 7 not reserved
ext2online: unable to resize /dev/mapper/root_vg-lv_var
echo $? 3
3 Error in pre-resizing (user space) operation
Can someone tell me what I'm doing wrong. I would prefer doing this online...
thanks,
James
I think it would be much safer to do it offline. Online resizing only came to be in kernel 2.6.7 somewhere, and I haven't seen anything saying it was real safe yet.
On Thu, 2006-08-17 at 20:08 -0400, James Marcinek wrote:
do you use resize2fs to do this. If so can you give an example so I make sure I do the syntax properly (man page doesn't show)
<snip>
Including some notes from my last use of this. Change the notes to suit your particular scenario!
I used the "not really" parameter to make some test runs first. This allowed me to build and refine a script witout actually doing any real work (my "Wally" mode). ;-)
WARNING! YOU MUST ADD THE -n PARAMETER WITH THE -F SINCE THIS IS LIVE! IF YOU FORGET THE -n "WOE BE UNTO THEE"! FORGETTING THE -F is "GLEE BE UNTO THEE"!
The new file system size is specified as the number of blocks. I don't remember if that is just because of my way or needed. "man xxx" to fill in the blanks.
Per the resize2fs program request, an e2fsck pass is first made.
I suggest specify a value slightly smaller than you think you can squeeze in and then expand. I was working on making cross-backup on different HDs, so you'll need to ignore/change the VG and LV names to suit. These are just examples.
# A "Wally" run here. # mke2fs -n -F -j -b 4096 -N 410048 /dev/VolGroupAA/lvol0
# Looks good enough # e2fsck -f /dev/VolGroup00/LogVol00
# no unit on new size (K/M/G...) defaults to the file block size # resize2fs -p /dev/VolGroup00/LogVol00 2441216 # -p=show activity
Below, it was only NG because my desired size was not as close as I wanted. Syntactically and semantically, all was good.
# confirm things by running the mke2fs against this and comparing # ACK! THAT'S ABSOLUTELY NG! # mke2fs -n -j -b 4096 -N 410048 /dev/VolGroup00/LogVol00
Real run here. A significant note is the "no size on...". It means that if you don't give a size param to resize2fs, it uses all the space it can get in the LV. Since my vg/lv setups do not auto-allocate, this is good.
# no size on new defaults to all available. # e2fsck -f /dev/VolGroup00/LogVol00 # resize2fs -p /dev/VolGroup00/LogVol00 # -p=show activity
HTH
On Thu, 2006-08-17 at 21:14 -0400, William L. Maltby wrote:
On Thu, 2006-08-17 at 21:05 -0400, William L. Maltby wrote:
On Thu, 2006-08-17 at 20:08 -0400, James Marcinek wrote:
<snip>
DID I MENTION... MOUNT READ ONLY? BE SURE AND DO THIS. DON'T WANT LIVE UPDATES FROM NORMAL ACTIVITY OCCURRING WHILE ALL THIS IS GOIND ON!
Scottish brogue here ^^
James Marcinek spake the following on 8/17/2006 5:08 PM:
do you use resize2fs to do this. If so can you give an example so I make sure I do the syntax properly (man page doesn't show)
thanks,
james
Scott Silva wrote:
James Marcinek spake the following on 8/17/2006 3:32 PM:
hello all,
I am trying to expand my /var file system which resides on a logical volume. I successfully issued the lvextend command. However when I try to issue the ext2online command I receive a return code of 3 which the man pages indicates:
ext2online /var ext2online v1.1.18 - 2001/03/18 for EXT2FS 0.5b ext2online: group 0, block 7 not reserved
ext2online: unable to resize /dev/mapper/root_vg-lv_var
echo $? 3
3 Error in pre-resizing (user space) operation
Can someone tell me what I'm doing wrong. I would prefer doing this online...
thanks,
James
I think it would be much safer to do it offline. Online resizing only came to be in kernel 2.6.7 somewhere, and I haven't seen anything saying it was real safe yet.
resize2fs /dev/volgroup/volname should resize the filesystem to fill the extended space. You could try it with the trial run parameter to check. But this is offline... Next time look at e2fsadm. It can resize the logical volume and the ext2/3 filesystem in one command. Look at http://www.tldp.org/HOWTO/LVM-HOWTO/extendlv.html
On Thu, 2006-08-17 at 16:39 -0700, Scott Silva wrote:
James Marcinek spake the following on 8/17/2006 3:32 PM:
<snip>
I think it would be much safer to do it offline. Online resizing only came to be in kernel 2.6.7 somewhere, and I haven't seen anything saying it was real safe yet.
I'm basically with you on this. What if the machine falls over in the middle of the commits? Only safe on-line FS meta-data ops are read only, IMO.
On Thu, 2006-08-17 at 18:32 -0400, James Marcinek wrote:
hello all,
I am trying to expand my /var file system which resides on a logical volume. I successfully issued the lvextend command. However when I try to issue the ext2online command I receive a return code of 3 which the man pages indicates:
ext2online /var ext2online v1.1.18 - 2001/03/18 for EXT2FS 0.5b ext2online: group 0, block 7 not reserved
ext2online: unable to resize /dev/mapper/root_vg-lv_var
echo $? 3
3 Error in pre-resizing (user space) operation
Can someone tell me what I'm doing wrong. I would prefer doing this online...
You may not be doing anything wrong. From the man page,
you need to have the Online ext2 resize support (CON-FIG_EXT2_RESIZE) feature enabled in the kernel (after applying the appropriate patch for the 2.x series of kernels).
*I* don't know if the kernel(s) have been compiled with this enabled? Do you know?
thanks,
James
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Thu, 2006-08-17 at 20:28 -0400, William L. Maltby wrote:
On Thu, 2006-08-17 at 18:32 -0400, James Marcinek wrote:
hello all,
I am trying to expand my /var file system which resides on a logical volume. <snip>
ext2online: unable to resize /dev/mapper/root_vg-lv_var
echo $? 3
3 Error in pre-resizing (user space) operation
Can someone tell me what I'm doing wrong. I would prefer doing this online...
You may not be doing anything wrong. From the man page,
you need to have the Online ext2 resize support (CON-FIG_EXT2_RESIZE) feature enabled in the kernel (after applying the appropriate patch for the 2.x series of kernels).
*I* don't know if the kernel(s) have been compiled with this enabled? Do you know?
I just checked the stock kernel (34-2 version) .config file and that flag is not enabled, AFAICT. Maybe the Plus kernel has it?
If you are in a hurry and have *some* flexibility, I'll suggest this.
Remount the file system read only (be *sure*) and then do a plain old resize with the force, *if* needed. I do this sort of thing to both shrink and grow and to do consistency checks.
Diligence is required. If it's present, you are safe.
You may be able to accomplish what you want an easier way? Can you make a new lv instead and move some piece of the file system to it? Then you don't need to resize.
Just because you *can* put everything on one lv and one partition, it doesn't mean you have to, nor is it necessarily wise to do so.
<snip>
HTH
On Friday 18 August 2006 02:40, William L. Maltby wrote:
On Thu, 2006-08-17 at 20:28 -0400, William L. Maltby wrote:
On Thu, 2006-08-17 at 18:32 -0400, James Marcinek wrote:
hello all,
I am trying to expand my /var file system which resides on a logical volume. <snip>
ext2online: unable to resize /dev/mapper/root_vg-lv_var
echo $? 3
3 Error in pre-resizing (user space) operation
Can someone tell me what I'm doing wrong. I would prefer doing this online...
You may not be doing anything wrong. From the man page,
you need to have the Online ext2 resize support (CON-FIG_EXT2_RESIZE) feature enabled in the kernel (after applying the appropriate patch for the 2.x series of kernels).
*I* don't know if the kernel(s) have been compiled with this enabled? Do you know?
I just checked the stock kernel (34-2 version) .config file and that flag is not enabled, AFAICT. Maybe the Plus kernel has it?
I know that online ext3 resize works just fine on c-4, I've resized many (including our centos-mirror and a few multi-terabyte filesystems with load).
What the OP could be hitting is trying to resize an old or somehow broken fs. I'd have a look at "tune2fs -l" for the filesystem.
/Peter