/ voll - Neue Festplatte?

Warum Debian und/oder eine seiner Spielarten? Was muss ich vorher wissen? Wo geht es nach der Installation weiter?
Antworten
simlu
Beiträge: 3
Registriert: 25.08.2013 23:02:58

/ voll - Neue Festplatte?

Beitrag von simlu » 25.08.2013 23:06:47

Hallo zusammen,

ich habe aktuell eine sehr unpraktische Konfiguration vormir und nach dieversen Updates ist nun leider / voll.

Code: Alles auswählen

Dateisystem                                            Größe Benutzt Verf. Verw% Eingehängt auf
rootfs                                                  322M    305M  665K  100% /
udev                                                     10M       0   10M    0% /dev
tmpfs                                                   353M    300K  353M    1% /run
/dev/disk/by-uuid/95b43f16-0c97-4b17-aad1-cbd10fa715c1  322M    305M  665K  100% /
tmpfs                                                   5,0M    4,0K  5,0M    1% /run/lock
tmpfs                                                   2,2G       0  2,2G    0% /run/shm
/dev/sda9                                               129G    258M  122G    1% /home
/dev/sda8                                               1,9G     35M  1,8G    2% /tmp
/dev/sda5                                                14G    2,6G   11G   20% /usr
/dev/sda6                                               111G     14G   91G   14% /var
/dev/sda6                                               111G     14G   91G   14% /var/www/clients/client12/web20/log
...
Nun meine Frage wie vergrößere ich ambesten die Partition bzw wie schaffe ich mehr Freiraum.
Eine weitere Festplatte ist ohne Probleme möglich (V-Server), aber wohin soll ich die mounten?
Leider kein LVM. Prdofuktiv Server sollte daher möglichst wenig down sein.
Danke euch.

Noch paar Anmerkungen:

Code: Alles auswählen

root@static:/# du --max-depth=1 -h
1,0K    ./opt
12K     ./lost+found
213M    ./lib
32M     ./boot
0       ./dev
5,0K    ./media
304K    ./run
14G     ./var
2,4G    ./usr
71M     ./home
3,0M    ./lib32
du: Zugriff auf „./proc/20853/task/20853/fd/4“ nicht möglich: Datei oder Verzeichnis nicht gefunden
du: Zugriff auf „./proc/20853/task/20853/fdinfo/4“ nicht möglich: Datei oder Verzeichnis nicht gefunden
du: Zugriff auf „./proc/20853/fd/4“ nicht möglich: Datei oder Verzeichnis nicht gefunden
du: Zugriff auf „./proc/20853/fdinfo/4“ nicht möglich: Datei oder Verzeichnis nicht gefunden
0       ./proc
1,0K    ./selinux
6,7M    ./bin
1,0K    ./srv
5,0M    ./etc
1,0K    ./lib64
28K     ./tmp
6,0M    ./sbin
0       ./sys
1,0K    ./mnt
30M     ./root
17G     .

Code: Alles auswählen

root@static:/# fdisk -l

Disk /dev/sda: 343.6 GB, 343597383680 bytes
255 heads, 63 sectors/track, 41773 cylinders, total 671088640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c27b4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      681983      339968   83  Linux
/dev/sda2          684030   557320191   278318081    5  Extended
/dev/sda5          684032    29978623    14647296   83  Linux
/dev/sda6        29980672   264353791   117186560   83  Linux
/dev/sda7       264355840   279977983     7811072   82  Linux swap / Solaris
/dev/sda8       279980032   283883519     1951744   83  Linux
/dev/sda9       283885568   557320191   136717312   83  Linux
Zuletzt geändert von simlu am 25.08.2013 23:55:31, insgesamt 1-mal geändert.

Cae
Beiträge: 6349
Registriert: 17.07.2011 23:36:39
Wohnort: 2130706433

Re: / voll - Neue Festplatte?

Beitrag von Cae » 25.08.2013 23:32:38

Vorerst kannst du die 30 MB aus /root irgendwo anders hinpacken. Dann wuerde ich mal forschen, warum /lib so riesenfett ist, ich hab' hier im Mittel 130 MB trotz Multiarch und auch bei eher unschlanken Systemen. Alte Module von nicht verwendeten Kerneln? Was man vielleicht auf eine extra Partition packen koennte, waere /boot, aber alles andere will man eigentlich direkt auf / haben.

