"Paul" unix@bikesn4x4s.com wrote:
Thanks, and where can I find a version of ext2resize that will work
You want "resize2fs". Note that I've never used it to shrink a filesystem, myself, only to grow one.
robert
Robert Becker Cope wrote:
"Paul" unix@bikesn4x4s.com wrote:
Thanks, and where can I find a version of ext2resize that will work
You want "resize2fs". Note that I've never used it to shrink a filesystem, myself, only to grow one.
I've used it, and it works correctly (and it is available in CentOS 4.4). It shrinks file system as it should. The only things Paul should be careful is to first shrink file system, than logical volume and to correctly calculate file system size and by how many extents he can shrink logical volume. If he shrinks logical volume too much, he might end up loosing data. Running fsck in non-destructive mode (fsck -N) and/or attempting to mount file system read-only after he shrinks logical volume might be a good idea to test all is OK.
On 05/01/07, Aleksandar Milivojevic alex@8-p.ca wrote:
I've used it, and it works correctly (and it is available in CentOS 4.4). It shrinks file system as it should. The only things Paul should be careful is to first shrink file system, than logical volume and to correctly calculate file system size and by how many extents he can shrink logical volume. If he shrinks logical volume too much, he might end up loosing data. Running fsck in non-destructive mode (fsck -N) and/or attempting to mount file system read-only after he shrinks logical volume might be a good idea to test all is OK.
A little technique you can use is: 1. shrink the file system to the size slightly less than what you really want 2. reduce LV to the size that is what you really want 3. expand the file system to the size of the LV (usually the resize program can be told to expand the file system to maximum available space automatically on the LV.)
Alvin Chang wrote:
On 05/01/07, Aleksandar Milivojevic alex@8-p.ca wrote:
I've used it, and it works correctly (and it is available in CentOS 4.4). It shrinks file system as it should. The only things Paul should be careful is to first shrink file system, than logical volume and to correctly calculate file system size and by how many extents he can shrink logical volume. If he shrinks logical volume too much, he might end up loosing data. Running fsck in non-destructive mode (fsck -N) and/or attempting to mount file system read-only after he shrinks logical volume might be a good idea to test all is OK.
A little technique you can use is:
- shrink the file system to the size slightly less than what you
really want 2. reduce LV to the size that is what you really want 3. expand the file system to the size of the LV (usually the resize program can be told to expand the file system to maximum available space automatically on the LV.)
That sounds like a pretty healthy tip!
Keep in mind that with a large LV, the slowest part of this process is often the fsck -f step.
The resize2fs command is not nearly as slow as the fsck -f. But on a large LV, you prolly want to show the progress bar during the resize, so do a resize2fs -p, because I know I get nervous when I don't see output from a long running command.
On production systems, I've learned to have enough space to have one empty LV that can hold any of the other LVs so you can cleverly remount a copy of the LV you want to either fsck or recreate. I don't want to have a 2-hour reboot after 200 days uptime just to have my filesystem force a fsck -f on you when you very like least want it. Recreating a LV is a clever way to get around doing regular fscking, unless you tune your filesystem check way out to 3 years and 999 reboots or whatnot.
Jed
On Thu, January 4, 2007 11:40 pm, Alvin Chang wrote:
On 05/01/07, Aleksandar Milivojevic alex@8-p.ca wrote:
I've used it, and it works correctly (and it is available in CentOS 4.4). It shrinks file system as it should. The only things Paul should be careful is to first shrink file system, than logical volume and to correctly calculate file system size and by how many extents he can shrink logical volume. If he shrinks logical volume too much, he might end up loosing data. Running fsck in non-destructive mode (fsck -N) and/or attempting to mount file system read-only after he shrinks logical volume might be a good idea to test all is OK.
A little technique you can use is:
- shrink the file system to the size slightly less than what you really
want 2. reduce LV to the size that is what you really want 3. expand the file system to the size of the LV (usually the resize program can be told to expand the file system to maximum available space automatically on the LV.)
You guys are great! Thanks. It was a breeze! I really have fun learning more and more. I feel like an LVM expert now. Here's the steps I took:
First my lv was like 38G, and I wanted to make it about 32G in the end. I know that should be way more than enough. I also did a dd to an image file on a secondary drive for a precaution (always have a failsafe recovery!)
1. booted up on CentOS 4.4 Live CD. -When I booted up on it, I told it to boot nonet to not bring up the interfaces, but it did anyhow. I did a "ifconfig eht0 down" to do a shut on it. Anyhow, out of all the LiveCD's I have tried, I do like the Centos the best!
2. e2fsck -fv /dev/VolGroup00/LogVol00
3. resize2fs -p /dev/VolGroup00/LogVol00 30G
4. lvresize -L 32G /dev/VolGroup00/LogVol00
5. resize2fs -p /dev/VolGroup00/LogVol00 (size defaults to lv size)
Now I have my free PV space!
# pvdisplay --- Physical volume --- PV Name /dev/hda2 VG Name VolGroup00 PV Size 38.22 GB / not usable 0 Allocatable yes PE Size (KByte) 32768 Total PE 1223 Free PE 143 Allocated PE 1080 PV UUID cQCke5-zi9o-xhOW-HlR5-M46g-VbHC-99Csch
Now I am on to learning how to do a full backup with snapshots!
On Fri, 2007-01-05 at 19:04 -0500, Paul wrote:
On Thu, January 4, 2007 11:40 pm, Alvin Chang wrote:
On 05/01/07, Aleksandar Milivojevic alex@8-p.ca wrote:
I've used it, and it works correctly (and it is available in CentOS 4.4). It shrinks file system as it should. The only things Paul should be careful is to first shrink file system, than logical volume and to correctly calculate file system size and by how many extents he can shrink logical volume. If he shrinks logical volume too much, he might end up loosing data. Running fsck in non-destructive mode (fsck -N) and/or attempting to mount file system read-only after he shrinks logical volume might be a good idea to test all is OK.
A little technique you can use is:
- shrink the file system to the size slightly less than what you really
want 2. reduce LV to the size that is what you really want 3. expand the file system to the size of the LV (usually the resize program can be told to expand the file system to maximum available space automatically on the LV.)
You guys are great! Thanks. It was a breeze! I really have fun learning more and more. I feel like an LVM expert now. Here's the steps I took:
First my lv was like 38G, and I wanted to make it about 32G in the end. I know that should be way more than enough. I also did a dd to an image file on a secondary drive for a precaution (always have a failsafe recovery!)
- booted up on CentOS 4.4 Live CD. -When I booted up on it, I told it
to boot nonet to not bring up the interfaces, but it did anyhow. I did a "ifconfig eht0 down" to do a shut on it. Anyhow, out of all the LiveCD's I have tried, I do like the Centos the best!
e2fsck -fv /dev/VolGroup00/LogVol00
resize2fs -p /dev/VolGroup00/LogVol00 30G
lvresize -L 32G /dev/VolGroup00/LogVol00
resize2fs -p /dev/VolGroup00/LogVol00 (size defaults to lv size)
Now I have my free PV space!
# pvdisplay --- Physical volume --- PV Name /dev/hda2 VG Name VolGroup00 PV Size 38.22 GB / not usable 0 Allocatable yes PE Size (KByte) 32768 Total PE 1223 Free PE 143 Allocated PE 1080 PV UUID cQCke5-zi9o-xhOW-HlR5-M46g-VbHC-99Csch
Now I am on to learning how to do a full backup with snapshots!
Good job ... first thing to understand (at least as I understand it :P) is that you will only be able to create a snapshot that is 6GB or smaller.
So, as long as the used space on the LVs you take snapshots of are < 6GB will be OK, otherwise you will have problems.
My understanding is that you need free space that is going to be at least as large as the "used space" on the "LARGEST" LV that you are going to create a snapshot for. (At least that is how I currently setup my VGs and LVs where snapshots are involved).
On Sat, January 6, 2007 3:20 am, Johnny Hughes wrote:
On Fri, 2007-01-05 at 19:04 -0500, Paul wrote:
On Thu, January 4, 2007 11:40 pm, Alvin Chang wrote:
On 05/01/07, Aleksandar Milivojevic alex@8-p.ca wrote:
I've used it, and it works correctly (and it is available in CentOS 4.4). It shrinks file system as it should. The only things Paul
should
be careful is to first shrink file system, than logical volume and to correctly calculate file system size and by how many extents he can shrink logical volume. If he shrinks logical volume too much, he
might
end up loosing data. Running fsck in non-destructive mode (fsck -N) and/or attempting to mount file system read-only after he shrinks logical volume might be a good idea to test all is OK.
A little technique you can use is:
- shrink the file system to the size slightly less than what you
really
want 2. reduce LV to the size that is what you really want 3. expand the file system to the size of the LV (usually the resize program can be told to expand the file system to maximum available space automatically on the LV.)
You guys are great! Thanks. It was a breeze! I really have fun learning more and more. I feel like an LVM expert now. Here's the steps I took:
First my lv was like 38G, and I wanted to make it about 32G in the end. I know that should be way more than enough. I also did a dd to an image file on a secondary drive for a precaution (always have a failsafe recovery!)
- booted up on CentOS 4.4 Live CD. -When I booted up on it, I told it
to boot nonet to not bring up the interfaces, but it did anyhow. I did a "ifconfig eht0 down" to do a shut on it. Anyhow, out of all the LiveCD's I have tried, I do like the Centos the best!
e2fsck -fv /dev/VolGroup00/LogVol00
resize2fs -p /dev/VolGroup00/LogVol00 30G
lvresize -L 32G /dev/VolGroup00/LogVol00
resize2fs -p /dev/VolGroup00/LogVol00 (size defaults to lv size)
Now I have my free PV space!
# pvdisplay --- Physical volume --- PV Name /dev/hda2 VG Name VolGroup00 PV Size 38.22 GB / not usable 0 Allocatable yes PE Size (KByte) 32768 Total PE 1223 Free PE 143 Allocated PE 1080 PV UUID cQCke5-zi9o-xhOW-HlR5-M46g-VbHC-99Csch
Now I am on to learning how to do a full backup with snapshots!
Good job ... first thing to understand (at least as I understand it :P) is that you will only be able to create a snapshot that is 6GB or smaller.
So, as long as the used space on the LVs you take snapshots of are < 6GB will be OK, otherwise you will have problems.
My understanding is that you need free space that is going to be at least as large as the "used space" on the "LARGEST" LV that you are going to create a snapshot for. (At least that is how I currently setup my VGs and LVs where snapshots are involved).
Well, I know I have way more than enough space, but it was my understanding that you can have way less space than is actually used, cause the space just tracks changes. I used to use "fssnap" in Solaris allot and that doesn't take any space at all, cause it's just some kind of tracking info, I think that is at least what I can compare it to in my mind. So, even though I am using 6gigs worth, I can do a snapshot with like probably 500megs easy. I think anyhow.
On Thu, January 4, 2007 11:11 pm, Aleksandar Milivojevic wrote:
Robert Becker Cope wrote:
"Paul" unix@bikesn4x4s.com wrote:
Thanks, and where can I find a version of ext2resize that will work
You want "resize2fs". Note that I've never used it to shrink a filesystem, myself, only to grow one.
I've used it, and it works correctly (and it is available in CentOS 4.4). It shrinks file system as it should. The only things Paul should be careful is to first shrink file system, than logical volume and to correctly calculate file system size and by how many extents he can shrink logical volume. If he shrinks logical volume too much, he might end up loosing data. Running fsck in non-destructive mode (fsck -N) and/or attempting to mount file system read-only after he shrinks logical volume might be a good idea to test all is OK.
Thanks all. And can I use it when the system is online? I would think that would be the only way I could do it, cause I can't get to the ext3 fs of the LV unless its online.
On Fri, January 5, 2007 7:26 am, Paul wrote:
On Thu, January 4, 2007 11:11 pm, Aleksandar Milivojevic wrote:
Robert Becker Cope wrote:
"Paul" unix@bikesn4x4s.com wrote:
Thanks, and where can I find a version of ext2resize that will work
You want "resize2fs". Note that I've never used it to shrink a filesystem, myself, only to grow one.
I've used it, and it works correctly (and it is available in CentOS 4.4). It shrinks file system as it should. The only things Paul should be careful is to first shrink file system, than logical volume and to correctly calculate file system size and by how many extents he can shrink logical volume. If he shrinks logical volume too much, he might end up loosing data. Running fsck in non-destructive mode (fsck -N) and/or attempting to mount file system read-only after he shrinks logical volume might be a good idea to test all is OK.
Thanks all. And can I use it when the system is online? I would think that would be the only way I could do it, cause I can't get to the ext3 fs of the LV unless its online.
OK, guess I answered my own questions:
# resize2fs -p /dev/VolGroup00/LogVol00 30G resize2fs 1.35 (28-Feb-2004) /dev/VolGroup00/LogVol00 is mounted; can't resize a mounted filesystem!
But how do I mount it when booted up on CD when it's burried somewhere in the LVM on hda2?
OK, guess I answered my own questions:
# resize2fs -p /dev/VolGroup00/LogVol00 30G resize2fs 1.35 (28-Feb-2004) /dev/VolGroup00/LogVol00 is mounted; can't resize a mounted filesystem!
But how do I mount it when booted up on CD when it's burried somewhere in the LVM on hda2?
I've booted up a Knoppix CD to grow my root filesystem before. As long as the boot CD you have contains LVM support, you should be good.
You will probably need to run the following commands to get your LVM partitions recognized and get the /dev/ entries created: vgscan vgchange -ay
-Shawn
Paul wrote:
But how do I mount it when booted up on CD when it's burried somewhere in the LVM on hda2?
Boot normally, stop everything that uses it, unmount it.
If it's something you can't unmount (/, /usr, /var and alike), boot into rescue mode from CD. When prompted, let Anaconda find your existing CentOS installation. It will than create all devices and mount all file systems under /mnt/sysimage. Simply unmount what you need to unmount. Note, if you want to unmount root (and only if you want to unmount root) which is /mnt/sysimage, you'll need to unmount all filesystems under it first. As well as some stuff not shown as mounted by df command (not sure about exact list, try unmounting /mnt/sysimage/proc, /mnt/sysimage/sys, /mnt/sysimage/dev).
On Friday 05 January 2007 08:03, Aleksandar Milivojevic wrote:
As well as some stuff not shown as mounted by df command (not sure about exact list, try unmounting /mnt/sysimage/proc, /mnt/sysimage/sys, /mnt/sysimage/dev).
Running "mount" with no options will give you the list of currently mounted file systems. This can't always be relied on through, because it's actually printing /etc/mtab, which if if unchangeable (/ is ro), will not reflect mount changes. In that case, if you have proc mount, cat /proc/mounts.
On Fri, 2007-01-05 at 10:03 -0600, Aleksandar Milivojevic wrote:
Paul wrote:
But how do I mount it when booted up on CD when it's burried somewhere in the LVM on hda2?
Boot normally, stop everything that uses it, unmount it.
If it's something you can't unmount (/, /usr, /var and alike), boot into rescue mode from CD. When prompted, let Anaconda find your existing CentOS installation. It will than create all devices and mount all file systems under /mnt/sysimage. Simply unmount what you need to unmount. Note, if you want to unmount root (and only if you want to unmount root) which is /mnt/sysimage, you'll need to unmount all filesystems under it first. As well as some stuff not shown as mounted by df command (not sure about exact list, try unmounting /mnt/sysimage/proc, /mnt/sysimage/sys, /mnt/sysimage/dev).
Right, if you can't unmount there are several options ... we have a rescue mode on CD-1, the DVD, or the Single Server CD ... also we have the live CD.
The OS you boot to needs LVM2 and all the EXT3 tools ... personally I recommend the LiveCD ... that was one of it's main purposes. It is much more full featured than the rescue mode on the other CDs.
Johnny Hughes spake the following on 1/5/2007 11:13 AM:
On Fri, 2007-01-05 at 10:03 -0600, Aleksandar Milivojevic wrote:
Paul wrote:
But how do I mount it when booted up on CD when it's burried somewhere in the LVM on hda2?
Boot normally, stop everything that uses it, unmount it.
If it's something you can't unmount (/, /usr, /var and alike), boot into rescue mode from CD. When prompted, let Anaconda find your existing CentOS installation. It will than create all devices and mount all file systems under /mnt/sysimage. Simply unmount what you need to unmount. Note, if you want to unmount root (and only if you want to unmount root) which is /mnt/sysimage, you'll need to unmount all filesystems under it first. As well as some stuff not shown as mounted by df command (not sure about exact list, try unmounting /mnt/sysimage/proc, /mnt/sysimage/sys, /mnt/sysimage/dev).
Right, if you can't unmount there are several options ... we have a rescue mode on CD-1, the DVD, or the Single Server CD ... also we have the live CD.
The OS you boot to needs LVM2 and all the EXT3 tools ... personally I recommend the LiveCD ... that was one of it's main purposes. It is much more full featured than the rescue mode on the other CDs.
What would be nice, if it already isn't in the live cd, would be a command or binary to look for and mount the existing installations like the rescue mode does. If this is already there, then pardon me, as I haven't seen it. A lot of us know how to walk through and do this, but many people do not.
On Fri, 2007-01-05 at 11:25 -0800, Scott Silva wrote: <snip>
Right, if you can't unmount there are several options ... we have a rescue mode on CD-1, the DVD, or the Single Server CD ... also we have the live CD.
The OS you boot to needs LVM2 and all the EXT3 tools ... personally I recommend the LiveCD ... that was one of it's main purposes. It is much more full featured than the rescue mode on the other CDs.
What would be nice, if it already isn't in the live cd, would be a command or binary to look for and mount the existing installations like the rescue mode does. If this is already there, then pardon me, as I haven't seen it. A lot of us know how to walk through and do this, but many people do not.
While the LiveCD does not mount the devices in /mnt/sysimage ... it can automount all partitions.
If you start it with the command:
linux automount
You end up with all your partitions mounted in /mnt/ by their name.
Thanks, Johnny Hughes
On Sat, January 6, 2007 4:05 am, Johnny Hughes wrote:
On Fri, 2007-01-05 at 11:25 -0800, Scott Silva wrote:
<snip>
Right, if you can't unmount there are several options ... we have a rescue mode on CD-1, the DVD, or the Single Server CD ... also we have the live CD.
The OS you boot to needs LVM2 and all the EXT3 tools ... personally I recommend the LiveCD ... that was one of it's main purposes. It is
much
more full featured than the rescue mode on the other CDs.
What would be nice, if it already isn't in the live cd, would be a command or binary to look for and mount the existing installations like the rescue mode does. If this is already there, then pardon me, as I haven't seen it. A lot of us know how to walk through and do this, but many people do not.
While the LiveCD does not mount the devices in /mnt/sysimage ... it can automount all partitions.
If you start it with the command:
linux automount
You end up with all your partitions mounted in /mnt/ by their name.
The live CD did regognize the LV's, but did not mount them, which I liked that anyhow, as I want to do it myself, but it was nice it recognized them.
Johnny Hughes spake the following on 1/6/2007 1:05 AM:
On Fri, 2007-01-05 at 11:25 -0800, Scott Silva wrote:
<snip>
Right, if you can't unmount there are several options ... we have a rescue mode on CD-1, the DVD, or the Single Server CD ... also we have the live CD.
The OS you boot to needs LVM2 and all the EXT3 tools ... personally I recommend the LiveCD ... that was one of it's main purposes. It is much more full featured than the rescue mode on the other CDs.
What would be nice, if it already isn't in the live cd, would be a command or binary to look for and mount the existing installations like the rescue mode does. If this is already there, then pardon me, as I haven't seen it. A lot of us know how to walk through and do this, but many people do not.
While the LiveCD does not mount the devices in /mnt/sysimage ... it can automount all partitions.
If you start it with the command:
linux automount
You end up with all your partitions mounted in /mnt/ by their name.
But does that mount LV's in LVM? Or do you still need to use LVM commands to activate LV's?
On Sat, 2007-01-06 at 15:21 -0800, Scott Silva wrote:
Johnny Hughes spake the following on 1/6/2007 1:05 AM:
On Fri, 2007-01-05 at 11:25 -0800, Scott Silva wrote:
<snip>
Right, if you can't unmount there are several options ... we have a rescue mode on CD-1, the DVD, or the Single Server CD ... also we have the live CD.
The OS you boot to needs LVM2 and all the EXT3 tools ... personally I recommend the LiveCD ... that was one of it's main purposes. It is much more full featured than the rescue mode on the other CDs.
What would be nice, if it already isn't in the live cd, would be a command or binary to look for and mount the existing installations like the rescue mode does. If this is already there, then pardon me, as I haven't seen it. A lot of us know how to walk through and do this, but many people do not.
While the LiveCD does not mount the devices in /mnt/sysimage ... it can automount all partitions.
If you start it with the command:
linux automount
You end up with all your partitions mounted in /mnt/ by their name.
But does that mount LV's in LVM? Or do you still need to use LVM commands to activate LV's?
It will automount LV's if you do automount ... for example ... /mnt/dm-0 was my root filesystem when I booted up and vgdisplay and lvdisplay show all the items there.
you can unmount and remount other ways if you want.
I also had sda1 as my boot partition ... that showed up as /mnt/sda1 ... it was not mounted as /mnt/dm-0/boot ... so if you want to mount items like that, you will have to do it manually.
Johnny Hughes spake the following on 1/6/2007 3:29 PM:
On Sat, 2007-01-06 at 15:21 -0800, Scott Silva wrote:
Johnny Hughes spake the following on 1/6/2007 1:05 AM:
On Fri, 2007-01-05 at 11:25 -0800, Scott Silva wrote:
<snip>
Right, if you can't unmount there are several options ... we have a rescue mode on CD-1, the DVD, or the Single Server CD ... also we have the live CD.
The OS you boot to needs LVM2 and all the EXT3 tools ... personally I recommend the LiveCD ... that was one of it's main purposes. It is much more full featured than the rescue mode on the other CDs.
What would be nice, if it already isn't in the live cd, would be a command or binary to look for and mount the existing installations like the rescue mode does. If this is already there, then pardon me, as I haven't seen it. A lot of us know how to walk through and do this, but many people do not.
While the LiveCD does not mount the devices in /mnt/sysimage ... it can automount all partitions.
If you start it with the command:
linux automount
You end up with all your partitions mounted in /mnt/ by their name.
But does that mount LV's in LVM? Or do you still need to use LVM commands to activate LV's?
It will automount LV's if you do automount ... for example ... /mnt/dm-0 was my root filesystem when I booted up and vgdisplay and lvdisplay show all the items there.
you can unmount and remount other ways if you want.
I also had sda1 as my boot partition ... that showed up as /mnt/sda1 ... it was not mounted as /mnt/dm-0/boot ... so if you want to mount items like that, you will have to do it manually.
Just having the accesibility is great! I always have the regular rescue mode for when I need chrooted /mnt/sysimage access.
On Sat, January 6, 2007 6:21 pm, Scott Silva wrote:
Johnny Hughes spake the following on 1/6/2007 1:05 AM:
On Fri, 2007-01-05 at 11:25 -0800, Scott Silva wrote:
<snip>
Right, if you can't unmount there are several options ... we have a rescue mode on CD-1, the DVD, or the Single Server CD ... also we have the live CD.
The OS you boot to needs LVM2 and all the EXT3 tools ... personally I recommend the LiveCD ... that was one of it's main purposes. It is much more full featured than the rescue mode on the other CDs.
What would be nice, if it already isn't in the live cd, would be a command or binary to look for and mount the existing installations like the rescue mode does. If this is already there, then pardon me, as I haven't seen it. A lot of us know how to walk through and do this, but many people do not.
While the LiveCD does not mount the devices in /mnt/sysimage ... it can automount all partitions.
If you start it with the command:
linux automount
You end up with all your partitions mounted in /mnt/ by their name.
But does that mount LV's in LVM? Or do you still need to use LVM commands to activate LV's?
After I booted up on the CentOS 4.4 live CD, the LV's where both there, I just needed to mount them. And BTW, I tried the snapshot thing, it worked flawlessly. I tarred a backup then removed the LV of the snapshot. Now my next step is to see if I can actually restore the whole system on my test box. I also tarred the hda1 which is mounted as /boot. If this all goes well, I won't ever have to bring the system down for DD backups anymore.
Paul spake the following on 1/5/2007 4:50 AM:
On Fri, January 5, 2007 7:26 am, Paul wrote:
On Thu, January 4, 2007 11:11 pm, Aleksandar Milivojevic wrote:
Robert Becker Cope wrote:
"Paul" unix@bikesn4x4s.com wrote:
Thanks, and where can I find a version of ext2resize that will work
You want "resize2fs". Note that I've never used it to shrink a filesystem, myself, only to grow one.
I've used it, and it works correctly (and it is available in CentOS 4.4). It shrinks file system as it should. The only things Paul should be careful is to first shrink file system, than logical volume and to correctly calculate file system size and by how many extents he can shrink logical volume. If he shrinks logical volume too much, he might end up loosing data. Running fsck in non-destructive mode (fsck -N) and/or attempting to mount file system read-only after he shrinks logical volume might be a good idea to test all is OK.
Thanks all. And can I use it when the system is online? I would think that would be the only way I could do it, cause I can't get to the ext3 fs of the LV unless its online.
OK, guess I answered my own questions:
# resize2fs -p /dev/VolGroup00/LogVol00 30G resize2fs 1.35 (28-Feb-2004) /dev/VolGroup00/LogVol00 is mounted; can't resize a mounted filesystem!
But how do I mount it when booted up on CD when it's burried somewhere in the LVM on hda2?
How about the CentOS live CD?
On Thursday 04 January 2007 20:00, Robert Becker Cope wrote:
"Paul" unix@bikesn4x4s.com wrote:
Thanks, and where can I find a version of ext2resize that will work
You want "resize2fs". Note that I've never used it to shrink a filesystem, myself, only to grow one.
Ah, thanks for the correction. It's been a while since I needed to use it, and I remembered the name incorrectly.