pkgin: /usr/pkg does not have enough space for installation (276M required only 274M available) - bsd

I try to install gnome-2.26.2nb5 on NetBSD-7.0 but I receive the following message:
computer#pkgin install gnome-2.26.2nb5
pkgin: /usr/pkg does not have enough space for installation (276M required only 274M available)
It's a fresh install of NetBSD-7.0 and I have installed it on a partition with size of around 23GB.
I wonder what is the best way to increase the size of /usr/pkg on NetBSD.
Output of df -lh is like:
Script started on Tue Mar 1 05:02:04 2016
dhcppc9# df -lh
Filesystem Size Used Avail %Cap Mounted on
/dev/wd0a 21G 20G 274M 98% /
kernfs 1.0K 1.0K 0B 100% /kern
ptyfs 1.0K 1.0K 0B 100% /dev/pts
procfs 4.0K 4.0K 0B 100% /proc
tmpfs 384M 0B 384M 0% /var/shm
/dev/sd0e 30G 1.5G 29G 4% /mnt
dhcppc9# exit
Script done on Tue Mar 1 05:02:16 2016
Also du -sh /usr/pkgsrc shows that 15GB is consumed by /usr/pkgsrc. I installed NetBSD-7.0 recently and at first I tried to compile/build gnome desktop environment, but ran into an error after hours of compiling due to a bug in xulrunner192. Therefore, I decided to install gnome desktop binaries with pkgin install but the size of file system is not enough. I think possibly compiling gnome which is a huge meta package is taking too much space on file system. I'm not sure.

Depending on your existing partition layout it might be simplest to merge /usr/pkg into /usr or to exchange its usage with another partition.
Another option might be to split another larger partition to allow for a bigger /usr/pkg, or even to reinstall (if you do not have much data on the system yet).
What does a df -lh report?

Related

Time Machine Style Backup from Mac to Windows

Using the excellent https://github.com/laurent22/rsync-time-backup I backup a Mac to a drive in Windows. To achieve this, I FUSE mount the Windows drive to the Mac
I see rsync-time-backup
correctly finds the previous backup folder (backup/day-x) so that it can hard link when it creates a new backup folder (backup/day-y)
correctly transfers only the changed files (Total file size: 4.1G bytes vs Total transferred file size: 100M bytes)
But here are the odd things I found:
when I run WinDirStat to find the total size of the entire backup directory "backup/", I expected 4.1G
4G (for day-x) and
100M (for day-y).
Instead, I found 8.1G
4G (for day-x) and
4.1G (for day-y).
when I run ls -lHi, on the Mac Terminal, I don't see the link count greater than 1
So, why is it that even though only a fraction of the files are transferred, the size of the Windows drive is huge?

Why is fdisk -l showing different results for the same vdi virtual drive when different virtual machines are used in VirtualBox

VirtualBox (Version 5.2.24 r128163 (Qt5.6.2)) user with xubuntu guest (Ubuntu 18.04.2 LTS) and Windows 10 host here.
I recently tried to resize my vdi from ~100GB to 200GB. In windows I used the command:
./VBoxManage modifyhd "D:\xub2\xub2.vdi" --resize 200000
That went fine. Then I used a gparted live cd to create a vm, attached the vdi and resize the partitions:
gparted gui
All looks good. If I then use the 'fdisk -l' command whilst in the gparted vm the increased partition sizes are visible as expected.
fdisk -l results for vdi attached to gparted vm
If I try and resize the file system for one of the newly resized logical drives with 'resize2fs /dev/sda5' I am told it is already 46265856 blocks long and there is nothing to do.
However....
If I then re-attach this vdi to an ubuntu vm and boot up with the vdi, the 'fdisk -l' command gives different results and is basically telling me that the drive is still 100GB in size.
fdisk -l results for the same vdi attached to ubuntu vm
The 'df' command confirms that it is not resized.
df command output with same vdi attached to ubuntu vm
If I try the command 'resize2fs /dev/sda5' I get the result:
The filesystem is already 22003712 (4k) blocks long. Nothing to do!
How can I fix this and make the ubuntu vm see that the disk and partitions have been increase in size?
Ok. I will answer my own question (thank you for the negative vote anonymous internet).
This issue occurs when you have existing snapshots of the drive that you are trying to expand associated with a VirtualBox VM.
I found this described in VirtualBox's documentation.
https://forums.virtualbox.org/viewtopic.php?f=35&t=50661
One suggested solution is to delete the snapshots, however I got an error message when I attempted that.
The solution that worked for me was to clone my VM. The cloned VM (which did not have any snapshots associated with it), behaved as expected and showed the correct size for the resized disk.
To be clear: the situation I described above is 100% true.
Hope that helps someone.

rabbitmq server disk space alert

I have been receiving alerts regarding the disk space utilization and would like to increase disk space but not sure where the increased usage occurs. The following alert appears:
'Rabbit-Disk-Alert' threshold
Description: Average Disk utilization during the past 15 minutes exceeds
75%
Now when I log on the server and run
df -h
It shows the drive that is getting full but I do not know how to find the directory or files that are causing this issue. Is there a way to diagnose this or determine the root of the alert?
Use the du command to find the directory taking up space:
cd /var
du -hs *
More than likely a sub-directory of /var is the culprit. The above command will show you which sub-directory (or directories) takes up the most space, and you can change to those directories, re-run du -hs *, and continue "downward".

poclbm not reporting hashes to deepbit or slush

I run poclbm on my system but for some reason both deepbit and slush don't "see" the work being performed. My system reports about 200 megabashes per second being done. I tried mining with my cpu using the same settings, and then both deepbit and slush recognized that work was being performed.
These are the errors I am getting out of the respective mining hardware (every minute or so):
poclbm error: pit.deepbit.net:8332 22/02/2013 21:50:59, Verification failed, check hardware! (0:0:Cypress, d47b7ba0)
cgminer error: [2013-02-22 22:18:51] GPU0: invalid nonce - HW error
I am using Ubuntu 12.10 (Quantal Quetzal) with the 12.10 version poclbm with an ATI 5800 series video card. The video drivers are installed and work as far as I can tell. When I run a "aticonfig --odgc --adapter=all", the gpu does seem to be utilized with poclbm (around 70% utilization or so).
I found the solution through an irc channel (Freenode on channcel #cgminer). Basically, at least on the version of Ubuntu that I have (12.10), the 2.8 version of the SDK does NOT work properly with cgminer or poclbm. I was instructed to download the 2.4 version of the SDK. Here:
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.4-lnx32.tgz
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.4-lnx64.tgz
Some distributions require the "2.7" version so I'll put the links here:
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.7-lnx32.tgz
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.7-lnx64.tgz
I compiled it. There is no "make install" for this Makefile, apparently, so you have to manually copy the files to your lib directory:
for 32 bit: $ cp -pv lib/x86/* /usr/lib/
for 64 bit: $ cp -pv lib/x86_64/* /usr/lib/
Also copy the include files: $ rsync -avl include/CL/ /usr/include/CL/
With the libraries installed in the appropriate directories, I recompiled cgminer and then it worked. I also tried it with poclbm and it worked with that too.
Hm, I experienced the same error with pclbm and cgminer. Then I found https://bitcointalk.org/index.php?topic=139406.msg1502120#msg1502120 .. I tried phoenix and all is ok now. Hope it helps. Sry my bad english.

VirtualBox: extend partition

I have virtualbox-4.1.0 with centos-5.6 installed in. Now I would like to extend the VM image, which I previously allocated for virtual machine installation, it was 8Gb, that's not enough now. Is there a way to extend the partition without loosing information?
Actually in centos I have one root fs with my home dir etc. so this partition eventually would need to be resized.
Thanks in advance for suggestions!
It can be done in 4 steps :
Clone your VMDK to VDI format with VBoxManage Tool.
Resize the disk to create free space with VBoxManage Tool.
Modify the filesystem to allocate free space for your drive with GParted.
Add created disk space to Linux FileSystem.
The detailed steps are below (tested with "Virtual Machine CentOS 6.4" and "VirtualBox 4.2.18");
Observe disk format of the virtualbox file, if it is not *.vdi, convert disk format from *.wmdk to *.vdi. Open windows terminal:
$ VBoxManage clonehd --format VDI "path_of_wmdk_file" "path_of_vdi_file"
Resize disk size of vdi file. Open windows terminal. For example to do disk size ~500 GB => 512000;
$ VBoxManage modifymedium "path_of_vdi_file" --resize 512000
Choose *.vdi file instead of *.wmdk file as disk
Virtual Machine -> Settings -> Storage -> Controller : SATA (Right Click on *.wmdk file) -> Remove Attachment -> Add HardDisk and choose newly created *.vdi file
Download "gparted-live-x.xx.x-x-ixxx.iso" file from http://gparted.sourceforge.net/download.php. Mount this iso file as CD.
Virtual Machine -> Settings -> Storage -> Controller IDE (Right Click) -> Add CD/DVD -> Select gparted-live-x.xx.x-x-ixxx.iso file
Run virtual machine, Virtual Machine will boot from this CD. Choose default values with pressing "Enter", "Enter" ... until Gpart ISO GUI starts. Select tool gpart program and start.
Extend disk size as below;
Right click on partitions and if "possible" click on "Disable Active Partion".
Extend Partition as much as possible from GUI (for this case 500GB).
Right click the partition which is disabled and select "Enable Active Partion".
Apply and wait until the operations finished.
Shut down virtual machine.
Unmount gparted-live-x.xx.x-x-ixxx.iso.
Virtual Machine -> Settings -> Storage-> Controller IDE (Right Click on gparted-live-x.xx.x-x-ixxx.iso) -> Remove Attachement
Start the virtual machine.
Open linux terminal and login as root. Run commands below;
lvm vgdisplay
=> Free PE / Size 122880 / 480.00 GiB
lvm lvdisplay /dev/VolGroup/lv_root
=> Current LE 3978
Calculate the sum of the values above. In this case : 122880 + 3978 = 126858 <- will be used in the next command
lvm lvresize -l 126858 /dev/VolGroup/lv_root
resize2fs /dev/VolGroup/lv_root
lsblk
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
sda 8:0 0 500G 0 disk
+¦sda1 8:1 0 500M 0 part /boot
L¦sda2 8:2 0 499.5G 0 part
+¦VolGroup-lv_root (dm-0) 253:0 0 480G 0 lvm /
L¦VolGroup-lv_swap (dm-1) 253:1 0 4G 0 lvm [SWAP]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Check whether the filesystem extended or not with creating a huge file:
fallocate -l 480G /test_file
Remove the test file of course:
rm -rif /test_file
I'm using a CentOS7 virtualbox, and I finally enlarged my partition /dev/mapper/centos-root - gparted doesn't work for me because I do not have a desktop on CentOS7 virtualbox.
Power off your CentOS virtual machine
Go into the directory of your *.vdi image. If you don't know where it is, look at your Virtualbox Manager GUI virtualbox -> settings -> storage -> *.vdi -> location e.g. mine is located under ~/VirtualBox VMs/CentOS7/CentOS.vdi
Back up your image just in case anything goes wrong
$ cp CentOS7.vdi CentOS7.backup.vdi
Resize your virtual storage size, e.g. 200 GB
$ VBoxManage modifyhd CentOS7.vdi --resize 204800
Power on your CentOS virtual machine, issue
$ sudo fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 209715199 104344576 8e Linux LVM
Use fdisk utility to delete/create partitions
$ sudo fdisk /dev/sda
You are in the fdisk utility interactive mode, issue following commands: (mostly just follow the default recommendation)
d - delete a partition
2 - select a partition to delete (/dev/sda2 here)
n - create a new partition
p - make it a primary partition
2 - make it on the same partition number as we deleted
<return> - set the starting block (by default)
<return> - set end ending block (by default)
w - write the partition and leave the fdisk interactive mode
Reboot your CentOS machine
$ sudo reboot
Resize the physical volume and verify the new size
$ sudo pvresize /dev/sda2
$ sudo pvscan
Take a look at your logical mapping volume to see what volume you want to enlarge, in my case, /dev/mapper/centos-root
Resize the file system by adding -r option, it will take care of resizing for you
$lvextend -r -l +100%FREE /dev/mapper/centos-root
Resize the file system:
$resize2fs /dev/mapper/fedora-root
For CentOS 7: $xfs_growfs /dev/mapper/fedora-root
Last check:
$df -h.
Reference:https://blog.jyore.com/2013/06/virtualbox-increase-size-of-rhelfedoracentosscientificos-guest-file-system/#comment-2879
I found this nugget at the link following. I worked perfect for me and only took 5 seconds.
As of VirtualBox 4 they added support for expansion.
VBoxManage modifyhd filename.vdi --resize 46080
That will resize a virtual disk image to 45GB.
https://superuser.com/questions/172651/increasing-disk-space-on-virtualbox
It can be done with 3 steps :
cloning your VMDK to VDI format using VBoxManage
resize the disk to create free space using VBoxManage
modify the filesystem to allocate free space to your drive, using GParted
Don't forget the last part, otherwise, you will have unallocated free space and your disk will still appear as full.
I wrote a tutorial here to resize your VM Disk
At some point the VBoxManage utility changed the syntax a little bit. It's worth noting that this doesn't work on all vm types so beware if you have a *.vmdk. An example command to change your HD to 40GB is:
$ VBoxManage modifyhd MyVirtualImage --resize 40960
For reference I am on VirtualBox 4.2.1, Mac 10.8.2
From the VirtualBox FAQ:
You have to clone the data from the VDI you already have to a new, larger VDI and expand the partition(s). You can use tools like CloneZilla to clone the virtual hard drive to the bigger one and Gparted to increase the partition size. Another method is to use CloneVDI by mpack and clone the VDI with a larger size, then resize the partition(s) with Gparted.
Since 4.0.0, you can use VBoxManage modifyhd --resize to resize the max size of the VDI. You can only make it bigger. After that, use Gparted to increase the partition size inside the VDI.
Alternatively you could attach another VDI and mount your /home there.
Search for CloneVDI tool on the Oracle VirtualBox forums. It worked for me and is a much easier GUI based program for anyone nervous at the command line. Also allows conversion from fixed to dynamic mode which VBoxManage.exe doesn't support (yet).
https://forums.virtualbox.org/viewtopic.php?f=6&t=22422
I spent a long time googling and finally got it working for me. ( before I found this ) And I wanted a place to save my work
use vboxmanage to add space to the disk image
use gparted to resize so all space is used
use blivet-gui to create a new volume :
Below is commands I copied from terminal in fedora :
dnf install blivet-gui
blivet-gui
lvremove /dev/mapper/fedora00-00
lvextend -l +100%FREE /dev/mapper/fedora00-root