FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 09-26-2008, 07:56 PM
Andrey Meganov
 
Default resizing swap

Sorry, for not answering in the thread, i only get maillist digest.

You can shrink the root LV, while it's mounted readonly. Just boot to
the single user, remount / read only and resize. Don't forget to
shrink the fs first, then the LV


Regards,
Andrey

Sent from my iPhone as I am away from office

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 09-26-2008, 08:10 PM
Ryan Golhar
 
Default resizing swap

ah ha! Thank you!

I was holding out on creating a swap file because I knew it would hinder
performance somewhat.


I even thought about creating my own redhat liveCD to get the LVM tools
to do this, but this solution is much easier.



Andrey Meganov wrote:

Sorry, for not answering in the thread, i only get maillist digest.

You can shrink the root LV, while it's mounted readonly. Just boot to
the single user, remount / read only and resize. Don't forget to shrink
the fs first, then the LV


Regards,
Andrey

Sent from my iPhone as I am away from office

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 09-29-2008, 08:30 PM
Ryan Golhar
 
Default resizing swap

In case, anyone is interested in the the solution...


You can't shrink a volume using resize2fs so rebooting into single user
mode and mounting / as read-only won't work.


After some more googling, I found the following:

1. Write the FC rescue disk ISO onto a CD, and reboot the machine from it.
2. Do not mount the file systems.
3. At the prompt, type:

lvm

4. Within LVM, run these commands (comments are after the '#'s):

lvm> vgscan # Will show the name of the Volume Group
lvm> vgchange --available y VolGroup00 # Activates the VG and the LVs in it
lvm> lvscan # Should show the LVs as "ACTIVE"; the devices in /dev it
mentions should now exist

lvm> exit # Quit, return to the prompt

5. Now resize the filesystem with this command (e.g., using device
/dev/VolGoup00/LogVol00):


e2fsck -f /dev/VolGoup00/LogVol00 # fsck on the filesystem
resize2fs /dev/VolGoup00/LogVol00 nnG # resize the fs to nn GB; nn
should be less than the current fs size
e2fsck -f /dev/VolGoup00/LogVol00 # Do another fsck on the filesystem;
fix any errors which appear


6. Run lvm again and type:

lvm> lvreduce -LnnG /dev/VolGoup00/LogVol00 # Resize the LV to nn GB; nn
should be the same as above

lvm> exit # Quit, return to the prompt

7. Finally, do another filesystem check:

e2fsck -f /dev/VolGoup00/LogVol00 # Do another fsck on the filesystem;
fix any errors which appear


8. Remove the CD and reboot.



Andrey Meganov wrote:

Sorry, for not answering in the thread, i only get maillist digest.

You can shrink the root LV, while it's mounted readonly. Just boot to
the single user, remount / read only and resize. Don't forget to shrink
the fs first, then the LV


Regards,
Andrey

Sent from my iPhone as I am away from office

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 09-30-2008, 09:57 AM
Andrey Meganov
 
Default resizing swap

Sent from my iPhone as I am away from office


On 30.09.2008, at 0:30, Ryan Golhar <golharam@umdnj.edu> wrote:


In case, anyone is interested in the the solution...


You can't shrink a volume using resize2fs so rebooting into single
user mode and mounting / as read-only won't work.


That is working. Mounting fs readonly still allows you to gain
exclusive access. Otherwise you wouldnt be able to fsck a filesystem
without external boot.



After some more googling, I found the following:

1. Write the FC rescue disk ISO onto a CD, and reboot the machine
from it.

2. Do not mount the file systems.
3. At the prompt, type:

lvm

4. Within LVM, run these commands (comments are after the '#'s):

lvm> vgscan # Will show the name of the Volume Group
lvm> vgchange --available y VolGroup00 # Activates the VG and the
LVs in it
lvm> lvscan # Should show the LVs as "ACTIVE"; the devices in /dev
it mentions should now exist

lvm> exit # Quit, return to the prompt

5. Now resize the filesystem with this command (e.g., using device /
dev/VolGoup00/LogVol00):


e2fsck -f /dev/VolGoup00/LogVol00 # fsck on the filesystem
resize2fs /dev/VolGoup00/LogVol00 nnG # resize the fs to nn GB; nn
should be less than the current fs size
e2fsck -f /dev/VolGoup00/LogVol00 # Do another fsck on the
filesystem; fix any errors which appear


6. Run lvm again and type:

lvm> lvreduce -LnnG /dev/VolGoup00/LogVol00 # Resize the LV to nn
GB; nn should be the same as above

lvm> exit # Quit, return to the prompt

7. Finally, do another filesystem check:

e2fsck -f /dev/VolGoup00/LogVol00 # Do another fsck on the
filesystem; fix any errors which appear


8. Remove the CD and reboot.



Andrey Meganov wrote:

Sorry, for not answering in the thread, i only get maillist digest.
You can shrink the root LV, while it's mounted readonly. Just boot
to the single user, remount / read only and resize. Don't forget to
shrink the fs first, then the LV

Regards,
Andrey
Sent from my iPhone as I am away from office

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 09-30-2008, 09:06 PM
"Alvarez, Angelo CIV NMFC_JTWC"
 
Default resizing swap

You might also try gparted live cd
(http://gparted.sourceforge.net/livecd.php). You can resize partitions
using a GUI. The live cd seems to support most RAID controlers as well.

v/r

angelo

-----Original Message-----
From: redhat-list-bounces@redhat.com
[mailto:redhat-list-bounces@redhat.com] On Behalf Of Ryan Golhar
Sent: Monday, September 29, 2008 10:30
To: General Red Hat Linux discussion list
Subject: Re: resizing swap

In case, anyone is interested in the the solution...


You can't shrink a volume using resize2fs so rebooting into single user
mode and mounting / as read-only won't work.

After some more googling, I found the following:

1. Write the FC rescue disk ISO onto a CD, and reboot the machine from
it.
2. Do not mount the file systems.
3. At the prompt, type:

lvm

4. Within LVM, run these commands (comments are after the '#'s):

lvm> vgscan # Will show the name of the Volume Group vgchange
lvm> --available y VolGroup00 # Activates the VG and the LVs in it
lvm> lvscan # Should show the LVs as "ACTIVE"; the devices in /dev it
mentions should now exist
lvm> exit # Quit, return to the prompt

5. Now resize the filesystem with this command (e.g., using device
/dev/VolGoup00/LogVol00):

e2fsck -f /dev/VolGoup00/LogVol00 # fsck on the filesystem resize2fs
/dev/VolGoup00/LogVol00 nnG # resize the fs to nn GB; nn should be less
than the current fs size e2fsck -f /dev/VolGoup00/LogVol00 # Do another
fsck on the filesystem; fix any errors which appear

6. Run lvm again and type:

lvm> lvreduce -LnnG /dev/VolGoup00/LogVol00 # Resize the LV to nn GB; nn
should be the same as above
lvm> exit # Quit, return to the prompt

7. Finally, do another filesystem check:

e2fsck -f /dev/VolGoup00/LogVol00 # Do another fsck on the filesystem;
fix any errors which appear

8. Remove the CD and reboot.



Andrey Meganov wrote:
> Sorry, for not answering in the thread, i only get maillist digest.
>
> You can shrink the root LV, while it's mounted readonly. Just boot to
> the single user, remount / read only and resize. Don't forget to
> shrink the fs first, then the LV
>
> Regards,
> Andrey
>
> Sent from my iPhone as I am away from office
>

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 09:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org