Page 1 of 1

grow /usr/local for software install

Posted: 08 Oct 2018 14:34
by birnbacs
I recently migrated of of my servers from NAS4free 9.x to XigmaNAS The server is required to run jails and I was planning on using iocage for administration.

Installing iocage requires python, which installation fails because of insufficient disk space in /usr/local.

Here is my mass memory layout:

Code: Select all

Filesystem        Size    Used   Avail Capacity  Mounted on
/dev/md0          126M     97M     29M    77%    /
devfs             1.0k    1.0k      0B   100%    /dev
/dev/md1          754M    655M     99M    87%    /usr/local
procfs            4.1k    4.1k      0B   100%    /proc
moonpool          1.2T     26G    1.2T     2%    /mnt/moonpool
moonpool/data     1.3T     32k    1.3T     0%    /mnt/moonpool/data
moonpool/files    1.6T    431G    1.2T    27%    /mnt/moonpool/files
moonpool/jail     1.2T     15G    1.2T     1%    /mnt/moonpool/jail
/dev/md2          520M     86M    423M    17%    /var
tmpfs             268M     49k    268M     0%    /var/tmp
/dev/da0p2        999M    268M    731M    27%    /cf
I am hesitatant to touch anything because the file server is business critical.
I have disks ada0 and ada1, which are mirrored for a zpool. Booting is done from a 16 GB USB stick with these partitions:

Code: Select all

[devel@blackbox ~]$ gpart list
Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 30515159
first: 40
entries: 152
scheme: GPT
1. Name: da0p1
   Mediasize: 524288 (512K)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 20480
   Mode: r0w0e0
   efimedia: HD(1,GPT,288f846d-c7ff-11e8-b8c9-c04a00040632,0x28,0x400)
   rawuuid: 288f846d-c7ff-11e8-b8c9-c04a00040632
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: gptboot
   length: 524288
   offset: 20480
   type: freebsd-boot
   index: 1
   end: 1063
   start: 40
2. Name: da0p2
   Mediasize: 1073741824 (1.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 4194304
   Mode: r1w0e0
   efimedia: HD(2,GPT,28bfdcb0-c7ff-11e8-b8c9-c04a00040632,0x2000,0x200000)
   rawuuid: 28bfdcb0-c7ff-11e8-b8c9-c04a00040632
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: gptroot
   length: 1073741824
   offset: 4194304
   type: freebsd-ufs
   index: 2
   end: 2105343
   start: 8192
3. Name: da0p3
   Mediasize: 8589934592 (8.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1077936128
   Mode: r1w1e0
   efimedia: HD(3,GPT,28d06f54-c7ff-11e8-b8c9-c04a00040632,0x202000,0x1000000)
   rawuuid: 28d06f54-c7ff-11e8-b8c9-c04a00040632
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: gptswap
   length: 8589934592
   offset: 1077936128
   type: freebsd-swap
   index: 3
   end: 18882559
   start: 2105344
4. Name: da0p4
   Mediasize: 5951717376 (5.5G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1077936128
   Mode: r0w0e0
   efimedia: HD(4,GPT,28e0dabe-c7ff-11e8-b8c9-c04a00040632,0x1202000,0xb16000)
   rawuuid: 28e0dabe-c7ff-11e8-b8c9-c04a00040632
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 5951717376
   offset: 9667870720
   type: freebsd-ufs
   index: 4
   end: 30507007
   start: 18882560
1. Name: da0
   Mediasize: 15623782400 (15G)
   Sectorsize: 512
   Mode: r2w1e1
Could anybody please tell me how to grow /dev/md1 in the given constellation?

Besides: is this a good idea? I am not planning on installing much software in the master system anyway.

Re: grow /usr/local for software install

Posted: 08 Oct 2018 14:58
by ms49434
You are running an embedded installation of XigmaNAS - /usr/local is on a memory device (md). A software installation will not survive a reboot.
You should consider to switch to a full install if you want to add additional ports.

Fyi, Python is already available in XigmaNAS:

Code: Select all

xigmanas: /etc# python2.7 
Python 2.7.15 (default, Sep 29 2018, 17:44:00) 
[GCC 4.2.1 Compatible FreeBSD Clang 6.0.0 (tags/RELEASE_600/final 326565)] on freebsd11
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
xigmanas: /etc# 

Re: grow /usr/local for software install

Posted: 11 Oct 2018 10:16
by lux
or using Jails!


you could intstall with OneButtonInstaller (OBI) -> viewtopic.php?f=71&t=11189

I'm using Jails for my Emby Server Install & for "certbot" (Lets Encrypt)


Re: grow /usr/local for software install

Posted: 11 Oct 2018 12:33
by Shperrung
lux wrote:
11 Oct 2018 10:16
or using Jails!
I'm using Jails for my Emby Server Install & for "certbot" (Lets Encrypt)

Hi lux!
Can you share how did you installed "certbot" in jail and how to forward certificate to lighttpd?

Re: grow /usr/local for software install

Posted: 16 Oct 2018 11:21
by lux
Hi Shperrung

there's nothing special to say...

add a new Jail "Full" & install "certbot" inside

Code: Select all

pkg install certbot
BUT i don't use lighttpd from outside my LAN & inside only for tftp and such things!

i need certbot to generate Certificates for my Webspace hosted by hosteurope, had to call certbot with the "--manual" plugin & need to put a DNS TXT Record to get it working...