LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mageia (https://www.linuxquestions.org/questions/mageia-97/)
-   -   I need to increase the size of /var - adjacent to an NTFS partition (https://www.linuxquestions.org/questions/mageia-97/i-need-to-increase-the-size-of-var-adjacent-to-an-ntfs-partition-4175640146/)

Milo4t 10-11-2018 02:54 AM

I need to increase the size of /var - adjacent to an NTFS partition
 
Hi good people.
I'm having problems with the size of my /var partition - it is full! (I tried installing 3 different software pgms at the same time but I have experienced problems in the past, now it's time to bite the bullet). I have to mention it is 6.8Gb in size (see screen dump) - 2.7Gb of that is taken up by a pgm that stores it's data in there for some reason.

http://i1099.photobucket.com/albums/...sa4ourn2u.jpeg

what I want to do is shrink the NTFS partition and then move it to the right. Then I hope to be able to expand the /var partition into the free space after moving the NTFS partition.

Okay, is this all possible WITHOUT causing problems with my Mageia bootup (seeing that system stuff and the logs etc. are kept there!) OR

Am I going to have to re-install my Mageia system allocating a larger size of /var (once I shrink and move the NTFS partition)

Any help greatly appreciated.

syg00 10-11-2018 03:16 AM

There is almost never a need to re-install (Linux) for this sort of thing.
That is useless - run this and post back in-line as text, not a photo - use [code] tags.
Code:

df -hT
sudo parted /dev/sdb "print free"


BW-userx 10-11-2018 08:01 AM

if you cannot figure out what to delete, to give more space, as this is a log directory that can hold over sized log files and one that are not actually needed to be kept track of for over 10 years. you maybe able to get away with deleting some and putting that on a schedule to try and keep the size down. that being said:

resizing partitions in itself should not effect the over all operation of the Operating System. the only thing that you'll have to cross your fingers for it data loss or corruption during the process of moving it over if the program doing the work need to do so. Mount points being the same, the system does not take into account of the size of your partition, other than the, does it have, or not have enough room to put anything so it will , or will not, put anything in them anymore.

backing up important data prior to is always suggested. how it is backed up, is up to the user.

Milo4t 10-11-2018 09:07 PM

syg00,
Sorry for posting image, I'm a visual guy not a cli guy, and not up with most cmds used in Linux - I just use it. I also forgot to mention that I can't install anything now as I know /var is where temp files are put when installing stuff. Dolphin tells me that there is 0 bytes free on /var (as does the result of the first cmd).

anyway, here is the results of the cmds you asked for:

Code:

[myles@Bilbo ~]$ df -hT
Filesystem    Type      Size  Used Avail Use% Mounted on
devtmpfs      devtmpfs  3.9G    0  3.9G  0% /dev
tmpfs          tmpfs    3.9G  25M  3.9G  1% /dev/shm
tmpfs          tmpfs    3.9G  1.2M  3.9G  1% /run
/dev/sda5      ext4      20G  6.7G  12G  37% /
tmpfs          tmpfs    3.9G    0  3.9G  0% /sys/fs/cgroup
/dev/sda6      ext4      48G  23G  26G  47% /home
/dev/sda2      fuseblk    59G  58G  1.4G  98% /media/win_d
tmpfs          tmpfs    3.9G  12M  3.9G  1% /tmp
/dev/sdc1      ext4      1.8T  808G  932G  47% /media/Mageia_Data
/dev/sdd1      ext4      1.8T  1.1T  622G  65% /media/Mageia_Media
/dev/sdb5      fuseblk  1.8T  528G  1.2T  31% /media/win_d2
/dev/sdb3      ext4      6.7G  6.4G    0 100% /var
/dev/sdb1      fuseblk    98G  46G  53G  47% /media/win_c
/dev/sdi2      fuseblk  3.7T  2.8T  925G  76% /media/win_c4
tmpfs          tmpfs    794M    0  794M  0% /run/user/983
tmpfs          tmpfs    794M  32K  794M  1% /run/user/1000
/dev/sdh1      fuseblk  1.9T  201G  1.7T  11% /run/media/myles/Seagate Expansion Drive_2Tb
/dev/sde2      fuseblk  3.7T  2.7T 1023G  73% /run/media/myles/NexStarHX_4Tb_Archive
/dev/sdf1      vfat      15G  875M  15G  6% /run/media/myles/TSB USB DRV
/dev/sdg1      fuseblk  373G  338G  36G  91% /run/media/myles/NEXSTAR_400Gb
/dev/sdj1      fuseblk  932G  775G  157G  84% /run/media/myles/Seagate
[myles@Bilbo ~]$ sudo parted /dev/sdb "print free"
[sudo] password for myles:
Model: ATA ST2000DM001-1CH1 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start  End    Size    Type      File system    Flags
        32.3kB  1049kB  1016kB            Free Space
 1      1049kB  105GB  105GB  primary  ntfs            boot
        105GB  105GB  2097kB            Free Space
 2      105GB  113GB  8389MB  primary  linux-swap(v1)
        113GB  113GB  2097kB            Free Space
 3      113GB  121GB  7340MB  primary  ext4
        121GB  121GB  1025kB            Free Space
 4      121GB  2000GB  1880GB  extended                  lba
 5      121GB  2000GB  1880GB  logical  ntfs
        2000GB  2000GB  1139kB            Free Space

[myles@Bilbo ~]$


Milo4t 10-11-2018 09:14 PM

BW-userx,
I was trying to install a pgm to interrogate /var to tell me what is taking up all of the space (besides my Application that I know takes up 2.7Gb).

I wouldn't be confident in deleting anything out of there as I have screwed up my system too many times through my own fault.

Seeing that /var is a pretty important part of the system that is why I'm hesitant to touch it, but I really need to to give me some breathing space.

BW-userx 10-11-2018 09:22 PM

Code:

/dev/sdb5      fuseblk  1.8T  528G  1.2T  31% /media/win_d2
/dev/sdb3      ext4      6.7G  6.4G    0 100% /var
/dev/sdb1      fuseblk    98G  46G  53G  47% /media/win_c

is what you're working with on the same hdd, move one of them as it looks like /var being on /sdb3 puts it in the middle of the other two. shrink one of them, format freed up space to ext4 then merge it into /sdb3, or bind mount var into a different larger partition/directory, depending on spin up assignment of drives. though it is not apparent that you're having an issue of that with / root already on a different drive.


You might be able to find some space somewhere else, and free it up by moving a partition, or using an existing one that has the same format as /var then create a directory and bind mount it to /var , or just move the entire /var to a larger partition


bind mounting
https://backdrift.org/how-to-use-bind-mounts-in-linux

just an idea. this has to be a desktop with more than two drives. room to install another one? then move /var onto it, and have fstab mount it from there.

syg00 10-11-2018 11:28 PM

Quote:

Originally Posted by Milo4t (Post 5913817)
Sorry for posting image

Nah, don't mind me - images are ok if they have what we need. I get cranky when I have to turn on javascript for those sites and the data isn't there.

You may know all the following, but bear with me.
To expand a (normal) partition unallocated space must exist contiguous to it - like the small bits you see in the parted listing. Presuming you want to scrape some space from /dev/sdb5 (/media/win_d2), it isn't straight-forward but is do-able using gparted - best done using their liveCD.
First you need to move the start of that NTFS partition - pick a number, say 9 Gig. Then move the beginning of the extended partition /dev/sda4 likewise - this is just a container for logical partitions. Then you can extend /dev/sda3 to use the space.
gparted is a GUI tool that allows you to drag the edges of partitions around, or right click and specify numbers to suit. Make sure you "apply" each change before doing the next action. Great tool, I use it often, even on NTFS.

I have confidence it will work as expected, particularly for /var, but NTFS is M$oft proprietary code, so note my sigline.

Milo4t 10-13-2018 12:38 AM

syg00,
Thanks for that. I hear you about turning on JS - I only allow the scripts that need to get me to see what I want.

As for GParted, no problem I have the LiveCD. I have also backed up all of the data from that M$ partition so if it goes pear-shaped it's okay.

In a past life I was in IT (before retiring) so know about partitons etc. I just am not that adept in the linuxsphere (hence my past screwups).

Anyway, I'll give it a go and let you know how it goes.

Milo4t 10-23-2018 03:21 AM

syg00 (and BW-userx as well),
Sorry for the late reply. I've been reluctant to tackle this and I have been waiting for the right time.

Well, I finally took the plunge and did the deed. I actually used a combination of tools - 1 on Windows and the GParted Live CD. So, the combination worked successfully!!! Writing this on my newly booted system with a MUCH larger /var partition.

So, thanks to both of you for your help, most appreciated!!!

I will have a beer for you!


All times are GMT -5. The time now is 03:04 PM.