Willkommen im Forum!

Gruss Cae
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.

—Bruce Schneier

simlu
Beiträge: 3
Registriert: 25.08.2013 23:02:58

Re: / voll - Neue Festplatte?

Beitrag von simlu » 26.08.2013 00:12:11

Danke für die schnelle Antwort!!
Habe die Festplatte jetzt größer gemacht.
Jetzt müsste ich nurnoch wissen, wie ich eine Partition erstelle (im Betrieb)

Code: Alles auswählen

root@static:/lib# fdisk -l

Disk /dev/sda: 386.5 GB, 386547056640 bytes
255 heads, 63 sectors/track, 46995 cylinders, total 754974720 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c27b4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      681983      339968   83  Linux
/dev/sda2          684030   557320191   278318081    5  Extended
/dev/sda5          684032    29978623    14647296   83  Linux
/dev/sda6        29980672   264353791   117186560   83  Linux
/dev/sda7       264355840   279977983     7811072   82  Linux swap / Solaris
/dev/sda8       279980032   283883519     1951744   83  Linux
/dev/sda9       283885568   557320191   136717312   83  Linux

Code: Alles auswählen

root@static:/lib# ls -la
insgesamt 251
drwxr-xr-x 15 root root 10240 Aug 25 22:21 .
drwxr-xr-x 24 root root  1024 Aug 25 22:48 ..
lrwxrwxrwx  1 root root    21 Aug 25 22:21 cpp -> /etc/alternatives/cpp
drwxr-xr-x  2 root root  1024 Mär 15  2012 discover
drwxr-xr-x  7 root root  1024 Aug 25 22:18 firmware
drwxr-xr-x  2 root root  1024 Aug  2  2012 i386-linux-gnu
drwxr-xr-x  3 root root  1024 Aug 25 22:14 init
-rwxr-xr-x  1 root root 72184 Nov 12  2012 klibc-2xtYrByCrj5OEwaInv4tMSjej98.so
lrwxrwxrwx  1 root root    20 Aug 25 22:12 ld-linux.so.2 -> /lib32/ld-linux.so.2
lrwxrwxrwx  1 root root    17 Mär  1 14:55 libip4tc.so.0 -> libip4tc.so.0.1.0
-rw-r--r--  1 root root 31384 Mär  1 14:55 libip4tc.so.0.1.0
lrwxrwxrwx  1 root root    17 Mär  1 14:55 libip6tc.so.0 -> libip6tc.so.0.1.0
-rw-r--r--  1 root root 31448 Mär  1 14:55 libip6tc.so.0.1.0
lrwxrwxrwx  1 root root    15 Mär  1 14:55 libipq.so.0 -> libipq.so.0.0.0
-rw-r--r--  1 root root 10544 Mär  1 14:55 libipq.so.0.0.0
lrwxrwxrwx  1 root root    16 Mär  1 14:55 libiptc.so.0 -> libiptc.so.0.0.0
-rw-r--r--  1 root root  5928 Mär  1 14:55 libiptc.so.0.0.0
lrwxrwxrwx  1 root root    19 Mär  1 14:55 libxtables.so.7 -> libxtables.so.7.0.0
-rw-r--r--  1 root root 47824 Mär  1 14:55 libxtables.so.7.0.0
drwxr-xr-x  3 root root  1024 Aug 25 22:02 lsb
drwxr-xr-x  2 root root  1024 Aug 25 22:14 modprobe.d
drwxr-xr-x  4 root root  1024 Aug 25 22:16 modules
drwxr-xr-x  2 root root  5120 Aug 25 22:19 security
drwxr-xr-x  3 root root  1024 Aug 25 22:03 systemd
drwxr-xr-x 15 root root  1024 Mär 15  2012 terminfo
drwxr-xr-x  5 root root  4096 Aug 25 22:14 udev
drwxr-xr-x  4 root root  7168 Aug 25 22:18 x86_64-linux-gnu
drwxr-xr-x  2 root root 13312 Aug 25 22:18 xtables



root@static:/lib# du --max-depth=1 -h
55K     ./firmware
6,0K    ./modprobe.d
13M     ./x86_64-linux-gnu
506K    ./udev
1,0K    ./i386-linux-gnu
94K     ./terminfo
18K     ./systemd
47K     ./security
3,6M    ./discover
16K     ./lsb
1,1M    ./xtables
34K     ./init
195M    ./modules
213M    .
root@static:/lib#


root@static:/lib# ls -la
insgesamt 251
drwxr-xr-x 15 root root 10240 Aug 25 22:21 .
drwxr-xr-x 24 root root  1024 Aug 25 22:48 ..
lrwxrwxrwx  1 root root    21 Aug 25 22:21 cpp -> /etc/alternatives/cpp
drwxr-xr-x  2 root root  1024 Mär 15  2012 discover
drwxr-xr-x  7 root root  1024 Aug 25 22:18 firmware
drwxr-xr-x  2 root root  1024 Aug  2  2012 i386-linux-gnu
drwxr-xr-x  3 root root  1024 Aug 25 22:14 init
-rwxr-xr-x  1 root root 72184 Nov 12  2012 klibc-2xtYrByCrj5OEwaInv4tMSjej98.so
lrwxrwxrwx  1 root root    20 Aug 25 22:12 ld-linux.so.2 -> /lib32/ld-linux.so.2
lrwxrwxrwx  1 root root    17 Mär  1 14:55 libip4tc.so.0 -> libip4tc.so.0.1.0
-rw-r--r--  1 root root 31384 Mär  1 14:55 libip4tc.so.0.1.0
lrwxrwxrwx  1 root root    17 Mär  1 14:55 libip6tc.so.0 -> libip6tc.so.0.1.0
-rw-r--r--  1 root root 31448 Mär  1 14:55 libip6tc.so.0.1.0
lrwxrwxrwx  1 root root    15 Mär  1 14:55 libipq.so.0 -> libipq.so.0.0.0
-rw-r--r--  1 root root 10544 Mär  1 14:55 libipq.so.0.0.0
lrwxrwxrwx  1 root root    16 Mär  1 14:55 libiptc.so.0 -> libiptc.so.0.0.0
-rw-r--r--  1 root root  5928 Mär  1 14:55 libiptc.so.0.0.0
lrwxrwxrwx  1 root root    19 Mär  1 14:55 libxtables.so.7 -> libxtables.so.7.0.0
-rw-r--r--  1 root root 47824 Mär  1 14:55 libxtables.so.7.0.0
drwxr-xr-x  3 root root  1024 Aug 25 22:02 lsb
drwxr-xr-x  2 root root  1024 Aug 25 22:14 modprobe.d
drwxr-xr-x  4 root root  1024 Aug 25 22:16 modules
drwxr-xr-x  2 root root  5120 Aug 25 22:19 security
drwxr-xr-x  3 root root  1024 Aug 25 22:03 systemd
drwxr-xr-x 15 root root  1024 Mär 15  2012 terminfo
drwxr-xr-x  5 root root  4096 Aug 25 22:14 udev
drwxr-xr-x  4 root root  7168 Aug 25 22:18 x86_64-linux-gnu
drwxr-xr-x  2 root root 13312 Aug 25 22:18 xtables


Cae
Beiträge: 6349
Registriert: 17.07.2011 23:36:39
Wohnort: 2130706433

Re: / voll - Neue Festplatte?

Beitrag von Cae » 26.08.2013 11:38:46

Wenn /lib/modules so gross ist, sind vielleicht mehrere nicht mehr benoetigte Kernel installiert (auch wenn das zu den 32 MB /boot nicht zu passen scheint). Vergleiche mit

Code: Alles auswählen

dpkg -l | grep linux-image
und uname -r. Falls da ueberschuessige Exemplare sind, solltest du sie herunterschmeissen koennen.

Der Kernel hat immerhin mitbekommen, dass sich /dev/sda vergroessert hat, daher solltest du per

Code: Alles auswählen

# fdisk /dev/sda
eine weitere Partition anbauen koennen. Die entsprechenden Kommandofolgen waeren laut meinem Gedaechtnis

Code: Alles auswählen

