LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-26-2010, 07:35 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Rep: Reputation: 51
Query about the LVM?


My Fedora 11 hard disk space setup is
Code:
[root@localhost ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1275    10241406    7  HPFS/NTFS
/dev/sda2            1276       30401   233954595    f  W95 Ext'd (LBA)
/dev/sda5            1276        5099    30716248+   7  HPFS/NTFS
/dev/sda6            5100       11473    51199123+   7  HPFS/NTFS
/dev/sda7           11474       17847    51199123+   7  HPFS/NTFS
/dev/sda8   *       17848       17873      204799+  83  Linux
/dev/sda9           17873       30401   100635204   8e  Linux LVM

Disk /dev/dm-0: 98.8 GB, 98838773760 bytes
255 heads, 63 sectors/track, 12016 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 4211 MB, 4211081216 bytes
255 heads, 63 sectors/track, 511 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table
[root@localhost ~]#
Code:
root@localhost ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda9
  VG Name               VolGroup
  PV Size               95.97 GB / not usable 580.00 KB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              24569
  Free PE               0
  Allocated PE          24569
  PV UUID               qLL0E0-dSrG-Uw2P-Q3Hi-yMUx-3qtv-VUZQAf
   
[root@localhost ~]# ^C
[root@localhost ~]#
Code:
[root@localhost ~]# vgdisplay
  --- Volume group ---
  VG Name               VolGroup
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               95.97 GB
  PE Size               4.00 MB
  Total PE              24569
  Alloc PE / Size       24569 / 95.97 GB
  Free  PE / Size       0 / 0   
  VG UUID               MxbEko-QoTK-ObyY-cwF1-8Fzf-cvat-SwNccQ
   
[root@localhost ~]#
Code:
[root@localhost ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup/lv_root
  VG Name                VolGroup
  LV UUID                LSScW6-oe33-fvR0-4hhM-MFHb-Pjv2-ewkeFX
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                92.05 GB
  Current LE             23565
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Name                /dev/VolGroup/lv_swap
  VG Name                VolGroup
  LV UUID                3SUYIk-9juP-ARsq-RATf-f6PO-Us45-15f5pU
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                3.92 GB
  Current LE             1004
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
   
[root@localhost ~]#
The Linux was installed through automatic partition option.

Few doubts to ask:
1. What partitions are recommended to be created on LVM?
Is boot and swap partition recommended?

2.What more partition I can create with this LVM?
 
Old 02-26-2010, 07:49 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
These days you can put what you like on LVM.
Used to be you couldn't put /boot on it.
Read up about it to make sure you want what it does.
It's often used like RAID - only more flexible.
 
Old 02-26-2010, 07:53 AM   #3
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Any specific reason for not putting /boot.
As I think if it put could save our life more.
 
Old 02-26-2010, 08:01 AM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 4,313
Blog Entries: 7

Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Quote:
Originally Posted by Simon Bridge View Post
These days you can put what you like on LVM.
Used to be you couldn't put /boot on it.
You still can't if you use luks encrypted PVs, but that's a special case.


Simon is correct: create whatever lv's you feel like. Partitioning is a very personal choice.

Here's mine. I'm sure you can guess where they're mounted based on the lv names.
Code:
root@nix:~# pvs
  PV                 VG     Fmt  Attr PSize   PFree  
  /dev/mapper/pvsda5 rootvg lvm2 a-   306.41G 184.91G
root@nix:~# lvs
  LV      VG     Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  lvhome  rootvg -wi-ao   8.00G                                      
  lvlocal rootvg -wi-ao  80.00G                                      
  lvopt   rootvg -wi-ao 512.00M                                      
  lvroot  rootvg -wi-ao 512.00M                                      
  lvtmp   rootvg -wi-ao 512.00M                                      
  lvusr   rootvg -wi-ao  16.00G                                      
  lvvar   rootvg -wi-ao  16.00G                                      
root@nix:~#
I have enough free ram not to need swap, but should I ever need it, I'll add a lvswap to the collection.


P.S. Some people prefer to keep / (rootfs) and /boot outside of lvm to help with resilience and to ensure that you can still boot the system to a maintenance shell if your lvm config gets corrupted somehow. Personally, I don't subscribe to this and I keep a live-cd to hand to boot from should I ever end up in that situation.

Last edited by GazL; 02-26-2010 at 08:04 AM.
 
1 members found this post helpful.
Old 02-26-2010, 09:05 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
/boot is where the kernel lives... and the kernel contains the drivers which can manage the lvm volume. Thus, it used to be a bit like opening a box with the key locked inside it. These days, the ability has been added to grub.

If you use encryption, you still have the issue that something must be unencrypted to load the keys. ince /boot is not writable in normal operation, it is safe to leave unencrypted. Unlike windows which can write sensitive data anywhere and so needs whole-disk encryption.

It is not too uncommon in linux to put /boot on a keydrive though - so it will only boot with the key in the lock as it were. The internal drive can be totally encrypted then.


Note on swap: if you want to use hibernate - you need swap.
If you have lots of RAM, you can get away with lowering swappiness.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hardware Raid5 LVM query sol9001 Linux - Hardware 2 06-15-2009 02:28 PM
LVM for File Protection: Query regarding a Project rahulbaheti86 Linux - General 1 01-30-2009 05:16 PM
LVM activate query in RHEL4 sarojt Linux - Server 2 08-22-2008 12:50 AM
help with mysql query: return nth rows in query hawarden Programming 2 07-31-2006 06:36 PM


All times are GMT -5. The time now is 09:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration