Permissão negada: por que não é possível iniciar o mongodb em / dev / sda4?

1

O dispositivo de bloco atribui informações no meu sda.

sudo blkid
/dev/sda1: UUID="7E91-CA50" TYPE="vfat" PARTLABEL="win10" PARTUUID="b30fb21a-0b23-41fb-bed5-ad42ce287770"
/dev/sda2: UUID="6512f5f3-d574-49dd-a5ba-572795df8792" TYPE="ext4" PARTLABEL="debian" PARTUUID="eeca8d16-53cb-4b3e-9cb1-c335d34f8c22"
/dev/sda3: UUID="6434a352-35e0-46d9-b0a2-da724c91639f" TYPE="ext4" PARTLABEL="centos" PARTUUID="12f64023-b42e-48ce-a0d2-edb13625db9b"
/dev/sda4: UUID="0cba040e-d9da-4285-b70e-b2a9b5290a1c" TYPE="ext4" PARTLABEL="arch" PARTUUID="99e49e99-fdf2-4636-95b4-13dccde7dbca"
/dev/sda5: UUID="6a55c9fc-a1c6-4285-8763-093b9a715e4c" TYPE="swap" PARTLABEL="swap" PARTUUID="c4634793-b5e4-4c3a-abc8-a07dd0bd21fd"

Eu quero montar / mongodb em / dev / sda4 cujo uuid é 0cba040e-d9da-4285-b70e-b2a9b5290a1c .
Para adicionar a seguinte linha no meu / etc / fstab.

UUID=0cba040e-d9da-4285-b70e-b2a9b5290a1c  /mongodb        ext4    rw,auto     0 1

Para ls / mongodb após a reinicialização.

debian@wifi:~$ ls -alR   /mongodb
/mongodb:
total 28
drwxr-xr-x  4 debian debian  4096 Aug 31 19:57 .
drwxr-xr-x 24 root   root    4096 Aug 31 09:27 ..
drwxr-xr-x  2 debian debian  4096 Aug 31 19:57 log
drwx------  2 root   root   16384 Aug 31 09:25 lost+found

/mongodb/log:
total 8
drwxr-xr-x 2 debian debian 4096 Aug 31 19:57 .
drwxr-xr-x 4 debian debian 4096 Aug 31 19:57 ..
-rw-r--r-- 1 debian debian    0 Aug 31 19:57 mongodb.log
ls: cannot open directory /mongodb/lost+found: Permission denied

df -h /mongodb
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda4        46G   52M   44G   1% /mongodb
debian@wifi:~$ tree  /mongodb
/mongodb
├── log
│   └── mongodb.log
└── lost+found [error opening dir]

2 directories, 1 file
debian@wifi:~$ sudo service mongo  start
Failed to start mongo.service: Unit mongo.service failed to load: No such file or directory.
debian@wifi:~$ sudo service mongodb   start
debian@wifi:~$ sudo service mongodb   status
● mongodb.service - An object/document-oriented database
   Loaded: loaded (/lib/systemd/system/mongodb.service; enabled)
   Active: failed (Result: exit-code) since Thu 2017-08-31 19:59:46 EDT; 2s ago
     Docs: man:mongod(1)
  Process: 1873 ExecStart=/usr/bin/mongod --config /etc/mongodb.conf (code=exited, status=1/FAILURE)
 Main PID: 1873 (code=exited, status=1/FAILURE)

Aug 31 19:59:46 wifi mongod[1873]: all output going to: /mongodb/log/mongodb.log
Aug 31 19:59:46 wifi mongod[1873]: can't open [/mongodb/log/mongodb.log] for log file: errno:13 Permission denied
Aug 31 19:59:46 wifi mongod[1873]: Bad logpath value: "/mongodb/log/mongodb.log"; terminating.
Aug 31 19:59:46 wifi systemd[1]: mongodb.service: main process exited, code=exited, status=1/FAILURE
Aug 31 19:59:46 wifi systemd[1]: Unit mongodb.service entered failed state.

Por que não pode iniciar o mongodb?

    
por it_is_a_literature 31.08.2017 / 17:43

1 resposta

2

Parece que já está montado homem; lost + found é o diretório EXT4 para o arquivo recuperado que o fsck encontrou ao iniciá-lo para problemas de FS

Então, em poucas palavras, você já montou seu FS. Tente postar um:

df -h /mongodb
    
por 31.08.2017 / 17:59

Tags