Quote:
Originally Posted by postcd
Hello,
my server provider installed Debian 9 stretch 64bit and this is the disk space layout after installation:
https://pastebin.com/E0DHUhrG
The tmpfs and udev filesystems seems not to be using any disk space according to that figures. But they have big quotas?
|
tmpfs and udev filesystems reside strictly in RAM (they can be offloaded into the swap space if necessary, just like anything else in RAM). The default for tmpfs is to place a size limit equal to half of physical RAM, but /run doesn't use the default (it uses a limit much lower than that).
So, I see your server has 64GB of RAM, seeing as the tmpfs file systems which use the default size setting (i.e. not specified in mount output) are 32GB in size.
The size of swap here has been chosen to equal physical RAM, which is good if you want to use the hibernation feature. Hibernation writes the contents of RAM into swap before powering down. Then, on the next boot it will restore those contents into RAM to continue where it left off. Personally, I have never used hibernation. It might be useful if you're running some sort of software which is impossible to cleanly shut down (bad design!!!) and you've got a UPS that you know is about to run out of battery.
Personally, I prefer to use a swap file rather than a swap partition, even if that means no hibernation feature. A swap file is much more convenient for me, since it's easier to add/remove them, and immediately flexibly utilize the space available/saved.
Quote:
Code:
/dev/sda1 * 2048 1031962623 1031960576 492.1G 83 Linux
/dev/sda2 1031964670 1166012415 134047746 63.9G 5 Extended
/dev/sda5 1031964672 1166012415 134047744 63.9G 82 Linux swap / Solaris
I would like to have one big LVM volume, around 80% of the disk space and i am expecting i will be tight on disk space on this volume.
In the future will it anyhow limit me to have udev tmpfs so high quota when my main/largest LVM volume will need more disk space in future?
|
Neither udev nor tmpfs use physical disk space, so they don't care about LVM or file system partitions or anything like that.
Furthermore, there is no compelling reason to change the size limits on them. They only consume as much RAM as is required to fit their current contents, plus a puny overhead. The default size limits are already overkill for what they will use in practice, so just let it be.
Quote:
Would be wise to convert everything to LVM so i can resize them easily in future? Here is mentioned that it may not be good idea to convert root partition into LVM.
|
Right now, there's just one file system partition - the root partition. It is indeed a bad idea to try and resize or convert the root partition while it is the root partition. If you want to change it around, you'll have to do while booted up to a different partition or a LiveCD or an install disc or something (like my RAMBOOT technique). Also, unless you really know what you're doing you'll probably need to reinstall the OS because you won't know the ins and outs of how to reflect the changes in the OS set up and boot loader.
Quote:
I see i can use "fdisk /dev/sda" to change /dev/sda1 type from Linux to Linux LVM.
But when reading this page, i am unsure if this LVM change in fdisk is all what i need to do, if i do not need to install some LVM software. apt-get install lvm2 says:
The following NEW packages will be installed:
dmeventd libdevmapper-event1.02.1 liblvm2app2.2 liblvm2cmd2.02 libreadline5 lvm2
Also there is LVM2. What is a difference between Linux LVM type created by fdisk and lvm2 installed by "apt-get install lvm2" ? Thank You for advises what is needed to convert my setup to LVM.
|
Converting your setup to LVM would be a very complex process. Since this is a fresh system, the best way to do it would be to completely reinstall from scratch, using the Debian 9 install disc. Even then, the way the Debian installer handles LVM is not the most intuitive thing. Basically, you'll want to:
1) Boot into the install disc ... when it gets to the partitioning set up...
2) Choose manual partitioning
3) Remove the existing partitions
4) Create an LVM volume for the entire disc (assuming you don't want a separate /boot partition)
5) Go to the LVM submenu (this is the part that's not intuitive! You have to go to a submenu to actually make partitions in the LVM volume)
6) Create partitions within the LVM volume as desired ... I don't really know what you want, but one big OS partition is an option.
The benefits of this, though? Minimal or nonexistent. LVM makes sense if you want to have lots of different partitions and/or lots of different drives and you want the flexibility to use LVM tools to combine/resize/etc those partitions. But it's never a good idea to muck around with your OS partition while you're booted up to it, so you can't really do much with LVM when you've only got one partition anyway.
Unless you have a specific reason to use LVM, I'd say don't bother.