Expanding disks on Ubuntu on XenServer for Plex
-
I have a Plex box running on XenServer. (managed by XO mostly) Initially, it was a test box, and then turned into my home "production" media center. I made the disk way to small, and have had issues starting Plex, and then even updating Ubuntu. Turns out, my disk is full. FacePalm. I'm looking for the best method to fix the problem. Is it best to shutdown the VM, increase the size of the disk through XO, and then extend the disk in the VM? If so, could someone explain the best method to do this? Extending disks in Ubuntu is not something that I can say I have a lot of experience with. I can't ever remember myself running out of space before on a Linux box.
@plex:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 2.0G 0 2.0G 0% /dev tmpfs 395M 31M 364M 8% /run /dev/mapper/plex--vg-root 5.2G 5.1G 0 100% / tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup /dev/xvdb 1.5T 133G 1.3T 10% /PlexMedia /dev/xvda1 472M 403M 46M 90% /boot tmpfs 395M 0 395M 0% /run/user/1000
-
At that size, why not create a new Plex system, your partition is tiny as is right now.
So create a new one, give the root partition space for updates, and add a second VHD for your media.
Configure flex to use the second disk.
-
@DustinB3403 I suppose I could just do that and just restore plex information from backup.
However, I would like to figure out the best way to do this in case I run into this situation again (Out of disk space)
-
I use 12GB as a minimum for Linux, 20GB as an average. I also thin provision, so unused space is not wasted.
-
@fuznutz04 said in Expanding disks on Ubuntu on XenServer for Plex:
@DustinB3403 I suppose I could just do that and just restore plex information from backup.
However, I would like to figure out the best way to do this in case I run into this situation again (Out of disk space)
does this help: http://askubuntu.com/questions/390769/how-do-i-resize-partitions-using-command-line-without-using-a-gui-on-a-server
-
If your root filesystem is ext4:
Add another VHD to your vm - (we will assume it will be /dev/xvdc and 10G in size)
pvcreate /dev/xvdc vgextend plex--vg /dev/xvdc vgs #check your new vg size - Optional lvextend -L+10G /dev/mapper/plex--vg-root lvs #check your new lv size -Optional resize2fs /dev/mapper/plex--vg-root
Done
Edit: Don't really know if you can resize your filesystem being 100% full. I have never expanded root in this condition.
-
@scottalanmiller said in Expanding disks on Ubuntu on XenServer for Plex:
I use 12GB as a minimum for Linux, 20GB as an average. I also thin provision, so unused space is not wasted.
Hope you don't have disks over 2TB if you are using XS!
-
Tried that, thank you, but kept running into errors. I dont think it liked that the partition ws 100% used.
-
@Romo Bingo! That did the trick. Thanks!
-
@fuznutz04 said in Expanding disks on Ubuntu on XenServer for Plex:
@Romo Bingo! That did the trick. Thanks!
Great, glad it solved your issue.