Linux newbie problem
-
As you'll soon notice, I'm a newbie in RH administration: I've setup a Linux RH 7.2 some time ago, and, as I don't know which are the best practices in it, let it to "auto-partition" the disk. I've put a cron job to
up2date -f -u
daily the updates, so I have a updated setup and it is working fine until today. But now, the problem is, my RH box is trying to download the new kernel version and can't, because there is no 6Mb of disk space free on the '/' partition:[root@linux /root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda8 251M 216M 22M 91% /
/dev/hda1 53M 14M 37M 27% /boot
/dev/hda6 3.9G 95M 3.6G 3% /home
/dev/hda5 3.9G 1.3G 2.5G 33% /usr
/dev/hda7 251M 68M 170M 29% /varAs you can see I have plenty of space on the other partitions. My questions are: 1. How can I resize the '/' partition without destroying the machine, or, at least, free some space on it? 2. Why does it says it needs 6Mb if there is 22Mb free? My latest article: SQL Server DO's and DONT's[^]
-
As you'll soon notice, I'm a newbie in RH administration: I've setup a Linux RH 7.2 some time ago, and, as I don't know which are the best practices in it, let it to "auto-partition" the disk. I've put a cron job to
up2date -f -u
daily the updates, so I have a updated setup and it is working fine until today. But now, the problem is, my RH box is trying to download the new kernel version and can't, because there is no 6Mb of disk space free on the '/' partition:[root@linux /root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda8 251M 216M 22M 91% /
/dev/hda1 53M 14M 37M 27% /boot
/dev/hda6 3.9G 95M 3.6G 3% /home
/dev/hda5 3.9G 1.3G 2.5G 33% /usr
/dev/hda7 251M 68M 170M 29% /varAs you can see I have plenty of space on the other partitions. My questions are: 1. How can I resize the '/' partition without destroying the machine, or, at least, free some space on it? 2. Why does it says it needs 6Mb if there is 22Mb free? My latest article: SQL Server DO's and DONT's[^]
1. If there's unpartitioned space after /dev/hda8 you can use
parted
to extend the root partition. In Red Hat Linux 8 you could use LVM to dynamically resize your partitions. 2. Did you run thatdf -h
while up2date was running? It may have created some temporary files (in/tmp
) before giving the error message about missing space. -
1. If there's unpartitioned space after /dev/hda8 you can use
parted
to extend the root partition. In Red Hat Linux 8 you could use LVM to dynamically resize your partitions. 2. Did you run thatdf -h
while up2date was running? It may have created some temporary files (in/tmp
) before giving the error message about missing space.markkuk wrote: 1. If there's unpartitioned space after /dev/hda8 you can use parted to extend the root partition. In Red Hat Linux 8 you could use LVM to dynamically resize your partitions. Unfortunately, this is not my case:
Using /dev/hda
Information: The operating system thinks the geometry on /dev/hda is
1247/255/63. Therefore, cylinder 1024 ends at 8032.499M.
(parted) print
Disk geometry for /dev/hda: 0.000-9787.148 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 54.909 primary ext2 boot
2 54.910 9781.765 extended
5 54.940 4141.757 logical ext2
6 4141.789 8228.605 logical ext2
7 8228.637 8487.465 logical ext2
8 8487.497 8746.325 logical ext2
9 8746.356 9005.185 logical linux-swap
(parted)Is there a way of moving the '/' filesystem (is that the word?) into another partition? Or will I have to completely rebuild the machine? My latest article: SQL Server DO's and DONT's[^]
-
markkuk wrote: 1. If there's unpartitioned space after /dev/hda8 you can use parted to extend the root partition. In Red Hat Linux 8 you could use LVM to dynamically resize your partitions. Unfortunately, this is not my case:
Using /dev/hda
Information: The operating system thinks the geometry on /dev/hda is
1247/255/63. Therefore, cylinder 1024 ends at 8032.499M.
(parted) print
Disk geometry for /dev/hda: 0.000-9787.148 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 54.909 primary ext2 boot
2 54.910 9781.765 extended
5 54.940 4141.757 logical ext2
6 4141.789 8228.605 logical ext2
7 8228.637 8487.465 logical ext2
8 8487.497 8746.325 logical ext2
9 8746.356 9005.185 logical linux-swap
(parted)Is there a way of moving the '/' filesystem (is that the word?) into another partition? Or will I have to completely rebuild the machine? My latest article: SQL Server DO's and DONT's[^]
Moving the root fs ('/') is possible, but tricky. You could split your '/home' partition into two to create your new '/' partition, then format it and copy everything from old '/' (use
cp -ax
, edit /etc/fstab and /boot/grub/grub.conf to match the new partition layout.