Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
df si è perso le partizioni [risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
rb34
Guru
Guru


Joined: 03 Oct 2004
Posts: 361
Location: Rome, italy

PostPosted: Sat Oct 17, 2009 11:16 am    Post subject: df si è perso le partizioni [risolto] Reply with quote

Ciao. Non so cosa esattamente ho fatto, ma fino a ieri df mi dava il consueto output (device e partizioni associate), ora ho questo:
Code:
# /bin/df
Filesystem        blocchi di   1K   Usati Disponib. Uso% Montato su
rootfs                  186663    165823     11203  94% /
/dev/root               186663    165823     11203  94% /
udev                     10240       216     10024   3% /dev

Ma che è successo?
Il sistema funziona regolarmente, fdisk -l vede i device (vedi sotto), posso montare le partizioni a mano normalmente. Ma vorrei risistemare le cose, temendo guai più profondi del solo df.
Non so cosa controllare, please help.
Code:
 # /sbin/fdisk -l

Disco /dev/sda: 80.0 GB, 80026361856 byte

255 testine, 63 settori/tracce, 9729 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Identificativo disco: 0xbf2354c3

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2432    19535008+   7  HPFS/NTFS
/dev/sda2            2433        8552    49158900    5  Esteso
/dev/sda3   *        8553        9016     3727080   83  Linux
/dev/sda4            9017        9729     5727172+  83  Linux
/dev/sda5            2433        6079    29294496    b  W95 FAT32
/dev/sda6   *        6080        6083       32098+  83  Linux
/dev/sda7            6084        6107      192748+  83  Linux
/dev/sda8            6108        6169      497983+  83  Linux
/dev/sda9            6170        6231      497983+  83  Linux
/dev/sda10           6232        6596     2931831   83  Linux
/dev/sda11           6597        7812     9767488+  83  Linux
/dev/sda12           7813        7958     1172713+  83  Linux
/dev/sda13           7959        8444     3903763+  83  Linux
/dev/sda14           8445        8552      867478+  83  Linux

_________________
rb


Last edited by rb34 on Sun Oct 18, 2009 4:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Sat Oct 17, 2009 11:26 am    Post subject: Reply with quote

Posta il contenuto di /etc/fstab.
_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
riverdragon
Veteran
Veteran


Joined: 14 Sep 2006
Posts: 1269
Location: Verona

PostPosted: Sat Oct 17, 2009 11:46 am    Post subject: Reply with quote

E il risultato di mount
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Sat Oct 17, 2009 12:04 pm    Post subject: Reply with quote

Se non ricordo male df prende esclusivamente le partizioni in /etc/mtab controlla cosa c'è li e perchè non viene aggiornato.
Oppure modifica tutte le istruzioni di mount nell'init aggiungendo -n e crea mtab come link simbolico a /proc/mounts
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
rb34
Guru
Guru


Joined: 03 Oct 2004
Posts: 361
Location: Rome, italy

PostPosted: Sat Oct 17, 2009 12:31 pm    Post subject: Reply with quote

Allora, fstab è a posto, posto un pezzetto
Code:
/dev/sda7   /               ext3         noatime               0 1
/dev/sda9   /ccache            reiserfs        defaults,noatime        1 2
/dev/sda10   /var               ext3           defaults                1 2
/dev/sda11   /usr               ext3            defaults,noatime      1 2
/dev/sda8   /usr/portage       reiserfs        defaults,noatime        1 2

mount dice:
Code:
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,noatime,errors=continue,data=ordered)
proc on /proc type proc (rw,nosuid,nodev,noexec)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw,nosuid,noexec,devgid=85,devmode=664)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec)

mtab
Code:
# cat /etc/mtab
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,noatime,errors=continue,data=ordered 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,nosuid,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw,nosuid,noexec,devgid=85,devmode=664 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec 0 0

/proc/mounts
Code:
# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 ro,errors=continue,data=ordered 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,nosuid,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,gid=5,mode=620 0 0
/dev/sda4 /mnt/gentoo-backup ext3 rw,errors=continue,data=ordered 0 0
/dev/sda5 /mnt/data vfat rw,nosuid,nodev,noexec,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,quiet 0 0
/dev/sda9 /ccache reiserfs rw,noatime 0 0
/dev/sda10 /var ext3 rw,errors=continue,data=ordered 0 0
/dev/sda11 /usr ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/sda8 /usr/portage reiserfs rw,noatime 0 0
/dev/sda12 /tmp ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/sda13 /home ext3 rw,errors=continue,data=ordered 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
usbfs /proc/bus/usb usbfs rw,nosuid,noexec,devgid=85,devmode=664 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec 0 0



morale, mtab non va, chi è che aggiorna mtab??
_________________
rb
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Sat Oct 17, 2009 3:55 pm    Post subject: Reply with quote

mtab puoi aggiornartelo tu a manina oppure
man mount wrote:
It is possible to replace /etc/mtab
by a symbolic link to /proc/mounts, and especially when you have very large numbers of mounts
things will be much faster with that symlink, but some information is lost that way, and in par-
ticular working with the loop device will be less convenient, and using the "user" option will
fail.

_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
rb34
Guru
Guru


Joined: 03 Oct 2004
Posts: 361
Location: Rome, italy

PostPosted: Sat Oct 17, 2009 4:19 pm    Post subject: Reply with quote

Kernel78 wrote:
mtab puoi aggiornartelo tu a manina oppure
man mount wrote:
It is possible to replace /etc/mtab
by a symbolic link to /proc/mounts


Sì, ok, e ci proverò, però, siccome mi pare che mtab sia aggiornato a ogni boot, riavviando (stile windows :) ) mi aspettavo che tornasse a posto! E invece no! Insomma, mi piaceva sapere chi è che al boot genera mtab
_________________
rb
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Sat Oct 17, 2009 4:31 pm    Post subject: Reply with quote

rb34 wrote:
Kernel78 wrote:
mtab puoi aggiornartelo tu a manina oppure
man mount wrote:
It is possible to replace /etc/mtab
by a symbolic link to /proc/mounts


Sì, ok, e ci proverò, però, siccome mi pare che mtab sia aggiornato a ogni boot, riavviando (stile windows :) ) mi aspettavo che tornasse a posto! E invece no! Insomma, mi piaceva sapere chi è che al boot genera mtab

man mount wrote:
The programs mount and umount maintain a list of currently mounted file systems in the file
/etc/mtab.
facciamo che dai una lettura al manuale di mount prima di postare il prossimo messaggio :wink:
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Oct 18, 2009 5:43 am    Post subject: Reply with quote

Kernel78 wrote:

rb34 wrote:

Sì, ok, e ci proverò, però, siccome mi pare che mtab sia aggiornato a ogni boot, riavviando (stile windows :) ) mi aspettavo che tornasse a posto! E invece no! Insomma, mi piaceva sapere chi è che al boot genera mtab

man mount ha scritto:
facciamo che dai una lettura al manuale di mount prima di postare il prossimo messaggio :wink:

secondo me la curiosità di rb34 è lecita.
infatti, il comportamento del sistema al boot è cambiato ultimamente a causa degli script di openrc, non a causa di mount.
le modifiche si possono comprendere leggendo /etc/init.d/mtab
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Sun Oct 18, 2009 11:32 am    Post subject: Reply with quote

cloc3 wrote:
le modifiche si possono comprendere leggendo /etc/init.d/mtab

mi sarebbe piaciuto approfondire ma io non ho questo file ...
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
oRDeX
Veteran
Veteran


Joined: 19 Oct 2003
Posts: 1325
Location: Italy

PostPosted: Sun Oct 18, 2009 12:25 pm    Post subject: Reply with quote

Code:
start()
{
        # /etc/mtab could be a symlink to /proc/mounts
        if [ ! -w /etc/mtab -a -L /etc/mtab ]; then
                eeinfo "Skipping mtab update (non writeable symlink)"
                return 0
        fi

        ebegin "Updating /etc/mtab"
        if ! echo 2>/dev/null >/etc/mtab; then
                ewend 1 "/etc/mtab is not updateable"
                return 0
        fi

        # With / as tmpfs we cannot umount -at tmpfs in localmount as that
        # makes / readonly and dismounts all tmpfs even if in use which is
        # not good. Luckily, umount uses /etc/mtab instead of /proc/mounts
        # which allows this hack to work.
        grep -v "^[^ ]* / tmpfs " /proc/mounts > /etc/mtab

        # Remove stale backups
        rm -f /etc/mtab~ /etc/mtab~~
        eend 0
}

divertitevi 8)
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Sun Oct 18, 2009 2:03 pm    Post subject: Reply with quote

quindi a parte il mio dubbio sul perchè a me manchi quel file rimane il fatto che non è che fa molto altro se non mettere tutto quello che trova in /proc/mounts (e non è tmpfs) in /etc/mtab ...
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
rb34
Guru
Guru


Joined: 03 Oct 2004
Posts: 361
Location: Rome, italy

PostPosted: Sun Oct 18, 2009 3:04 pm    Post subject: Reply with quote

non mi ero accorto del VERO problema!! /etc (che sta su /, partizione a sé) mi è diventato read-only!
Ho mtab.fuselock in etc, e guardate qua
Code:
# rm /etc/mtab.fuselock
rm: impossibile rimuovere `/etc/mtab.fuselock': Read-only file system


Code:
# ls -la /etc/ -d
drwxr-xr-x 105 root root 5120 17 ott 02:01 /etc/


non so, lancio un e2fsck? mah, non so davvero come sia successo
_________________
rb
Back to top
View user's profile Send private message
oRDeX
Veteran
Veteran


Joined: 19 Oct 2003
Posts: 1325
Location: Italy

PostPosted: Sun Oct 18, 2009 3:15 pm    Post subject: Reply with quote

provi a fare un "remount" e metti / in rw? Ma puoi riavviare queta macchina?
Back to top
View user's profile Send private message
rb34
Guru
Guru


Joined: 03 Oct 2004
Posts: 361
Location: Rome, italy

PostPosted: Sun Oct 18, 2009 4:15 pm    Post subject: Reply with quote

oRDeX wrote:
provi a fare un "remount" e metti / in rw? Ma puoi riavviare queta macchina?

Che mi risulti non si può rimontare la root, se montata.
Comunque, ehm, potrei cancellare l'intero thread? :)
Avevo toccato fstab, e non so come diavolo mi era finito uno slash all'inizio di una riga, e la root veniva montata readonly. Per cui, nessuno poteva aggiornare mtab, ecco quello che intendevo con le mie domande.
Ero avvisato al boot da un warning di formato errato su una riga di fstab, ma non l'avevo visto!
E dando "dmesg" non ho ritrovato quel'errore. Qualcuno mi sa dire se dovrebbe esser stato riportato in qualche file di log?
Ho editato fstab partendo da un cd di boot e sistemato le cose.
_________________
rb
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Mon Oct 19, 2009 9:58 am    Post subject: Reply with quote

rb34 wrote:
Che mi risulti non si può rimontare la root, se montata.
8O :?:
in ogni script di init:
mount -o remount,rw /

rb34 wrote:
Comunque, ehm, potrei cancellare l'intero thread? :)
assolutamente no

il mio suggerimento era riferito al vecchio init (si vede che sono un fastasma) ma se hai openrc forse è il caso di usare il link simbolico, torna molto più utile.

rb34 wrote:
/dev/root / ext3 ro,errors=continue,data=ordered 0 0
/dev/sda4 /mnt/gentoo-backup ext3 rw,errors=continue,data=ordered 0 0
/dev/sda10 /var ext3 rw,errors=continue,data=ordered 0 0
/dev/sda11 /usr ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/sda12 /tmp ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/sda13 /home ext3 rw,errors=continue,data=ordered 0 0
rb34 wrote:
Ho editato fstab partendo da un cd di boot e sistemato le cose.
8O :? leggiti bene il manuale di mount :wink:
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
rb34
Guru
Guru


Joined: 03 Oct 2004
Posts: 361
Location: Rome, italy

PostPosted: Tue Oct 20, 2009 4:13 pm    Post subject: Reply with quote

djinnZ wrote:
in ogni script di init:
mount -o remount,rw /

Ok, non l'avevo mai fatto e ultimamente avevo letto dei post che dicevano che non si poteva fare. Non so, forse avevano qualche altro problema

rb34 wrote:
/dev/root / ext3 ro,errors=continue,data=ordered 0 0

Mah, vedevo che errors può essere continue o remount-ro o panic... e mi chiedevo: il mio errore nell'fstab, l'ha considerato un "error"? E supponendo di sì, considerato che / è stata montata ro, quale è la differenza tra "remount-ro" e continue? (il manuale l'ho guardato, alla sez. errors, ma rimane un po' generico)
_________________
rb
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Tue Oct 20, 2009 6:18 pm    Post subject: Reply with quote

l'opzione non riguarda il mount (se il filesystem è in errore abbastanza grave o l'errore non è corregibile automaticamente viene montato ro a prescindere ma questa è una gestione dell'init) ma se l'errore si presenta a runtime.
Avere un kernel panic ogni volta che c'è un timeout potrebbe essere estremamente seccante lavorando su unità usb 1.0 o su macchine molto vecchie e datate ma continuare a scrivere impunemente in caso di errore di scrittura o di mancanza di integrità degli inode mi pare un tantino suicida.

Usa remout-ro almeno (panic solo per unità con dati a cui tieni per davvero e che richiedono scrittura per forza).

è l'inverso, il remount ro che non si può fare se qualche zombie ha dei descrittori aperti sul filesystem. Oppure alcuni filesystem non lo rendono agevole in caso sia necessario un intervento di correzione come per l'errore 990 di xfs e jfs o la direttiva force di ntfs3g (anche se mi farebbe più comodo poterla montare in automatico ro quando è dirty) etc.
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) 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