Skip to contentSkip to conversation

my project

linux-lvm Afonso Henriques Silva Leite 2 participants 2 messages Mar 5, 2010

lore
Share & tools
lore
#0 lore raw

Hi everybody!!
First of all, I would like to apologize if my inexperience causes any inconvenience.
I was reading lvm howto, and in the 5.7 section there was a suggestion do discuss my ideas on the developer list, so here I am.
My project is to create a lvgroup to enlarge my root partition, so that I can install Sage and Mathematica on it.
I divided my only 40GB hard disk as follows:

Comando (m para ajuda): p

Disco /dev/sda: 40.1 GB, 40060403712 bytes 255 heads, 63 sectors/track, 4870 cylinders Unidades = cilindros de 16065 * 512 = 8225280 bytes Identificador do disco: 0xea84ea84

Dispositivo Boot Início Fim Blocos Id Sistema

/dev/sda1   *           1         623     5004216    7  HPFS ou NTFS
/dev/sda2             624        4870    34114027+   5  Estendida
/dev/sda5            4689        4870     1461883+  82  Linux swap /
Solaris
/dev/sda6             624        1246     5004184+  83  Linux
/dev/sda7            1247        4688    27647833+  83  Linux

My idea was to have a big partition only for documents, and a lower one just for distro installations, so that I wouldn't need to do backups when I decided to change the distributions. But after a few weeks, the root partition was almost fullfilled, as df -H shows:

Sist. Arq.             Tam    Usado Disp  Uso% Montado em
/dev/sda6              5,1G   4,1G   738M  85% /
udev                   257M   283k   257M   1% /dev
none                   257M   873k   256M   1% /dev/shm
none                   257M    87k   257M   1% /var/run
none                   257M      0   257M   0% /var/lock
none                   257M      0   257M   0% /lib/init/rw
none                   5,1G   4,1G   738M

85% /var/lib/ureadahead/debugfs
/dev/sda7 28G 17G 9,8G
63% /media/04d003f6-a6ee-4a6c-8c84-2dd1136f8242

So guys, what do you think? Can I solve my problem with lvm? I mean, I remember reading a warning to do not use lvm with root partitions. It's impossible to do it?

Again, sorry for my poor english and inexperience, and thanks anyway.

#1 lore raw
Quoted 3 lines · Afonso Henriques Silva Leite

So guys, what do you think? Can I solve my problem with lvm? I mean, I remember reading a warning to do not use lvm with root partitions. It's impossible to do it?

LVM works fine for the root partition. There are a few operations that require booting from a LiveCD (like shrinking the root LV), but I've never had to do them.

LVM does not currently work for the *boot* partition (although the grub guys are working on that).

It will not be easy to convert your disk to LVM, however. You should get another 40G disk (I have a stack of them, having recycled all my 10s and 20s). Install the new disk as primary, and the old as secondary. Install an LVM friendly distro like Fedora on the new disk with "Custom Disk Layout". Allocate a 300M /boot partition, and the remainder as an LVM PV. Allocate a 10G LV for system, a swap LV, and a large data LV mounted on the same directory as your current system. After installing and updating, copy your data directory over with rsync.

Once your root is in LVM, it is very easy to enlarge while mounted and the system is cranking!

Signature · 4 lines
	      Stuart D. Gathman <[email protected]>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.