Forum dan Chating untuk Pengguna Ubuntu di Indonesia Forum dan Chating untuk Pengguna Ubuntu di Indonesia
Siapa yang Online
28 terdaftar (ahsanp, alfurqonMoyudan, amree, antoniusgenta, Baduy, barengkidul, bawean, CDX, chreespo, DBom_Net, dedy_gtr, Gondret, gr33nc0d3, heryam, johansakra, khaerul, Killua_Linuxer, linuxers_cilik, lisnux, nurs, pingsut, RestuEngHokHak, rizaaal, saa7_go, satriya_mujung, Sudoers, thrvers, tjikoen), 230 Tamu dan 10 Laba-Laba online.
Pengguna Terbaru
bawean, tjikoen, ahsanp, Oechiex, TOMIA
16804 Pengguna Terdaftar
Posting Terbanyak
thrvers 3655
aptfast 3606
deny26 2435
ninja 2038
Sudoers 1848
blackshirt 1804
lisnux 1779
yogieza 1779
zarkasichan 1544
Nexus 1430
Pengguna Hari Ini

culunoop
Terdaftar: 10 Dec 10
Pesan: 30
Statistik Forum
16804 Pengguna
16 Forum
9426 Topik
90643 Pesan
Max Online: 441 @10 Jan 12 16:03
MediaWiki FUI
Mediawiki FUI
UbuntuGeek
Open Source Indonesia
Daftar Link2 Penting Open Source Indonesia
BlogLog Ubuntu Indonesia
BlogLog: Ringkasan Blog-Blog Ubuntu dalam Bahasa Indonesia
Opsi Topik
Menilai Topik Ini
#25771 - 13 Jun 10 19:28 <ask> Fsck otomatis ubuntu server
zitux Offline
Warga

Terdaftar: 16 Jan 10
Pesan: 866
Lokasi: Malang Jatim Indonesia
Ubuntu server
beberapa hari ini listrik sering mati
setiap kali server dipaksa mati tanpa melakukan shutdown atau reboot
startup boting berikutnya akan mengalami banyak error
muncul fsck manualy (scandisk manual)

how to menghindari scandisk manual td atau supaya bisa otomatis scandisk seperti Ubuntu dekstop ??
.
tq
_________________________
Jumlah postingan ku makin banyak grin
coz banyak bertanya ndak pernah pinter2 laugh

Top
#25773 - 13 Jun 10 19:49 Re: <ask> Fsck otomatis ubuntu server [Re: zitux]
Rh354 Offline
Warga

Terdaftar: 14 Mar 10
Pesan: 714
Lokasi: between the truth and the lies
fsck otomatis deh keknya tiap 30x booting...ga' tau jg klo server...pake ups smile
_________________________
OS : Slackware 13.1
Kernel : 2.6.35
CPU Type : i686
Processor : Intel Celeron M 1,4 GHz
Axioo Centaur series

============================
LEARN from yesterday,LIVE for today,and HOPE for tomorrow

Top
#25774 - 13 Jun 10 19:53 Re: <ask> Fsck otomatis ubuntu server [Re: Rh354]
zitux Offline
Warga

Terdaftar: 16 Jan 10
Pesan: 866
Lokasi: Malang Jatim Indonesia
hu uh pake ups dan pake monitor grin
apakah tidak ada konfigurasi untuk scandisk otomatis nya ?

biasa orang indo mau nya ngirit laugh laugh
tanpa ups dan monitor laugh
klo ups memang rencana dikasih
tp klo monitor kagak frown
jadi ribet klo pas fsck manual harus pasang monitor dulu baru scan manual frown


diEdit oleh zitux (13 Jun 10 19:55)
_________________________
Jumlah postingan ku makin banyak grin
coz banyak bertanya ndak pernah pinter2 laugh

Top
#25777 - 13 Jun 10 20:02 Re: <ask> Fsck otomatis ubuntu server [Re: zitux]
Rh354 Offline
Warga

Terdaftar: 14 Mar 10
Pesan: 714
Lokasi: between the truth and the lies
Kutip: zitux
hu uh pake ups dan pake monitor grin
apakah tidak ada konfigurasi untuk scandisk otomatis nya ?

biasa orang indo mau nya ngirit laugh laugh
tanpa ups dan monitor laugh
klo ups memang rencana dikasih
tp klo monitor kagak frown
jadi ribet klo pas fsck manual harus pasang monitor dulu baru scan manual frown
tetep klo kek gitu ceritanya mesti make ups laugh konsekuensinya lebih besar laugh HDD kena ,motherboard kena laugh klo udah gitu dobel khan..klo udah diganti baru deh beli ups jadi duitnya tambah dobel laugh

bandingkan klo bli ups lsg sebelum semuanya terlambat.. laugh

klo monitor rasanya ga' perlu deh..selama masih bs di remote dari luar kompi laen..


diEdit oleh Rh354 (13 Jun 10 20:09)
_________________________
OS : Slackware 13.1
Kernel : 2.6.35
CPU Type : i686
Processor : Intel Celeron M 1,4 GHz
Axioo Centaur series

============================
LEARN from yesterday,LIVE for today,and HOPE for tomorrow

Top
#25802 - 13 Jun 10 21:11 Re: <ask> Fsck otomatis ubuntu server [Re: Rh354]
zitux Offline
Warga

Terdaftar: 16 Jan 10
Pesan: 866
Lokasi: Malang Jatim Indonesia
Kutip:
klo ups memang rencana dikasih
bereskan laugh masih setup ups pake aki mobil bisa tahan 5 jam grin

Kutip:

klo monitor rasanya ga' perlu deh..selama masih bs di remote dari luar kompi laen..
klo pas scandisk manual ?? kan gak bisa diremot blush
coz aplikasinya masih belum berjalan

back topik klo ada konfigurasi nya otomatis
bisa 99% tanpa monitor blush
_________________________
Jumlah postingan ku makin banyak grin
coz banyak bertanya ndak pernah pinter2 laugh

Top
#25805 - 13 Jun 10 21:25 Re: <ask> Fsck otomatis ubuntu server [Re: zitux]
Rh354 Offline
Warga

Terdaftar: 14 Mar 10
Pesan: 714
Lokasi: between the truth and the lies
_________________________
OS : Slackware 13.1
Kernel : 2.6.35
CPU Type : i686
Processor : Intel Celeron M 1,4 GHz
Axioo Centaur series

============================
LEARN from yesterday,LIVE for today,and HOPE for tomorrow

Top
#25807 - 13 Jun 10 21:57 Re: <ask> Fsck otomatis ubuntu server [Re: Rh354]
zitux Offline
Warga

Terdaftar: 16 Jan 10
Pesan: 866
Lokasi: Malang Jatim Indonesia
terima kasih mas resa
Klik untuk menampilkan...
Code:
#!/bin/bash
#
#	Script adapted from "AutoFsck V3.2 by Jonathan Musther"
#	by Jonathan Musther, for Peter  -  1st May 2008
#
#	This script should be called when the machine is to be shutdown, it
#	will test to see if fsck is due, if it is, it will be run and the
#	machine will then be halted.  This script should be called thus:
#
#	/usr/bin/autofsck
#
#	where /usr/bin/autofsck is the path to this script.
#
#	Contact: jon@slymail.com
#
#------------------SCRIPT STARTS--------------------
#
#
#========================== Check on halt ==========================
function setupfsck {
	#Force checks.
	touch /forcefsck
	#Now create the script which will cause halt after the check:
	touch /tmp/postfsckhalt.sh
		#Actually create the script
		echo \#! /bin/sh >> /tmp/postfsckhalt.sh
		echo \# >> /tmp/postfsckhalt.sh
		echo \# This is a temporary script, it should not be >> /tmp/postfsckhalt.sh
		echo \# here while the system is in multi-user mode. >> /tmp/postfsckhalt.sh
		echo \# >> /tmp/postfsckhalt.sh
		echo rm /etc/init.d/postfsckhalt.sh >> /tmp/postfsckhalt.sh
		echo rm /etc/rc2.d/S*postfsckhalt.sh >> /tmp/postfsckhalt.sh
		echo rm /etc/rc3.d/S*postfsckhalt.sh >> /tmp/postfsckhalt.sh
		echo rm /etc/rc4.d/S*postfsckhalt.sh >> /tmp/postfsckhalt.sh
		echo rm /etc/rc5.d/S*postfsckhalt.sh >> /tmp/postfsckhalt.sh
		echo init 0 >> /tmp/postfsckhalt.sh
	#Put the script in init.d and update-rc
	mv /tmp/postfsckhalt.sh /etc/init.d/postfsckhalt.sh
	chmod a+x /etc/init.d/postfsckhalt.sh
	update-rc.d postfsckhalt.sh defaults
	#Tidy up so that the script isn't run during shutdown
	#but only during the subsequent boot.
	rm /etc/rc0.d/K*postfsckhalt.sh
	rm /etc/rc1.d/K*postfsckhalt.sh
	rm /etc/rc2.d/K*postfsckhalt.sh
	rm /etc/rc3.d/K*postfsckhalt.sh
	rm /etc/rc4.d/K*postfsckhalt.sh
	rm /etc/rc5.d/K*postfsckhalt.sh
	rm /etc/rc6.d/K*postfsckhalt.sh
}

#Consolidate info about the filesystems, given by mount.
function mountread {
	for i in $( mount | grep --regexp="/dev/hd" --regexp="/dev/sd" ); do
		echo $i
	done
}

function checkcount {
#Basically this section checks the mount command for mounted 
#partitions, /dev/sdX and /dev/hdX.  Then it checks the mount count 
#and maximum mount count of each one, any which is nearly ready for 
#checking causes $CHECK to be flagged to "1" and therefore starts 
#the main user interactive bit of the script.
CHECK="0"
#Loop to determine filesystems that need checking.
#MC = Mount count - MMC = Max Mount Count.
for i in $( mountread | grep --regexp="/dev/hd" --regexp="/dev/sd" ); do
	MC=$(tune2fs -l $i | grep --regexp="Mount count:" | tr -d "Mount count:")
	MMC=$(tune2fs -l $i | grep --regexp="Maximum mount count:" | tr -d "Maximum mount count:")
	MMC=$(echo $(($MMC-1)))
if [ "$MC" -ge "$MMC" ]; then
	CHECK="1"
fi
done
#Find out if check required.
if [ "$CHECK" = "0" ]; then #If no check required, halt.
	init 0
fi				#If a check is required, set up checks - using function setupfsck:
setupfsck
}

##################### FUNCTION CALLS #####################

checkcount
init 6
exit



Kutip: script
#Put the script in init.d and update-rc


Kutip: ubuntuforums.org
Thanks for the script.
But there seems to be a big bug!
It checks my filesystem after a reboot EVERYTIME i shut down the machine, insted of every 30th time. can someone see the bug in the script??
i couldnt find it. please help me, this would be so useful

Masukkan script di init.d dan update-rc
berarti setiap kali komputer restart/sutdown atau listrik padam laugh
selalu meload script ini untuk pertama kali
tidak peduli/tidak mengenal restart /shutdown atau litrik padam
bener ndak grin

tp memang sangat berguna grin
mungkin masih ada yg mau nambahin
tqtqtq
_________________________
Jumlah postingan ku makin banyak grin
coz banyak bertanya ndak pernah pinter2 laugh

Top
#25827 - 13 Jun 10 23:51 Re: <ask> Fsck otomatis ubuntu server [Re: zitux]
Rh354 Offline
Warga

Terdaftar: 14 Mar 10
Pesan: 714
Lokasi: between the truth and the lies
sepertinya cara ini yg bagus klo buat server..asumsinya server ga' pernah restart n K.O karena listrik n hanya di matikan pada saat maintenance...tp klo bolak balik restart itu yg kasian fsck mulu laugh
_________________________
OS : Slackware 13.1
Kernel : 2.6.35
CPU Type : i686
Processor : Intel Celeron M 1,4 GHz
Axioo Centaur series

============================
LEARN from yesterday,LIVE for today,and HOPE for tomorrow

Top
#25910 - 14 Jun 10 12:13 Re: <ask> Fsck otomatis ubuntu server [Re: Rh354]
c0jack Offline
Warga

Terdaftar: 12 Jan 10
Pesan: 739
Lokasi: Jogjakarta, Indonesia
default Ubuntu akan melakukan fsck setiap 30 kali bootup (CMIIW). untuk mengubahnya pake tune2fs. lebih lengkap googling aja yah, saya juga blom pernah pake soalnya grin grin grin


regards
c0jack
_________________________
"I'm not anti-social, I'm just not user friendly"

Top
#25913 - 14 Jun 10 12:26 Re: <ask> Fsck otomatis ubuntu server [Re: c0jack]
Rh354 Offline
Warga

Terdaftar: 14 Mar 10
Pesan: 714
Lokasi: between the truth and the lies
Kutip: c0jack
default Ubuntu akan melakukan fsck setiap 30 kali bootup (CMIIW). untuk mengubahnya pake tune2fs. lebih lengkap googling aja yah, saya juga blom pernah pake soalnya grin grin grin


regards
c0jack
iya bro tp ga' tau tu si bro zitux pengennya yg extrim...wekekekeke...

------------------------------------

Telling tune2fs when to do fsck
If errors are found on the file system, fsck will run no matter what. fsck will also run automatically after 30 mounts by default in Ubuntu. You can use tune2fs to increase the number of mounts and/or have it run after a certain amount of days.

fsck will run after 80 mounts:
tune2fs -c 80 /dev/HARDDRIVE

fsck will disregard the number of mounts:
tune2fs -c 0 /dev/HARDDRIVE

fsck will run after 3 days, 2 months and 1 week
tune2fs -i d3 m2 w1 /dev/HARDDRIVE

http://linux.die.net/man/8/tune2fs


diEdit oleh Rh354 (14 Jun 10 12:28)
_________________________
OS : Slackware 13.1
Kernel : 2.6.35
CPU Type : i686
Processor : Intel Celeron M 1,4 GHz
Axioo Centaur series

============================
LEARN from yesterday,LIVE for today,and HOPE for tomorrow

Top
#25921 - 14 Jun 10 12:40 Re: <ask> Fsck otomatis ubuntu server [Re: Rh354]
c0jack Offline
Warga

Terdaftar: 12 Jan 10
Pesan: 739
Lokasi: Jogjakarta, Indonesia
ada langkah antisipasi kalo listrik sering mati. pasang ups, install program nut(network ups tools). nut bisa mendeteksi jika power ups sudah masuk kategori low maka sistem akan di shutdown secara normal. perhatikan dalam pemilihan ups, karena tidak semua ups di support oleh nut. baca di sini untuk mengetahui apa saja merek dan tipe ups yang di support. semoga bermanfaat smile


regards,
c0jack
_________________________
"I'm not anti-social, I'm just not user friendly"

Top
#26333 - 16 Jun 10 01:15 Re: <ask> Fsck otomatis ubuntu server [Re: c0jack]
zitux Offline
Warga

Terdaftar: 16 Jan 10
Pesan: 866
Lokasi: Malang Jatim Indonesia
http://www.networkupstools.org/compat/stable.html

wuaaahh semua merk NIKISAE laugh
gak ada yg NIKIMURAH laugh laugh
ups saya ndak masuk kategori grin


diEdit oleh zitux (16 Jun 10 01:16)
_________________________
Jumlah postingan ku makin banyak grin
coz banyak bertanya ndak pernah pinter2 laugh

Top
#26340 - 16 Jun 10 01:42 Re: <ask> Fsck otomatis ubuntu server [Re: zitux]
zitux Offline
Warga

Terdaftar: 16 Jan 10
Pesan: 866
Lokasi: Malang Jatim Indonesia
tune2fs
Kutip:
If errors are found on the file system, fsck will run no matter what.

jika ditemukan error akan mulai proses fsck (scandisk) <---lebih pinter dari srcipt diatas kaya'nya

Kutip:

Availability

tune2fs is part of the e2fsprogs package and is available from http://e2fsprogs.sourceforge.net.

confused confused
jika bagian dari e2fsprogs(yg sudah bawaan Ubuntu) kenapa Ubuntu server gak bisa otomatis ya ? <<--- maksutnya otomatis fsck jika menemukan error
confused

klo Ubuntu desktop sudah sering nemuin otomatis nya ketika shutdown abnormal confused


diEdit oleh zitux (16 Jun 10 01:47)
_________________________
Jumlah postingan ku makin banyak grin
coz banyak bertanya ndak pernah pinter2 laugh

Top
#26350 - 16 Jun 10 02:28 Re: <ask> Fsck otomatis ubuntu server [Re: zitux]
zitux Offline
Warga

Terdaftar: 16 Jan 10
Pesan: 866
Lokasi: Malang Jatim Indonesia
jalan2 nemu ini
http://linux.die.net/man/8/e2fsck
yg membuat tertarik
Kutip:
-p
Automatically repair ("preen") the file system. This option will case e2fsck to automatically fix any filesystem problems that can be safely fixed without human intervention. If e2fsck discovers a problem which may require the system administrator to take additional corrective action, e2fsck will print a description of the problem and then exit with the value 4 logically or'ed into the exit code. (See the EXIT CODE section.) This option is normally used by the system's boot scripts. It may not be specified at the same time as the -n or -y options.


jadi pengin test dgn hasil
Kutip:
zitux@zitux:~$ e2fsck -p /dev/sda2
/dev/sda2 is mounted.

WARNING!!! The filesystem is mounted. If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.

Do you really want to continue (y/n)? no

check aborted.
zitux@zitux:~$


wuaahh warning nya pake tanda seru 3X laugh
gak berani sebelum tanya2 dulu grin

pertanyaan nya simple
1.jika filesystem nya tidak termount / partisi belum termount apakah aman ?(atau saya sendiri yg jadi tester nya laugh laugh )
2.jika saya ketik
Code:
e2fsck -p /dev/sda2[/quote]
apakah akan berjalan seterusnya ? (setiap kali ada error disk/shutdown abnormal)

3.haruskah comand
Code:
 e2fsck -p /dev/sda2 perlu ditambah dgn e2fsck -p -y /dev/sda2
yg berarti baca nya otomatis dan selalu jawan YA grin
binun ini confused laugh


diEdit oleh zitux (16 Jun 10 02:54)
_________________________
Jumlah postingan ku makin banyak grin
coz banyak bertanya ndak pernah pinter2 laugh

Top
#26355 - 16 Jun 10 02:49 Re: <ask> Fsck otomatis ubuntu server [Re: zitux]
Rh354 Offline
Warga

Terdaftar: 14 Mar 10
Pesan: 714
Lokasi: between the truth and the lies
http://pemula.linux.or.id/admin/crash.html


coba lakukan fsck pada saat boot live cd ato live fd bro...


diEdit oleh Rh354 (16 Jun 10 02:54)
_________________________
OS : Slackware 13.1
Kernel : 2.6.35
CPU Type : i686
Processor : Intel Celeron M 1,4 GHz
Axioo Centaur series

============================
LEARN from yesterday,LIVE for today,and HOPE for tomorrow

Top
#26356 - 16 Jun 10 03:41 Re: <ask> Fsck otomatis ubuntu server [Re: Rh354]
zitux Offline
Warga

Terdaftar: 16 Jan 10
Pesan: 866
Lokasi: Malang Jatim Indonesia
test pada flashdisk
Code:
root@zitux:/home/zitux# e2fsck -p /dev/sdb1
New_Volume: clean, 11/243840 files, 33627/975167 blocks
root@zitux:/home/zitux# e2fsck -a /dev/sdb1
New_Volume: clean, 11/243840 files, 33627/975167 blocks
root@zitux:/home/zitux# e2fsck -y /dev/sdb1
e2fsck 1.41.11 (14-Mar-2010)
New_Volume: clean, 11/243840 files, 33627/975167 blocks
root@zitux:/home/zitux# 

aman laugh

lanjut kepertanyaan ke 2 frown cara test nya gimana ya
klo comand diatas bisa jalan seterus nya ??


diEdit oleh zitux (16 Jun 10 03:42)
_________________________
Jumlah postingan ku makin banyak grin
coz banyak bertanya ndak pernah pinter2 laugh

Top


Moderator:  bleTux, bulugading, MasDjo, yudiarbi 
Download Ebook FUI
Ebook FUI
Uneg-Uneg Pengguna


Ubuntu 11.10 Oneiric
Versi Ubuntu terbaru segera hadir!
Ubuntu-Indonesia.com
di Facebook
Kamus Dwibahasa