PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > Run out of disk space on LVM
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

Run out of disk space on LVM

Réponse
 
LinkBack Outils de la discussion
Vieux 24/02/2007, 09h00   #1
Justin Hartman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Run out of disk space on LVM

Hi guys

I must say I'm a little confused here. In the past I just created one
large partition for my debian install but for this one machine I setup
seperate partitions using LVM. I may be way off the mark here but I
thought that with lvm I could resize partitions if it ran out of
space?

My current filesystem looks like this:

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/debian-root 268M 268M 0 100% /
tmpfs 249M 0 249M 0% /lib/init/rw
udev 10M 64K 10M 1% /dev
tmpfs 249M 0 249M 0% /dev/shm
/dev/hda1 236M 24M 200M 11% /boot
/dev/mapper/debian-home
27G 4.8G 21G 19% /home
/dev/mapper/debian-tmp
380M 11M 350M 3% /tmp
/dev/mapper/debian-usr
4.7G 3.0G 1.6G 66% /usr
/dev/mapper/debian-var
2.9G 283M 2.4G 11% /var

As you can see my /dev/mapper/debian-root is 100% full and I have no
idea how to extend the size to that partition or how to remove stuff
from that partition.

My first prize solution is to move space from my /home partition to my
/dev/mapper/debian-root partition but again - not sure how.

Any ideas please?
--
Regards
Justin Hartman
PGP Key ID: 102CC123


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 24/02/2007, 09h40   #2
Gilles Mocellin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run out of disk space on LVM

Le samedi 24 février 2007 09:58, Justin Hartman a écrit:
> Hi guys
>
> I must say I'm a little confused here. In the past I just created one
> large partition for my debian install but for this one machine I setup
> seperate partitions using LVM. I may be way off the mark here but I
> thought that with lvm I could resize partitions if it ran out of
> space?
>
> My current filesystem looks like this:
>
> Filesystem Size Used Avail Use% Mounted on
> /dev/mapper/debian-root 268M 268M 0 100% /
> tmpfs 249M 0 249M 0% /lib/init/rw
> udev 10M 64K 10M 1% /dev
> tmpfs 249M 0 249M 0% /dev/shm
> /dev/hda1 236M 24M 200M 11% /boot
> /dev/mapper/debian-home
> 27G 4.8G 21G 19% /home
> /dev/mapper/debian-tmp
> 380M 11M 350M 3% /tmp
> /dev/mapper/debian-usr
> 4.7G 3.0G 1.6G 66% /usr
> /dev/mapper/debian-var
> 2.9G 283M 2.4G 11% /var
>
> As you can see my /dev/mapper/debian-root is 100% full and I have no
> idea how to extend the size to that partition or how to remove stuff
> from that partition.
>
> My first prize solution is to move space from my /home partition to my
> /dev/mapper/debian-root partition but again - not sure how.
>
> Any ideas please?
> --
> Regards
> Justin Hartman
> PGP Key ID: 102CC123


0) You must tell us what filesystems you use on / and /var. I suppose it's
ext3 for now.

1) If there's space on the VG debian, just extend the root LV :
To see space used on the debian VG :
# vgs debian

Add space to root :
# lvextend -L+50M /dev/vg/debian/root

Extend the filesystem
# resize2fs /dev/vg/debian/root

2) You've got space on /var, so reduce it to give space to root :
# resize2fs /dev/debian/var 2G
# lvextend -L 350M /dev/debian/root
# resize2fs /dev/debian/root

If you use reiserfs instead of ext3, replace resize2fs by resize_reiserfs (see
man for the parameters).
If you use xfs, you cannot shrink, but can grow with xfs_grow
If you use jfs, I don't know, but there's certainly a command at least to grow
the filesystem.

Note :
ext3 can be resize online since <put her a kernel version> and by default if
the filesystem has been created with e2fsprogs >= 1.38+1.39-WIP-2006.03.29-1
(mke2fs -O resize_inode is by default)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBF4AXMDltnDmLJYdARApQvAJ4ySLm8MXjBXVFrYpqZNl L8uwCk0ACfZLO6
N9B2grqmfb+9Lj6lfzHivVs=
=khaU
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 24/02/2007, 09h50   #3
Justin Hartman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run out of disk space on LVM

On 2/24/07, Gilles Mocellin <gilles.mocellin@free.fr> wrote:
> 0) You must tell us what filesystems you use on / and /var. I suppose it's
> ext3 for now.


Yes it's ext3

> 1) If there's space on the VG debian, just extend the root LV :
> To see space used on the debian VG :
> # vgs debian


There is no space so I've ommited trying this step.

> 2) You've got space on /var, so reduce it to give space to root :
> # resize2fs /dev/debian/var 2G
> # lvextend -L 350M /dev/debian/root
> # resize2fs /dev/debian/root


Executing resize2fs /dev/debian/var 2G returns this:

Filesystem at /dev/debian/var is mounted on /var; on-line resizing required
On-line shrinking from 750592 to 524288 not supported.
--
Regards
Justin Hartman
PGP Key ID: 102CC123


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 24/02/2007, 10h50   #4
Gilles Mocellin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run out of disk space on LVM

Le samedi 24 février 2007 10:41, Justin Hartman a écrit:
> On 2/24/07, Gilles Mocellin <gilles.mocellin@free.fr> wrote:
> > 0) You must tell us what filesystems you use on / and /var. I suppose
> > it's ext3 for now.

>
> Yes it's ext3
>
> > 1) If there's space on the VG debian, just extend the root LV :
> > To see space used on the debian VG :
> > # vgs debian

>
> There is no space so I've ommited trying this step.
>
> > 2) You've got space on /var, so reduce it to give space to root :
> > # resize2fs /dev/debian/var 2G
> > # lvextend -L 350M /dev/debian/root
> > # resize2fs /dev/debian/root

>
> Executing resize2fs /dev/debian/var 2G returns this:
>
> Filesystem at /dev/debian/var is mounted on /var; on-line resizing required
> On-line shrinking from 750592 to 524288 not supported.


So your filesystem was created without -O resize_inode.
You'll have to boot on a live CD (RIP, grml...) and do these steps offline.

Perhaps, you can go to runlevel 1 and unmount /var before shrinking it, I
think you have a chance here.
Online growing of / will perhaps work, else boot on a live CD (or other
system).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBF4BdzDltnDmLJYdARAo3EAKC6vKobbkKN/NBau1Rw+RwHukhN6ACfVfPA
m47J13K2AC97Po29VkjUvv0=
=QQTN
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 24/02/2007, 11h20   #5
Thierry Chatelet
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run out of disk space on LVM

On Saturday 24 February 2007 10:30, Gilles Mocellin wrote:
> Le samedi 24 février 2007 09:58, Justin Hartman a écritÂ:
> > Hi guys
> >
> > I must say I'm a little confused here. In the past I just created one
> > large partition for my debian install but for this one machine I setup
> > seperate partitions using LVM. I may be way off the mark here but I
> > thought that with lvm I could resize partitions if it ran out of
> > space?
> >
> > My current filesystem looks like this:
> >
> > Filesystem Size Used Avail Use% Mounted on
> > /dev/mapper/debian-root 268M 268M 0 100% /
> > tmpfs 249M 0 249M 0% /lib/init/rw
> > udev 10M 64K 10M 1% /dev
> > tmpfs 249M 0 249M 0% /dev/shm
> > /dev/hda1 236M 24M 200M 11% /boot
> > /dev/mapper/debian-home
> > 27G 4.8G 21G 19% /home
> > /dev/mapper/debian-tmp
> > 380M 11M 350M 3% /tmp
> > /dev/mapper/debian-usr
> > 4.7G 3.0G 1.6G 66% /usr
> > /dev/mapper/debian-var
> > 2.9G 283M 2.4G 11% /var
> >
> > As you can see my /dev/mapper/debian-root is 100% full and I have no
> > idea how to extend the size to that partition or how to remove stuff
> > from that partition.
> >
> > My first prize solution is to move space from my /home partition to my
> > /dev/mapper/debian-root partition but again - not sure how.
> >
> > Any ideas please?
> > --
> > Regards
> > Justin Hartman
> > PGP Key ID: 102CC123

>
> 0) You must tell us what filesystems you use on / and /var. I suppose it's
> ext3 for now.
>
> 1) If there's space on the VG debian, just extend the root LV :
> To see space used on the debian VG :
> # vgs debian
>
> Add space to root :
> # lvextend -L+50M /dev/vg/debian/root
>
> Extend the filesystem
> # resize2fs /dev/vg/debian/root
>
> 2) You've got space on /var, so reduce it to give space to root :
> # resize2fs /dev/debian/var 2G
> # lvextend -L 350M /dev/debian/root
> # resize2fs /dev/debian/root
>
> If you use reiserfs instead of ext3, replace resize2fs by resize_reiserfs
> (see man for the parameters).
> If you use xfs, you cannot shrink, but can grow with xfs_grow
> If you use jfs, I don't know, but there's certainly a command at least to
> grow the filesystem.
>
> Note :
> ext3 can be resize online since <put her a kernel version> and by default
> if the filesystem has been created with e2fsprogs >=
> 1.38+1.39-WIP-2006.03.29-1 (mke2fs -O resize_inode is by default)


