Sponsored Content
Operating Systems Linux About shrinking LVM and then adding the freed space to another OS on dualboot system Post 302690111 by satimis on Wednesday 22nd of August 2012 12:55:06 PM
Old 08-22-2012
About shrinking LVM and then adding the freed space to another OS on dualboot system

Hi all,

Fedora 17, 64bit
Ubuntu 12.04 desktop 64bit
HD 160G

I installed Ubuntu 12.04 on the HD first taking up the whole disc. Later I added/installed Fedora 17 selecting the "Shrink" option and save the bootloader on /dev/sda1 to make them dualboot. Installation is successful with dulaboot option. Unfortunately by mistake I retained insufficient space for Ubuntu 12.04 now only about 100M left when it is up.


Ubuntu 12.04
$ df -h
Code:
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       4.0G  3.7G  107M  98% /
udev            3.8G  4.0K  3.8G   1% /dev
tmpfs           1.6G  880K  1.6G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.8G  156K  3.8G   1% /run/shm


Fedora 17
$ df -h
Code:
Filesystem                       Size  Used Avail Use% Mounted on
rootfs                            50G  4.0G   46G   9% /
devtmpfs                         3.8G     0  3.8G   0% /dev
tmpfs                            3.8G  100K  3.8G   1% /dev/shm
tmpfs                            3.8G  1.9M  3.8G   1% /run
/dev/mapper/vg_fedora17-lv_root   50G  4.0G   46G   9% /
tmpfs                            3.8G     0  3.8G   0% /sys/fs/cgroup
tmpfs                            3.8G     0  3.8G   0% /media
/dev/sda3                        497M   60M  413M  13% /boot
/dev/mapper/vg_fedora17-lv_home   78G  1.4G   72G   2% /home

I'm now trying to find a not-too-complicate way shrinking /home of Fedora 17 and then adding the freed space to / of Ubuntu 12.04.

This is a spare HD NOT for production. I'll use it testing Cloud running on Fedora 17 and Ubuntu 12.04 respectively. There is not much data nor much work done on both OS. The only work I did several day before was installing rotation desktop on Ubuntu 12.04. It is now working.


I think I have to split the job into 2 sections

1)
Shrinking Fedora lv_home

2)
Adding the freed space to Ubuntu /


Would following documents be relevant to 1) above?

9.5. Using the LVM utility system-config-lvm
9.5.*Using the LVM utility system-config-lvm

Linux LVM: Resizing partitions.
http://www.microdevsys.com/WordPress...ng-partitions/


I'm still hunting around for documents to be used for 2) above.

Thanks.


B.R.
satimis
 

10 More Discussions You Might Find Interesting

1. HP-UX

disk adding through lvm

Hi dear(s) Can u explain how to add a disk through lvm with commands. I need to add a 9 gb scsi HS disk to a Hp D class 9000 server. (2 Replies)
Discussion started by: sreekumar.R
2 Replies

2. Filesystems, Disks and Memory

mv files still in use - space not freed

Had a issue recently where DB admins did: mv listener.log listener.log.old gzip listener.log.old Where file listener.log is continually being written to by an oracle process. Anyway, according to the DB admins they successfully created the listener.log.old.gz file (i.e. all went okay).... (4 Replies)
Discussion started by: apra143
4 Replies

3. UNIX for Advanced & Expert Users

Data Recovery from file system overwritten with LVM.

Hey peeps, Here is somethin u might find interestin.... Is it possible to recover data from a partition which used to be an ext3 file sytem with some nice forgotten backups, which now is an lvm partion containg root partition of another OS. :) I couldn't create any mess better than this, can... (2 Replies)
Discussion started by: squid04
2 Replies

4. Linux

shrinking root partition and using free space to create a block device

We are intending to protect a set of user specified files using LVM mirroring where the protected space on which the user files are stored is mirrored on an LV on a different disk. Our problem is that for a user with a custom layout has installed linux with 2 partitons for swap and / and there is... (0 Replies)
Discussion started by: kickdgrass
0 Replies

5. AIX

disk space shortage, how to migrate to LVM?

Hello I'm working on AIX 6.1. I inherited something I do not know and now I need to bring it into the line. # df -m Filesystem MB blocks Free %Used Mounted on /dev/hd4 | 256.00 | 87.09 | 66% / /dev/hd2 | 4608.00 | 82.45 | 99%... (11 Replies)
Discussion started by: michalwu
11 Replies

6. Red Hat

add lvm space from a regular partition

Hi, I have red hat enterprise 4. I would like to add more space on my lvm from the first partition that is not lvm type. Here's the config # fdisk -l Disk /dev/sda: 73.4 GB, 73406611456 bytes 255 heads, 63 sectors/track, 8924 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes... (6 Replies)
Discussion started by: itik
6 Replies

7. Filesystems, Disks and Memory

Expanding a volume group with system-config-lvm

Good morning, I'm working in a lab that generates a good amount of data and we've just about filled our 9.1TB RAID. The system is a Dell PowerEdge 2950 running Scientific Linux 5.4 with a PERC H800 and a Dell PowerVault MD1200. The MD1200 has 12 bays, 6 of which were filled with 2TB drives... (1 Reply)
Discussion started by: mmulqu
1 Replies

8. UNIX for Advanced & Expert Users

LVM, Troubles with adding another Disk

I am having trouble with LVM and one of my physical volumes. Using Ubuntu Desktop 14.04 I was trying to set up LVM across two disks (not containing the OS or Home). First I created the initial Physical Volume, the Volume Group, and the Logical volume, and everything seemed fine. The... (2 Replies)
Discussion started by: JR_ULFOR
2 Replies

9. UNIX for Advanced & Expert Users

[REDHAT7] Adding LVM volume

Dear community, is it possible to add more volumes to actual LVM disk? I have the following: # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 120G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 ... (0 Replies)
Discussion started by: Lord Spectre
0 Replies

10. UNIX for Beginners Questions & Answers

Safe way to shrink lvm vg_*-lv_swap partition and reclaim freed space on Linux?

Hello, # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom sda 8:0 0 38.2G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 ... (2 Replies)
Discussion started by: centosadmin
2 Replies
dtc_kill_vps_disk(8)					      System Manager's Manual					      dtc_kill_vps_disk(8)

NAME
dtc_kill_vps_disk - destroy LVM disks for freeing space SYNOPSIS
dtc_kill_vps_disk VPS_NUMBER [ lvm|loopback ] DESCRIPTION
dtc_kill_vps_disk This shell script is a part of the dtc-xen package that is to be used by the dtc panel to manage a Xen VPS server. This script is used to delete a partitions that was used by a VPS. It will delete the normal partition that was used as a root disk, and the swap partition. dtc_kill_vps_disk is to be used by the dtc-xen SOAP server, but can also be used as a standalone userland tool. OPTIONS
VPS_NUMBER has to be a number between 01 and 19. Let's say the number is 16, and that dtc-xen is configured to use the volume group called lvm1, then this script will create /dev/lvm1/xen16 and /dev/lvm1/xen16swap. IMAGE_TYPE This parameter can have 2 values: either lvm or loopback. If ommited, then lvm is used. If lvm is used, then this script will create a partition using lvmcreate, otherwise it will create an image file. Both will later be used for the VPS. EXAMPLE
dtc_setup_vps_disk 04 lvm This will delete the 2 LVM partitions that were used by the VPS named xen04, the first one being the root partition, and the second one being the swap partition. VERSION
This documentation describes dtc_kill_vps_disk See http://www.gplhost.com/software-dtc-xen.html for updates. SEE ALSO
dtc_reinstall_os(8), dtc_setup_vps_disk(8) dtc_kill_vps_disk(8)
All times are GMT -4. The time now is 10:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy