Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am sure your hard drive has more space looking at the partition list.
You can create more logiical volumes using lvcreate or increase the existing logical volume using lvextend like this for instance to extend it by another 7 Gig:
As uks pointed out, tempfs is in memory so is not disk space available for you to grow VolGroup00 into.
Your question cannot be answered without some more information about the disk(s) on your system and VolGroup00.
Tell us about your disk(s) by posting the output, for each HDD (hard disk drive), from the following 3 commands, changing <HDD device name> to the name for the HDD device files on your system. It would be /dev/sda for the only HDD that we know about from your post.
The error messages you got are because you ran the requested commands on partitions and volumes as well as disks. No problem. A disk is a physical thing; Linux calls them /dev/hda, /dev/hdb etc or /dev/sda, sdb etc. For convenience, disks can be divided into partitions, see http://en.wikipedia.org/wiki/Disk_partitioning for more information. Linux calls the partitions on /dev/sda: /dev/sda1, /dev/sda2, etc.
A volume is what you create a file system in. The most simple volume is a partition; this is what you have in /dev/sda1 with your /boot file system.
More complexly, you can create a volume by configuring space from a pool of disk space taken from several partitions. This is what LVM does -- it creates logical volumes (LVs) from a pool of partitions assigned to it. In your case you have only one partition assigned to LVM.
The output from "parted /dev/sda print" shows that the /dev/sda disk is 8590MB and that it is all used, split into two partitions: /dev/sda1 and /dev/sda2. /dev/sda1 is your /boot file system (shown by your first post). /dev/sda2 is assigned to LVM.
LVM has been configured to create two volumes from the space assigned to it: LogVol00 and LogVol01. All the available space is assigned to these volumes; there is no spare.
Your first post shows LogVol00 is used for your / file system; it is gruesomely full at 99% (better to stay below 75% to avoid fragmentation and hence slow performance).
LogVol01 is used for swap; when your computer does not have enough memory to do its work, it temporarily frees some up by swapping the contents of memory out into the swap space on disk.
The only place you have to get space to give to your / file system without buying another hard disk is to take it from your swap space. You have 3.8 GB of swap space, probably way more than you need. Any idea why it is so big? There is no "right" amount of swap space; the "sweet" choice depends on many factors, including being desperately short of disk space!
Can you check how much swap space you actually use? Once you have decided how much swap space you need you could reduce LogVol01 and extend LogVol00 then resize the / file system.
None of that is going to be easy. Is LVM the right choice for you? It is powerful, flexible and permits snapshots which are great for backups but those benefits come at the cost of complexity, especially when trying to resize the / file system. You may be better off reinstalling without LVM.
[root@rh4 hh]# lvreduce -L 2G /dev/mapper/VolGroup00-LogVol01
WARNING: Reducing active and open logical volume to 2.00 GB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce LogVol01? [y/n]: y
Reducing logical volume LogVol01 to 2.00 GB
Logical volume LogVol01 successfully resized
2)
Code:
lvextend -L 2G /dev/mapper/VolGroup00-LogVol00
New size given (64 extents) not larger than existing size (125 extents)
Run `lvextend --help' for more information.
3)
Code:
[root@rh4 hh]# resize2fs /dev/mapper/VolGroup00-LogVol00
resize2fs 1.41.3 (12-Oct-2008)
The filesystem is already 1024000 blocks long. Nothing to do!
[root@rh4 hh]# resize2fs /dev/mapper/VolGroup00-LogVol01
resize2fs 1.41.3 (12-Oct-2008)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/VolGroup00-LogVol01
Couldn't find valid filesystem superblock.
lvextend -L 2G /dev/mapper/VolGroup00-LogVol00
New size given (64 extents) not larger than existing size (125 extents)
Run `lvextend --help' for more information.
I think I am missing something, right ?
Right! The clue is in New size given (64 extents) not larger than existing size (125 extents) but it's good it didn't work because you would have trashed your / file system if it had. You were reducing the wrong logical volume!
If there is any data on this system you care about then a tested backup would be a smart move.
It would also be a smart move to free some space on /. Sytems behave unpredictably when / is full and that is exactly what you don't want when doing delicate changes like this.
For general information about LVM (a good understanding can be very useful!) see http://elibrary.fultus.com/technical...lvm-intro.html and http://www.tldp.org/HOWTO/LVM-HOWTO/. For single user, single HDD systems the most beneficial LVM design is to have / in a partition and /home, /opt, /usr, /var in logical volumes. If swap size can be confidently determined then it, too, is better in a partition than in a logical volume.
After reducing the swap logical volume (dev/mapper/VolGroup00-LogVol01) you can extend the / logical volume (dev/mapper/VolGroup00-LogVol00); you are then faced with the problem of resizing the file system to fill it. Your / file system is ext3 and, best I know, that cannot be reliably resized while it is mounted but it must be mounted for the system to run. Catch 22!
What to do? You could try resizing / on the running system if you are OK with the risk of it trashing your system. Otherwise you need to boot from a Linux CD/DVD which includes device-mapper in the kernel and LVM2 executables in the file system and make the change then. This is difficult to plan and a time when a good understanding of LVM is useful for coping with the unexpected. Still worth planning, though! I couldn't find any pages on the 'net with a good procedure. It will probably require these commands after booting from CD/DVD:
# pvscan
# vgscan --mknodes
# vgchange -a y
Sorry -- I was a bit hasty reading your last post and did not fully understand it. You have already reduced the swap volume, LogVol01, but done so while it is in use for swap. That's dangerous but you may get away with it if swap is not actually being used. I do not know enough about the internal workings of kernel and LVM to advise. A reboot may be the safest/only way to get out of the situation.
When you entered the command "lvextend -L 2G /dev/mapper/VolGroup00-LogVol00" I think you missed off a +, that is you meant to enter "lvextend -L +2G /dev/mapper/VolGroup00-LogVol00".
Hi Catkin,
sorry for not posting the replay clearly . but you are correct once I rebooted and then used the proper command (lvextend -L +2G /dev/mapper/VolGroup00-LogVol00) I got some additional disk space that I wanted .
Everyone,
I really need to start looking on the resource for disk partitioning before I ask more questions. Finally, I am really grateful for everyone kind response.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.