Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
erstelltes bz2 Archiv um das 4,5fache kleiner als die Source
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sun Oct 12, 2008 7:52 am    Post subject: erstelltes bz2 Archiv um das 4,5fache kleiner als die Source Reply with quote

Hi Jungs,

Es geht darum, das ich meine /-Partition gerne defragmentieren wuerde.
Also habe ich 10 GB auf meiner vfat-Partition freigemacht, eine LiveCD gebootet, loop-images erzeugt und sie zu einem Raid0-device zusamengelegt.
Danachim Verzeichnis /mnt/gentoo tar -cjvpf /mnt/defrag/root.tar.bz2 . --exclude ./proc --exclude ./sys --exclude ./dev ausgefuehrt
Mein Ergebnis war:
Code:
-rw-r--r-- 1 root root 1.9G Oct 12 02:18 root.tar.bz2

Mein Source war:
Code:
/dev/sda2             9.2G  5.0G  3.8G  57% /mnt/gentoo


Wie kann sowas kommen?
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
AmonAmarth
l33t
l33t


Joined: 03 Mar 2005
Posts: 727

PostPosted: Sun Oct 12, 2008 8:22 am    Post subject: Reply with quote

ich versteh nicht was dein problem damit ist, bz2 ist schon ein recht guter komprimieralgorithmus. bei plaintext dateien hab ich mal was von bis zu faktor 10 und noch kleinere komprimate gesehen!
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sun Oct 12, 2008 8:50 am    Post subject: Reply with quote

Nein, da verstehst du mich falsch, ich habe kein Problem damit, es wundert mich nur, das / komprimiert grademal knapp 2 GB sind.
Obwohl da mehr als nur Plain-text Dateien sind, sondern auch sehr viele Binaries und co.

Denn ich habs nur ungern das ich das Archiv nach einem mkfs doch nicht alles war und ich mein System irgendwie wieder zusammenbasteln darf.

Naja, okay.
bei mir liegt ausserdem
/var
/usr/portage
/home
jeweils auf extra Partitionen.

Jedenfalls, danke fuer die voraugenfuehrung des Erfolges von bz2.
NA dann, weiter gehts.
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Sun Oct 12, 2008 9:20 am    Post subject: Reply with quote

Quote:
Also habe ich 10 GB auf meiner vfat-Partition freigemacht
!!! VFAT erlaubt nur Dateigrößen von max 2GB, nicht wahr ? Ich habe damit mal eine böse Erfahrung gemacht.
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sun Oct 12, 2008 9:28 am    Post subject: Reply with quote

4GB vfat oder fat32 hat 32 bit und kann 4 GB pro Datei.

Mit 2*4 GB und einer 2 GB Datei, die per dd if=/dev/zero erstellt wurden und per losetup und mdadm zu einem raid0-device zusammengelegt wurden habe ich eine Partition von etwa 10GB.
Auf der muss man nurnoch ein Filesystem erstellen, und sie mounten.
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Sun Oct 12, 2008 9:42 am    Post subject: Reply with quote

na dann sollte ein "tar -tf <file name>" ja keine Fehler bringen ;)
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sun Oct 12, 2008 9:53 am    Post subject: Reply with quote

werd ich dann gleichsehen (ich hab vergessen den Schalter p in den Befehl reinzunehmen, das musste ich jetzt nachholen, dauert also ein bisserl).
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
AmonAmarth
l33t
l33t


Joined: 03 Mar 2005
Posts: 727

PostPosted: Sun Oct 12, 2008 11:28 am    Post subject: Reply with quote

Max Steel wrote:
Nein, da verstehst du mich falsch, ich habe kein Problem damit, es wundert mich nur, das / komprimiert grademal knapp 2 GB sind.
Obwohl da mehr als nur Plain-text Dateien sind, sondern auch sehr viele Binaries und co.

Denn ich habs nur ungern das ich das Archiv nach einem mkfs doch nicht alles war und ich mein System irgendwie wieder zusammenbasteln darf.

Naja, okay.
bei mir liegt ausserdem
/var
/usr/portage
/home
jeweils auf extra Partitionen.

Jedenfalls, danke fuer die voraugenfuehrung des Erfolges von bz2.
NA dann, weiter gehts.


dann hab ich dich scheinbar wirklich falsch verstanden :lol:
ich würde mir erstmal keine sorgen machen, wenn du aber auf nummer sicher gehen willst kannst du ja auch ohne komprimierung packen, dann sollte das gepackte etwa die gleiche dateigröße haben
Back to top
View user's profile Send private message
mrsteven
Veteran
Veteran


Joined: 04 Jul 2003
Posts: 1939

PostPosted: Sun Oct 12, 2008 12:15 pm    Post subject: Reply with quote

Du kannst ja zur Sicherheit die bz2-Datei testweise nach /dev/null entpacken, bunzip2 sollte schon meckern, falls irgendwelche Daten am Ende fehlen:
Code:
bunzip2 < meine_datei.bz2 > /dev/null
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sun Oct 12, 2008 12:24 pm    Post subject: Reply with quote

Okay danke.

Edith:
Super, Rechner läuft ohne Probleme =)
(Und jetz hab ich auch mal ein Backup xD)
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Sun Oct 12, 2008 1:58 pm    Post subject: Reply with quote

mrsteven wrote:
Du kannst ja zur Sicherheit die bz2-Datei testweise nach /dev/null entpacken, bunzip2 sollte schon meckern, falls irgendwelche Daten am Ende fehlen:
Code:
bunzip2 < meine_datei.bz2 > /dev/null
Der Schalter "--test" sollte es auch richten.
Back to top
View user's profile Send private message
STiGMaTa_ch
Veteran
Veteran


Joined: 28 Dec 2004
Posts: 1686
Location: Rüti ZH / Schweiz

PostPosted: Sun Oct 12, 2008 7:01 pm    Post subject: Re: erstelltes bz2 Archiv um das 4,5fache kleiner als die So Reply with quote

Max Steel wrote:
Es geht darum, das ich meine /-Partition gerne defragmentieren wuerde.

Du weisst aber schon, dass wir hier nicht bei Windows sind? :lol: Die Fragmentierung unter Linux ist verschwindend gering. Dein Aufwand war absolut für die Katz! (zumindest was das defragmentieren angeht. aber immerhin hast du ja jetzt ein Backup ;) )

Hier mal einige Links zum Thema
http://faq.jensbenecke.de/wiki/FestplatteDefragmentieren
http://kris.koehntopp.de/artikel/diplom/node13.html#SECTION00530000000000000000
http://dataexpedition.com/~sbnoble/Tips/filesystems.html#Optimization

Lieber Gruss
STiGMaTa
_________________
Ich bin Schuldknappe. Das bedeutet ich bin immer an allem Schuld. Und das nicht zu knapp! | Der alltägliche Familienwahnsinn auf meinem BLOG
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sun Oct 12, 2008 7:27 pm    Post subject: Reply with quote

Danke vielmals Stigmata.
Jetzt bin wieder um einiges schlauer und ich weiß nun auch das es keinen Sinn macht das ganze defragmentieren zu wollen.

Allerdings hatte ich ein paar Tage lang auch eine knap 95% Auslastung der /-Partition, und vor allem, /var und auch /usr/portage.
ICh weiß allerdings nicht inwieweit er es nach "überstandender" "fastfüllung" reorganisiert damit es wieder schön reinpasst.
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2970
Location: Germany

PostPosted: Mon Oct 13, 2008 10:46 am    Post subject: Reply with quote

Soweit ich weiss hängt es auch vom FS ab.

Das "MurderFS" (oder auch ReiserFS) soll wohl schon mit der Zeit und bei hoher Belegung deutlich Fragmentieren.
_________________
...it's only Rock'n'Roll, but I like it!
Back to top
View user's profile Send private message
hitachi
Guru
Guru


Joined: 20 Feb 2006
Posts: 478
Location: Freiburg / Deutschland

PostPosted: Wed Oct 22, 2008 10:28 pm    Post subject: Reply with quote

toralf wrote:
mrsteven wrote:
Du kannst ja zur Sicherheit die bz2-Datei testweise nach /dev/null entpacken, bunzip2 sollte schon meckern, falls irgendwelche Daten am Ende fehlen:
Code:
bunzip2 < meine_datei.bz2 > /dev/null
Der Schalter "--test" sollte es auch richten.

Wenn ich das man richtig lese sollte das das Gleiche sein.
Quote:
-t --test
Check integrity of the specified file(s), but don’t decompress them. This really performs a trial decompression and throws away the result.
Back to top
View user's profile Send private message
tost
Guru
Guru


Joined: 10 Dec 2005
Posts: 506

PostPosted: Thu Oct 23, 2008 12:33 pm    Post subject: Reply with quote

Also ich defragmentiere auch von Zeit zu Zeit meine Partitionen mit tar.
Gerade bei ReiserFs merke ich danach auch wirklich einen Unterschied und die Fragmentierung bei meiner großen /home Partition ist auch inzwischen recht hoch geworden.

Grüße
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Thu Oct 23, 2008 1:45 pm    Post subject: Reply with quote

hitachi wrote:
Wenn ich das man richtig lese sollte das das Gleiche sein.
Eben, aber meine Lösung schont das Gerät /dev/null ;-)
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Thu Oct 23, 2008 6:52 pm    Post subject: Reply with quote

Kleine Frage, wiekann man aus einem Archiv eine einzelne Datei entpacken, mir geht es hier um die /etc/make.conf
Da ich sie ein bisschen zerstört habe :oops:
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Thu Oct 23, 2008 8:29 pm    Post subject: Reply with quote

"man tar" liefert für den Parameter "--extract" die Lösung- dazu muß man den genauen Pfad + Dateinamen im tar-Archiv angeben
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Thu Oct 23, 2008 9:02 pm    Post subject: Reply with quote

aaaah danke
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum