Fedora Server LVM question
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 12 of 12
  1. #1
    Join Date
    Jun 2004
    Posts
    127
    Linux (Fedora) Firefox 62.0

    Fedora Server LVM question

    Hi,

    After installing Fedora Server on a 1TB drive, for some reason only 15GB is allocated to the root file system as can be seen from "df -h".
    Code:
    Filesystem                    Size  Used Avail Use% Mounted on
    devtmpfs                      3.9G     0  3.9G   0% /dev
    tmpfs                         3.9G     0  3.9G   0% /dev/shm
    tmpfs                         3.9G  1.2M  3.9G   1% /run
    tmpfs                         3.9G     0  3.9G   0% /sys/fs/cgroup
    /dev/mapper/fedora_mars-root   15G  1.7G   14G  11% /
    tmpfs                         3.9G  4.0K  3.9G   1% /tmp
    /dev/sda1                     976M  125M  784M  14% /boot
    tmpfs                         787M     0  787M   0% /run/user/0
    while "fdisk -l /dev/sda" shows
    Code:
    Device     Boot   Start        End    Sectors   Size Id Type
    /dev/sda1  *       2048    2099199    2097152     1G 83 Linux
    /dev/sda2       2099200 1953523711 1951424512 930.5G 8e Linux LVM
    I know next to nothing about LVM so my question is how do I get access to the "missing" ~915GB of space?

  2. #2
    Join Date
    Jan 2010
    Posts
    7,363
    Linux Chrome 69.0.3497.81

    Re: Fedora Server LVM question

    If the space is free (I don't use LVM much anymore, so not sure what the automatic partitioning does) you can possibly expand / to make use of the rest of the space. I have a somewhat dated but probably still accurate LVM page at http://srobb.net/lvm.html

  3. #3
    Join Date
    Jun 2004
    Posts
    127
    Linux (Fedora) Firefox 62.0

    Re: Fedora Server LVM question

    Thanks but unfortunately, given the instructions on your page, I still haven't been able to resize the volume.

    Since Fedora Server defaults to xfs, I have to, as stated on your page, use xfs_growfs. The problem is that xfs_growfs claims:
    Code:
    xfs_growfs: /dev/fedora_mars/root is not a mounted XFS filesystem
    which doesn't really make sense given mount's output
    Code:
    /dev/mapper/fedora_mars-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
    I think I'm coming around to your apparent view and am going to toss LVM as this shouldn't be so difficult to achieve.

  4. #4
    Join Date
    Feb 2015
    Location
    Colorado
    Posts
    24
    Linux Firefox 62.0

    Re: Fedora Server LVM question

    First off, I am going to assume this is a personal server on your home LAN.

    IMHO the best way to set up a server is to install the Operating System on a small SSD (about 60 GB or 128 GB) and then use the 1 terabyte drive as your DATA drive.
    Then your OS is on a drive by itself, and your data on a different physical drive.

    Assuming this is a personal server on your home LAN, I would recommend NOT using LVM on your OS SSD, just four standard partitions. LVM is just another layer of software between bios and your filesystem, and just another thing to go wrong. Over the years, I have found that when it comes to servers, KISS Keep It Simple.

    Then you make a mount point on / (root) partition, and use /etc/fstab to mount your data drive at boot up.
    Here is a guide I wrote explaining how to do this.
    Install_Fedora_Server.odt
    For a LibreOffice file. Or
    Install_Fedora_Server.pdf
    For a PDF file
    I try to think, but nothin' happens!

  5. #5
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    8
    Linux Chrome 68.0.3440.106

    Re: Fedora Server LVM question

    You have to use the mountpoint as option
    Code:
    xfs_grofs /
    and not the device-name.

  6. #6
    Join Date
    Jun 2004
    Posts
    127
    Linux (Fedora) Firefox 62.0

    Re: Fedora Server LVM question

    Yes, that did it.

    My not paying close enough attention to the man page and too many examples on the web of people using, as I did, the device name and too few saying use the mount point.

    Thank you very much!

  7. #7
    Join Date
    Aug 2007
    Posts
    308
    Linux Firefox 52.0

    Re: Fedora Server LVM question

    I know next to nothing about LVM so my question is how do I get access to the "missing" ~915GB of space?
    There is absolutely no disk space "missing". It just hasn't been allocated yet. This is similar to a HDD with hundreds of GB of un-partitoned space that can be used whenever desired. To view how much space you have

    sudo vgdisplay fedora-mars

    Code:
      VG Size               <2.73 TiB                                                                                                                           
      PE Size               32.00 MiB                                                                                                                           
      Total PE              89424                                                                                                                               
      Alloc PE / Size       47834 / <1.46 TiB                                                                                                                   
      Free  PE / Size       41590 / <1.27 TiB
    The free space will be near the bottom. As shown I have 1.27TiB in my raid 1 that I haven't allocated yet.

    You don't need a larger root partition currently as you are only using 11% of your current root
    /dev/mapper/fedora_mars-root 15G 1.7G 14G 11% /

    After installing Fedora Server on a 1TB drive, for some reason only 15GB is allocated to the root file system as can be seen from "df -h".
    This is because for servers with no GUI you don't need more than 15GB for an initial root partition. All data is placed on separate data partitions. Professional sysadmins do it that way. The root partition is only for system software and perhaps logs. It is better to keep system software and data separate.

    If you plan on using this machine as a file or web server then you can create up to 985 GB of data partitions. For example to create a 500 GB data partition for a file server the commands would be similar to
    Code:
    sudo lvcreate -L 500G -n lv_files fedora_mars
    sudo mkfs.xfs /dev/fedora_mars/lv_files

  8. #8
    Join Date
    Jun 2004
    Posts
    127
    Linux (Fedora) Firefox 62.0

    Re: Fedora Server LVM question

    Quote Originally Posted by amiga
    There is absolutely no disk space "missing". It just hasn't been allocated yet.
    I know that which is why I put quotes around the word missing. I just didn't know how to allocate it because of my unfamiliarity with LVM.

    Most Fedora spins allocate all the space when installing so I've never had to worry about it before. Server only allocates 15G presumably leaving the rest to be allocated as the sysadmin sees fit.

  9. #9
    Join Date
    Aug 2007
    Posts
    308
    Linux Firefox 52.0

    Re: Fedora Server LVM question

    Most Fedora spins allocate all the space when installing so I've never had to worry about it before. Server only allocates 15G presumably leaving the rest to be allocated as the sysadmin sees fit.
    This is because it is assumed that sysadmins who would be using server versions know what they are doing. For home users using desktop versions this isn't the case.

    It is much easier to create new data partitions and keep OS and data separate than to try to re-size a root partition that currently doesn't need to be bigger.

  10. #10
    Join Date
    Aug 2007
    Posts
    308
    Linux Firefox 52.0

    Re: Fedora Server LVM question

    Assuming this is a personal server on your home LAN, I would recommend NOT using LVM on your OS SSD, just four standard partitions.
    Even if you don't use LVM there is no reason to be using ancient MBR partitioning in 2018 with Linux. I am assuming "four standard partitions" refers to MBR. With GPT you have up to 128 all standard. BIOS/GPT works quite well.

    LVM is just another layer of software between bios and your filesystem, and just another thing to go wrong.
    You don't seem to understand how legacy BIOS works. It can't tell the difference between LVM and regular partitions. It just loads the second stage into memory with LBA instructions. Plus once the kernel and initrd are loaded by grub the firmware is irrelevant.

    Over the years, I have found that when it comes to servers, KISS Keep It Simple.
    Actually the second S stands for Stupid which competent sysadmins are not. They wouldn't be afraid of LVM.

  11. #11
    Join Date
    Jan 2010
    Posts
    7,363
    Linux Chrome 69.0.3497.100

    Re: Fedora Server LVM question

    Keeping it simple is always good. When I was at a CentOS based shop, especially as we were doing a lot of stuff with EMC storage (hrrm, was it there that we used LVM all the time? It's already been 5 years and I don't remember, but sounds right) using LVM WAS the simple way, because it was easy to add LUNs.

    Fedora server seems to be making changes, such as adding the mod or whatever they're called repos, but I'll probably have passed away by the time it gets into RH and CentOS.

    This isn't arguing with either viewpoint. Simple is what you know (as is intuitive for practical usage) If you work with LVM a lot, it's simple, if not, normal partitions are simple. I've been at a mostly FreeBSD shop for the last several years, so nowadays, LVM would be more complex for me.

  12. #12
    Join Date
    Feb 2015
    Location
    Colorado
    Posts
    24
    Linux Firefox 62.0

    Re: Fedora Server LVM question

    Quote Originally Posted by amiga
    Even if you don't use LVM there is no reason to be using ancient MBR partitioning in 2018 with Linux. I am assuming "four standard partitions" refers to MBR. With GPT you have up to 128 all standard. BIOS/GPT works quite well.
    Who said anything about MBR partitioning? The four standard partitions I was referring to are /boot /(root) /home and swap. Those 4 partitions can be created
    under MBR or GPT.

    Quote Originally Posted by amiga
    Actually the second S stands for Stupid which competent sysadmins are not. They wouldn't be afraid of LVM.
    Who said anything about competent sysadmins? I stated right off the bat I was talking about simple personal home servers on a LAN. Plus I referred to it as Keep It Simple and didn't even refer to the second S. I guess next time I will have to use KIS. Seesh Louise.
    I try to think, but nothin' happens!

Similar Threads

  1. Replies: 4
    Last Post: 18th January 2016, 09:47 PM
  2. Fedora 22 TFTP server question
    By shea1roh in forum Servers & Networking
    Replies: 0
    Last Post: 18th June 2015, 08:56 PM
  3. Question about Fedora 14 DNS server!
    By MickyNQN in forum Servers & Networking
    Replies: 10
    Last Post: 9th May 2011, 07:24 AM
  4. fedora directory server initial question
    By xlancealotx in forum Servers & Networking
    Replies: 0
    Last Post: 21st September 2007, 04:12 PM
  5. noob question about set up Fedora server on different pcs
    By micxuy in forum Servers & Networking
    Replies: 12
    Last Post: 3rd December 2006, 10:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •