{"id":2227,"date":"2021-08-22T01:49:25","date_gmt":"2021-08-22T08:49:25","guid":{"rendered":"https:\/\/dhoytt.com\/mainblog\/?p=2227"},"modified":"2021-12-19T22:17:32","modified_gmt":"2021-12-20T06:17:32","slug":"increased-drive-size-zoneminder-cctv-and-plex-physical-server-with-clonezilla","status":"publish","type":"post","link":"https:\/\/dhoytt.com\/mainblog\/2021\/08\/increased-drive-size-zoneminder-cctv-and-plex-physical-server-with-clonezilla\/","title":{"rendered":"Increased Drive Size Zoneminder CCTV and Plex Physical Server with Clonezilla"},"content":{"rendered":"\n<p>I bought a new larger hard drive locally and finally got a chance to increase the root size of my bl460 g7 blade server that serves as my CCTV Zoneminder system and Plex movie streaming system. The Plex database gets large due to the amount of media I have for Plex. The files are accessed via network, but the database stays local. I started running out of space on \u201c\/\u201d because I didn\u2019t feel the need to split off \/var and I should have.<\/p>\n\n\n\n<p>Anyhow I went from 146GB 15K SAS drive to a 15K 300GB SAS drive. I like to keep my boot drives fast as possible.<\/p>\n\n\n\n<p>What I did was downloaded the latest ISO version of Clonezilla along with the latest version of Balenaetcher, which I used to burn Clonezilla to a USB making it bootable.<\/p>\n\n\n\n<p>Once I booted into Clonezilla from the USB I created with Balenaetcher I used Clonezilla to create an image of my boot dive with \u201c\/\u201d on to my NAS drive via NFS.&nbsp; I then switched out my 146GB drive and put in my 300GB drive and restored the image to that drive. I then increased the partitions and voila I have a ton more space and could expand more if I needed.<\/p>\n\n\n\n<p>Here\u2019s the basic steps bulletized:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Created Clonezilla bootable USB using Balenaetcher from my Fedora Workstation<\/li><li>Booted off Clonezilla USB and copied boot image to FreeNAS via NFS<\/li><li>Shutdown system and took 146GB boot drive out and put in 300gb drive as replacement<\/li><li>During boot went into RAID utility and deleted 146GB virtual drive.<\/li><li>Still in RAID utility created new virtual 300gb drive to encompass full size of 300gb drive RAID0.<\/li><li>Booted back into Clonezilla Live USB and restored disk image from NAS via NFS.<\/li><li>Rebooted off the new drive into the OS successfully and verified everything was working<\/li><li>Deleted and extend the partition for \u201c\/\u201d in fdisk.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># fdisk \/dev\/sda\r\nCommand (m for help): p\r\nDisk \/dev\/sda: 279.4 GiB, 299966445568 bytes, 585871964 sectors\r\nUnits: sectors of 1 * 512 = 512 bytes\r\nSector size (logical\/physical): 512 bytes \/ 512 bytes\r\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\r\nDisklabel type: dos\r\nDisk identifier: 0x750d2bfe\r\n\r\nDevice     Boot   Start       End   Sectors   Size Id Type\r\n\/dev\/sda1  *       2048   2099199   2097152     1G 83 Linux\r\n\/dev\/sda2       2099200 286676991 284577792 135.7G 8e Linux LVM\r\n\r\nCommand (m for help): d\r\nPartition number (1,2, default 2):\r\n\r\nPartition 2 has been deleted.\r\n\r\nCommand (m for help): n\r\nPartition type\r\n   p   primary (1 primary, 0 extended, 3 free)\r\n   e   extended (container for logical partitions)\r\nSelect (default p):\r\n\r\nUsing default response p.\r\nPartition number (2-4, default 2):\r\nFirst sector (2099200-585871963, default 2099200):\r\nLast sector, +sectors or +size{K,M,G,T,P} (2099200-585871963, default 585871963):\r\n\r\nCreated a new partition 2 of type 'Linux' and of size 278.4 GiB.\r\nPartition #2 contains a LVM2_member signature.\r\n\r\nDo you want to remove the signature? &#91;Y]es\/&#91;N]o: N\r\n\r\nCommand (m for help): w\r\n<\/code><\/pre>\n\n\n\n<p>Rebooted since the partition was busy.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># shutdown -r 0\r<\/code><\/pre>\n\n\n\n<p>After reboot I still don&#8217;t have enough physical extents to expand the logical volume.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> --- Volume group ---\r\n  VG Name               cl\r\n  System ID\r\n  Format                lvm2\r\n  Metadata Areas        1\r\n  Metadata Sequence No  5\r\n  VG Access             read\/write\r\n  VG Status             resizable\r\n  MAX LV                0\r\n  Cur LV                3\r\n  Open LV               3\r\n  Max PV                0\r\n  Cur PV                1\r\n  Act PV                1\r\n  VG Size               &lt;135.70 GiB\r\n  PE Size               4.00 MiB\r\n  Total PE              34738\r\n  Alloc PE \/ Size       34738 \/ &lt;135.70 GiB\r\n <span class=\"has-inline-color has-vivid-red-color\"> Free  PE \/ Size       0 \/ 0<\/span>\r\n  VG UUID               Yfe0bt-qxYw-Vme0-nioR-WexB-4Rku-xfW5SG<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> --- Logical volume ---\r\n  LV Path                \/dev\/cl\/root\r\n  LV Name                root\r\n  VG Name                cl\r\n  LV UUID                FnDp59-R9uo-kaTr-jRrF-WW35-maSm-qMmNze\r\n  LV Write Access        read\/write\r\n  LV Creation host, time coral, 2020-08-28 00:46:01 -0700\r\n  LV Status              available\r\n  # open                 1\r\n  LV Size                50.00 GiB\r\n  Current LE             12800\r\n  Segments               1\r\n  Allocation             inherit\r\n  Read ahead sectors     auto\r\n  - currently set to     8192\r\n  Block device           253:0\r\n--- Physical volumes ---\r\n  PV Name               \/dev\/sda2\r\n  PV UUID               e3FYP0-Us7d-fjUO-MfNI-BpbG-L1eU-jbqwYN\r\n  PV Status             allocatable\r\n  <span class=\"has-inline-color has-vivid-red-color\">Total PE \/ Free PE    34738 \/ 0<\/span>\r\n<\/code><\/pre>\n\n\n\n<p>So now I make the rest of the drive accessible to LVM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># pvresize \/dev\/sda2\r\n  Physical volume \"\/dev\/sda2\" changed\r\n  1 physical volume(s) resized or updated \/ 0 physical volume(s) not resized\r\n<\/code><\/pre>\n\n\n\n<p>I now have space to expand within LVM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> --- Volume group ---\r\n  VG Name               cl\r\n  System ID\r\n  Format                lvm2\r\n  Metadata Areas        1\r\n  Metadata Sequence No  6\r\n  VG Access             read\/write\r\n  VG Status             resizable\r\n  MAX LV                0\r\n  Cur LV                3\r\n  Open LV               3\r\n  Max PV                0\r\n  Cur PV                1\r\n  Act PV                1\r\n  VG Size               278.36 GiB\r\n  PE Size               4.00 MiB\r\n  Total PE              71261\r\n  Alloc PE \/ Size       34738 \/ &lt;135.70 GiB\r\n <span class=\"has-inline-color has-vivid-green-cyan-color\"> Free  PE \/ Size       36523 \/ &lt;142.67 GiB<\/span>\r\n  VG UUID               Yfe0bt-qxYw-Vme0-nioR-WexB-4Rku-xfW5SG<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>  --- Logical volume ---\r\n  LV Path                \/dev\/cl\/root\r\n  LV Name                root\r\n  VG Name                cl\r\n  LV UUID                FnDp59-R9uo-kaTr-jRrF-WW35-maSm-qMmNze\r\n  LV Write Access        read\/write\r\n  LV Creation host, time coral, 2020-08-28 00:46:01 -0700\r\n  LV Status              available\r\n  # open                 1\r\n  LV Size                50.00 GiB\r\n  Current LE             12800\r\n  Segments               1\r\n  Allocation             inherit\r\n  Read ahead sectors     auto\r\n  - currently set to     8192\r\n  Block device           253:0\r\n\r\n  --- Physical volumes ---\r\n  PV Name               \/dev\/sda2\r\n  PV UUID               e3FYP0-Us7d-fjUO-MfNI-BpbG-L1eU-jbqwYN\r\n  PV Status             allocatable\r\n<span class=\"has-inline-color has-vivid-cyan-blue-color\">  Total PE \/ Free PE    71261 \/ 36523<\/span><\/code><\/pre>\n\n\n\n<p>I then extended the logical volume and filesystem:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>]# lvextend -L 100G \/dev\/mapper\/cl-root -r\r\n  Size of logical volume cl\/root changed from 50.00 GiB (12800 extents) to 100.00 GiB (25600 extents).\r\n  Logical volume cl\/root successfully resized.\r\nmeta-data=\/dev\/mapper\/cl-root    isize=512    agcount=4, agsize=3276800 blks\r\n         =                       sectsz=512   attr=2, projid32bit=1\r\n         =                       crc=1        finobt=1, sparse=1, rmapbt=0\r\n         =                       reflink=1\r\ndata     =                       bsize=4096   blocks=13107200, imaxpct=25\r\n         =                       sunit=0      swidth=0 blks\r\nnaming   =version 2              bsize=4096   ascii-ci=0, ftype=1\r\nlog      =internal log           bsize=4096   blocks=6400, version=2\r\n         =                       sectsz=512   sunit=0 blks, lazy-count=1\r\nrealtime =none                   extsz=4096   blocks=0, rtextents=0\r\ndata blocks changed from 13107200 to 26214400\r\n<\/code><\/pre>\n\n\n\n<p>Confirmed new filesystem size and system was operational and I was done.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>]# df -kh\r\nFilesystem                                  Size  Used Avail Use% Mounted on\r\ndevtmpfs                                     40G     0   40G   0% \/dev\r\ntmpfs                                        40G  198M   39G   1% \/dev\/shm\r\ntmpfs                                        40G  9.8M   40G   1% \/run\r\ntmpfs                                        40G     0   40G   0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/cl-root                         100G   49G   52G  49% \/\r\n\/dev\/mapper\/cl-home                          72G  3.1G   69G   5% \/home\r\n\/dev\/sda1                                   976M  341M  569M  38% \/boot\r\n\/dev\/mapper\/zoneminder-lvol0                1.8T  1.4T  401G  77% \/zoneminder\r\n192.168.0.8:\/mnt\/file-storage2\/sonora-nfs1   32T   26T  6.1T  81% \/nfs1\r\ntmpfs                                       7.9G   20K  7.9G   1% \/run\/user\/42\r\ntmpfs                                       7.9G  4.0K  7.9G   1% \/run\/user\/1000\r\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>]# ps -ef | grep plex\r\nplex        1983       1  0 23:12 ?        00:00:03 \/usr\/lib\/plexmediaserver\/Plex Media Server\r\nplex        2967    1983  0 23:12 ?        00:00:02 Plex Plug-in &#91;com.plexapp.system] \/usr\/lib\/plexmediaserver\/Resources\/Plug-ins-e2e58f321\/Framework.bundle\/Contents\/Resources\/Versions\/2\/Python\/bootstrap.py --server-version 1.23.6.4881-e2e58f321 \/usr\/lib\/plexmediaserver\/Resources\/Plug-ins-e2e58f321\/System.bundle\r\nplex        3232    1983  0 23:12 ?        00:00:00 \/usr\/lib\/plexmediaserver\/Plex DLNA Server\r\nplex        3245    1983  0 23:12 ?        00:00:00 \/usr\/lib\/plexmediaserver\/Plex Tuner Service \/usr\/lib\/plexmediaserver\/Resources\/Tuner\/Private \/usr\/lib\/plexmediaserver\/Resources\/Tuner\/Shared 1.23.6.4881-e2e58f321 32600\r\nplex        3297    1983  0 23:12 ?        00:00:02 Plex Plug-in &#91;com.plexapp.agents.imdb] \/usr\/lib\/plexmediaserver\/Resources\/Plug-ins-e2e58f321\/Framework.bundle\/Contents\/Resources\/Versions\/2\/Python\/bootstrap.py --server-version 1.23.6.4881-e2e58f321 \/usr\/lib\/plexmediaserver\/Resources\/Plug-ins-e2e58f321\/PlexMovie.bundle\r\nroot        8171    4424  0 23:18 pts\/0    00:00:00 grep --color=auto plex\r\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>]# systemctl status zoneminder\r\n\u25cf zoneminder.service - ZoneMinder CCTV recording and security system\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/zoneminder.service; enabled; vendor preset: disabled)\r\n  Drop-In: \/usr\/lib\/systemd\/system\/zoneminder.service.d\r\n           \u2514\u2500zm-httpd.conf\r\n   Active: active (running) since Sat 2021-08-21 23:12:36 PDT; 6min ago\r\n  Process: 3342 ExecStart=\/usr\/bin\/zmpkg.pl start (code=exited, status=0\/SUCCESS)\r\n Main PID: 3842 (zmdc.pl)\r\n    Tasks: 26 (limit: 513304)\r\n   Memory: 9.3G\r\n   CGroup: \/system.slice\/zoneminder.service\r\n           \u251c\u25003842 \/usr\/bin\/perl -wT \/usr\/bin\/zmdc.pl startup\r\n           \u251c\u25003886 \/usr\/bin\/zmc -m 1\r\n           \u251c\u25003890 \/usr\/bin\/zmc -m 2\r\n           \u251c\u25003904 \/usr\/bin\/zmc -m 3\r\n           \u251c\u25003910 \/usr\/bin\/zmc -m 4\r\n           \u251c\u25003914 \/usr\/bin\/zmc -m 5\r\n           \u251c\u25003919 \/usr\/bin\/perl -wT \/usr\/bin\/zmfilter.pl --filter_id=1 --daemon\r\n           \u251c\u25003924 \/usr\/bin\/perl -wT \/usr\/bin\/zmfilter.pl --filter_id=2 --daemon\r\n           \u251c\u25003929 \/usr\/bin\/perl -wT \/usr\/bin\/zmwatch.pl\r\n           \u251c\u25003934 \/usr\/bin\/perl -wT \/usr\/bin\/zmtelemetry.pl\r\n           \u2514\u25003945 \/usr\/bin\/perl -wT \/usr\/bin\/zmstats.pl\r\n\r\nAug 21 23:18:42 coral zmc_m2&#91;3890]: INF &#91;zmc_m2] &#91;Front-Porch_Speco-2: 11000 - Analysing at 29.91 fps from 10999 - >\r\nAug 21 23:18:42 coral zmc_m5&#91;3914]: INF &#91;zmc_m5] &#91;Upstairs-Uview-2: 9300 - Capturing at 25.37 fps, capturing bandwi>\r\nAug 21 23:18:44 coral zmc_m4&#91;3910]: INF &#91;zmc_m4] &#91;Kitchen-Uniview-1: 9300 - Capturing at 25.38 fps, capturing bandw>\r\nAug 21 23:18:44 coral zmc_m3&#91;3904]: INF &#91;zmc_m3] &#91;Front-Driveway-Vitek-1: 10900 - Capturing at 29.65 fps, capturing>\r\nAug 21 23:18:44 coral zmc_m3&#91;3904]: INF &#91;zmc_m3] &#91;Front-Driveway-Vitek-1: 10900 - Analysing at 29.64 fps from 10899>\r\nAug 21 23:18:45 coral zmc_m1&#91;3886]: INF &#91;zmc_m1] &#91;Backyard-1-Speco: 11100 - Capturing at 30.12 fps, capturing bandw>\r\nAug 21 23:18:45 coral zmc_m1&#91;3886]: INF &#91;zmc_m1] &#91;Backyard-1-Speco: 11100 - Analysing at 30.12 fps from 11099 - 109>\r\nAug 21 23:18:45 coral zmc_m2&#91;3890]: INF &#91;zmc_m2] &#91;Front-Porch_Speco-2: 11100 - Capturing at 29.94 fps, capturing ba>\r\nAug 21 23:18:45 coral zmc_m2&#91;3890]: INF &#91;zmc_m2] &#91;Front-Porch_Speco-2: 11100 - Analysing at 30.15 fps from 11099 - >\r\nAug 21 23:18:46 coral zmc_m5&#91;3914]: INF &#91;zmc_m5] &#91;Upstairs-Uview-2: 9400 - Capturing at 25.39 fps, capturing bandwi>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I bought a new larger hard drive locally and finally got a chance to increase the root size of my bl460 g7 blade server that serves as my CCTV Zoneminder system and Plex movie streaming system. The Plex database gets &hellip; <a href=\"https:\/\/dhoytt.com\/mainblog\/2021\/08\/increased-drive-size-zoneminder-cctv-and-plex-physical-server-with-clonezilla\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[1061,1062,887,401,643,1060,132,169,393,923,240,471,735],"class_list":["post-2227","post","type-post","status-publish","format-standard","hentry","category-technical-non-site-related","tag-balenaetcher","tag-bootable-usb","tag-centos-8","tag-clonezilla","tag-fdisk","tag-filesystem","tag-linux","tag-lvm","tag-nfs","tag-plex-server","tag-raid","tag-sas-hard-drives","tag-zoneminder"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/posts\/2227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/comments?post=2227"}],"version-history":[{"count":3,"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/posts\/2227\/revisions"}],"predecessor-version":[{"id":2230,"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/posts\/2227\/revisions\/2230"}],"wp:attachment":[{"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/media?parent=2227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/categories?post=2227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhoytt.com\/mainblog\/wp-json\/wp\/v2\/tags?post=2227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}