Also apt-get clean may you there wihout resizing
Thierry
--
Linux is like a tipi: no Windows, no Gate and an Apache inside
  Réponse avec citation
Vieux 24/02/2007, 14h10   #6
Marcus Blumhagen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run out of disk space on LVM

On Sat, Feb 24, 2007 at 10:30:46AM +0100, Gilles Mocellin wrote:
> [...]
> 2) You've got space on /var, so reduce it to give space to root :
> # resize2fs /dev/debian/var 2G
> # lvextend -L 350M /dev/debian/root
> # resize2fs /dev/debian/root
> [...]


You forgot the lvreduce step. Without it there won't be free extents
in the VG.

Regards
--
Marcus Blumhagen

"Any intelligent fool can make things bigger, more complex, and more
violent. It takes a touch of genius -- and a lot of courage -- to move
in the opposite direction."
-- Albert Einstein

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF4Ea51MkssNtIhgsRAje1AJ9VI+NYj3KnRPVBx9atv3 zOCT1pPgCdGvzI
bnfQklmGNr9Y/8PQa7IP2dM=
=9B0y
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 24/02/2007, 15h20   #7
Justin Hartman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run out of disk space on LVM

Ok I managed to resize my root partition but in doing so I have a
problem with my var partition now.

The message I get at boot time when fsck runs is:

# The filesystem size (according to the superblock) is 750592 blocks
The physical size of the device is 687104 blocks Either the superblock
or the partition table is likely to be corrupt!

I tried to run:
# resize2fs /dev/debian/var
As well as:
# resize2fs -f /dev/debian/var

But neither work and I get an error that it can't read the bitmap
block or something to that effect.

What is clear to me is that in resizing I have gone from 750592 blocks
to 687104 but somewhere this has not updated yet.

Anyone know how I can fix this?

On 2/24/07, Marcus Blumhagen <marcus.blumhagen@web.de> wrote:
> On Sat, Feb 24, 2007 at 10:30:46AM +0100, Gilles Mocellin wrote:
> > [...]
> > 2) You've got space on /var, so reduce it to give space to root :
> > # resize2fs /dev/debian/var 2G
> > # lvextend -L 350M /dev/debian/root
> > # resize2fs /dev/debian/root
> > [...]

>
> You forgot the lvreduce step. Without it there won't be free extents
> in the VG.
>
> Regards
> --
> Marcus Blumhagen
>
> "Any intelligent fool can make things bigger, more complex, and more
> violent. It takes a touch of genius -- and a lot of courage -- to move
> in the opposite direction."
> -- Albert Einstein
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFF4Ea51MkssNtIhgsRAje1AJ9VI+NYj3KnRPVBx9atv3 zOCT1pPgCdGvzI
> bnfQklmGNr9Y/8PQa7IP2dM=
> =9B0y
> -----END PGP SIGNATURE-----
>
>



--
Regards
Justin Hartman
PGP Key ID: 102CC123


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 24/02/2007, 16h00   #8
Marcus Blumhagen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run out of disk space on LVM

On Sat, Feb 24, 2007 at 05:16:34PM +0200, Justin Hartman wrote:
> Ok I managed to resize my root partition but in doing so I have a
> problem with my var partition now.
>
> The message I get at boot time when fsck runs is:
>
> # The filesystem size (according to the superblock) is 750592 blocks
> The physical size of the device is 687104 blocks Either the superblock
> or the partition table is likely to be corrupt!
>
> I tried to run:
> # resize2fs /dev/debian/var
> As well as:
> # resize2fs -f /dev/debian/var
> [...]


When did you try to run resize2fs? Was it before or after lvreduce? Or
could you provide more detail on how you managed to grow / and shrink
/var?

> [...]
> But neither work and I get an error that it can't read the bitmap
> block or something to that effect.
>
> What is clear to me is that in resizing I have gone from 750592 blocks
> to 687104 but somewhere this has not updated yet.
>
> Anyone know how I can fix this?
> [...]


Regards
--
Marcus Blumhagen

"Any intelligent fool can make things bigger, more complex, and more
violent. It takes a touch of genius -- and a lot of courage -- to move
in the opposite direction."
-- Albert Einstein

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF4GBF1MkssNtIhgsRAv1WAJsG3wY1hMXKf3RCNCMF2v JnLKx/RQCggku0
UG69FN4ZnvUqroo5j2wgYTs=
=5k8C
-----END PGP SIGNATURE-----

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h49.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16666 seconds with 16 queries