n                           new
l                           logical
enter                       Anfangs-Offset bestaetigen
enter bzw. Groesse angeben  Partitionsgroesse bestaetigen/festlegen
p                           gucken, ob alles wie gewuenscht aussieht
w                           Partitionstabelle beschreiben und beenden
Anschliessend

Code: Alles auswählen

# mkfs.ext2 /dev/sda10
# mount /dev/sda10 /mnt
# cp -a /boot/* /mnt/
# vi /etc/fstab # per blkid die UUID der neuen Partition heraus bekommen und
                # fuer /boot eintragen
# rm -r /boot/*
# umount /mnt
# mount /boot
# ls /boot # Kontrolle
Ob man nun ext2 nimmt, was kein Journal hat, oder ext3, was vom GRUB ohnehin nur mit abgeschaltetem Journal gemountet wird, darueber kann man sich streiten. Ob ext4 gehen wuerde, bin ich mir nicht sicher.

Gruss Cae
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.

—Bruce Schneier

simlu
Beiträge: 3
Registriert: 25.08.2013 23:02:58

Re: / voll - Neue Festplatte?

Beitrag von simlu » 26.08.2013 18:34:45

Wirklich vielen Dank für die ausführliche Antwort.

ich habe erstmal die beiden unbenötigten Kernel runter geschmissen.
Etwas platz ist nun wieder da. Jetzt noch /boot/ auszulagern find ich jetzt nicht so sinnvoll.
Aber irgend wann wird / wohl wieder voll sein.
Ganz / auf eine neue Partition (der gleichen Festplatte) zu packen geht wohl nicht, oder?

Code: Alles auswählen

root@static:/# du --max-depth=1 -h
1,0K    ./opt
12K     ./lost+found
121M    ./lib
19M     ./boot
0       ./dev
5,0K    ./media
304K    ./run
21G     ./var
2,4G    ./usr
71M     ./home
3,0M    ./lib32
du: Zugriff auf „./proc/13459/task/13459/fd/4“ nicht möglich: Datei oder Verzeichnis nicht gefunden
du: Zugriff auf „./proc/13459/task/13459/fdinfo/4“ nicht möglich: Datei oder Verzeichnis nicht gefunden
du: Zugriff auf „./proc/13459/fd/4“ nicht möglich: Datei oder Verzeichnis nicht gefunden
du: Zugriff auf „./proc/13459/fdinfo/4“ nicht möglich: Datei oder Verzeichnis nicht gefunden
0       ./proc
1,0K    ./selinux
6,7M    ./bin
1,0K    ./srv
5,0M    ./etc
1,0K    ./lib64
28K     ./tmp
6,0M    ./sbin
0       ./sys
1,0K    ./mnt
30M     ./root
23G     .

root@static:/# df -h
Dateisystem                                            Größe Benutzt Verf. Verw% Eingehängt auf
rootfs                                                  322M    200M  106M   66% /
udev                                                     10M       0   10M    0% /dev
tmpfs                                                   353M    300K  353M    1% /run
/dev/disk/by-uuid/95b43f16-0c97-4b17-aad1-cbd10fa715c1  322M    200M  106M   66% /
tmpfs                                                   5,0M    4,0K  5,0M    1% /run/lock
tmpfs                                                   2,2G       0  2,2G    0% /run/shm
/dev/sda9                                               129G    258M  122G    1% /home
/dev/sda8                                               1,9G     35M  1,8G    2% /tmp
/dev/sda5                                                14G    2,6G   11G   20% /usr
/dev/sda6                                               111G     17G   88G   16% /var
/dev/sda6                                               111G     17G   88G   16% /var/www/clients/client12/web20/log
...

root@static:/# fdisk -l

Disk /dev/sda: 386.5 GB, 386547056640 bytes
255 heads, 63 sectors/track, 46995 cylinders, total 754974720 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c27b4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      681983      339968   83  Linux
/dev/sda2          684030   557320191   278318081    5  Extended
/dev/sda5          684032    29978623    14647296   83  Linux
/dev/sda6        29980672   264353791   117186560   83  Linux
/dev/sda7       264355840   279977983     7811072   82  Linux swap / Solaris
/dev/sda8       279980032   283883519     1951744   83  Linux
/dev/sda9       283885568   557320191   136717312   83  Linux


Antworten