Centos /etc/fstab Command Doesn't Mount After Restart

Hi

I am using Centos 6.5 and i am testing Glusterfs.

I have at /etc/hosts :

Code:
123.456.789.000 host1
000.987.654.321 host2

And they can ping each other and all working great...

Glusterfs requires this command:

Code:
mount host1:/gluster-vmstore /home/nginx/public -t glusterfs

and if i run it manually it works great.

But when i restart checking using df -h is gone and is not working until i run it again manualy

I found on a tutorial that this edit on /etc/fstab will work after restart:

Code:
host1:/gluster-vmstore /home/nginx/public glusterfs defaults 0 0

But after restarting it was not working

Any ideas?

Thanks


Similar Content



Centos 6.6 /etc/init.d/rc.local Doesn't Run The Command After Restart

Hi

I am using shinx and i have on instructions to execute a command after server restart from rc.local so i do this:

Code:
nano /etc/init.d/rc.local


end i add the command there save and exit:

Code:
/usr/local/bin/searchd --config /sphinxconfig/sphinx.conf

But when i restart is not running and it was fine on Centos 6.5

Then i run it manualy from ssh and all are fine ....

Any ideas why?

Thanks

Are These Two Mount Statements The Same

hi experts

I got an NFS mount that I want to make permanent. So I know I have to added it in etc/fstab. but all I have is the mount shown below:

Code:
mount test.com:/vol/myhome /home

correspondingly, I have googled a sample nfs mount entry for fstab and made this:

Code:
#in fstab
test.com:/vol/myhome    /home    nfs  rw,soft,intr    0       0

are they same? I mean like permission wise and everything?

Thanks

Mounting A USB For Vbox

I am installing VirtualBox on Centos per http://www.digitesters.com/centos-in...adless-system/, and I don't understand the very end. Seems like Line 5 is not needed as it is already done on Line 4, right?

Code:
# mkdir /data/virtual_machines/vbox/vbusbfs
# chown vboxuser.vboxusers /data/virtual_machines/vbox/vbusbfs
# chmod 775 /data/virtual_machines/vbox/vbusbfs
# echo "none /data/virtual_machines/vbox/vbusbfs usbfs rw,devgid=$(awk -F : '/vboxusers/ {print $3}' /etc/group),devmode=664 0 0" >> /etc/fstab
# echo "none /data/virtual_machines/vbox/vbusbfs usbfs rw,devgid=$(awk -F : '/vboxusers/ {print $3}' /etc/group),devmode=664 0 0" >> /etc/fstab
# mount -a

I executed the above script (except didn't execute Line 5, and my user:group is vbox:vbox and not vboxuser.vboxusers, and the folder is at /home/vbox and not /data/virtual_machines/vbox), and the following was added to /etc/fstab. Please explain what Line 4 did and what the below line in my fstab file means.
Code:
none /home/vbox/vbusbfs usbfs rw,devgid=496
504,devmode=664 0 0

I then executed mount -a, and got the following response. The part about /var/www/main/ayb_resources and /var/www/main/ayb_cache does not exist is probably some old stuff which I can get rid of, but I am particularly interested in "mount point 0 does not exist" as it seems to be related to the above.

Code:
[root@devserver vbox]# mount -a
mount: special device /var/www/main/ayb_resources does not exist
mount: special device /var/www/main/ayb_cache does not exist
mount: mount point 0 does not exist
[root@devserver vbox]#

My total fstab file is as follows:

Code:
[root@devserver vbox]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sat Apr 19 05:57:56 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
UUID=xxx-xxx-xxx-xxx-xxx /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_home  /home                  ext4    defaults        1 2
/dev/mapper/VolGroup-lv_mysql /var/lib/mysql         ext3    barrier=0       1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/home/public/lib /var/www/main_lib/ayb_application/lib none bind
/var/www/main/html /var/www/main_lib/html none bind
/var/www/main/ayb_resources /var/www/main_lib/ayb_resources none bind
/var/www/main/ayb_cache /var/www/main_lib/ayb_cache none bind
none /home/vbox/vbusbfs usbfs rw,devgid=496
504,devmode=664 0 0
[root@devserver vbox]# mount -a
mount: special device /var/www/main/ayb_resources does not exist
mount: special device /var/www/main/ayb_cache does not exist
mount: mount point 0 does not exist
[root@devserver vbox]#

Mount Error 115 On Some Shares

Hi there guys,

I hope you can help me with a small issue that is kinda driving me crazy.
I'm running debian wheezy on a virtual machine and trying to mount some shares from the win8.1 host.
The lines I put in the /etc/fstab a
Code:
//192.168.0.10/dir1 /home/user/dir1 cifs credentials=/root/.secret.pwd,uid=1000,gid=1000,file_mode=0777,dir_mode=0777,iocharset=utf8,sec=ntlm 0 0
//192.160.0.10/dir2 /home/user/dir2 cifs credentials=/root/.secret.pwd,uid=1000,gid=1000,file_mode=0777,dir_mode=0777,iocharset=utf8,sec=ntlm 0 0
//192.160.0.10/dir3 /home/user/dir3 cifs credentials=/root/.secret.pwd,uid=1000,gid=1000,file_mode=0777,dir_mode=0777,iocharset=utf8,sec=ntlm 0 0

The first share gets mounted correctly, but not the other two.
This is the output I get when sudo-ing a mount -a:
Code:
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

and this is what /var/log/syslog shows:
Code:
Mar 24 12:56:12 hostname kernel: [ 1887.029043] CIFS VFS: Error connecting to socket. Aborting operation
Mar 24 12:56:12 hostname kernel: [ 1887.030013] CIFS VFS: cifs_mount failed w/return code = -115
Mar 24 12:56:22 hostname kernel: [ 1897.052130] CIFS VFS: Error connecting to socket. Aborting operation
Mar 24 12:56:22 hostname kernel: [ 1897.053885] CIFS VFS: cifs_mount failed w/return code = -115

The same happens at boot time.

Now, the crazy thing is that if I run manually a:
Code:
sudo mount //192.168.0.10/dir2 /home/user/dir2 -t cifs -o credentials=/root/.secret.pwd,uid=1000,gid=1000

it works perfectly.

Now, I'm no power user, but I thought I'd be able to manage a couple of simple cifs shares...but then again I guess not
So, my questions so far a
1. how the heck do I make that work?
2. why is it not working? Might be the security? Should I choose perhaps ntlmv2? I read a bit around but I don't know this kind of security mechanisms, so...
3. why on earth is the first mount working just like a charm and not the other two?

You know what? I'm trying now to remove the sec option from the fstab, and see how that works out.

In the meantime, if anyone could lend a hand I'd appreciate it very much

Command Manual Working But Not On Cron

Hi

When i run this command manually on Centos 6.6 it works:

Code:
/usr/bin/find /backup/ -type d -mtime +1 -print0 | xargs -0 rm -rf

but as a cron job it doesn't as i can see a folder with files there from Mar 28:

Code:
55 5 * * * /usr/bin/find /backup/ -type d -mtime +1 -print0 | xargs -0 rm -rf

And here are the logs from cron that it is executing this at the correct time :

Code:
Mar 30 05:55:01 server CROND[9526]: (root) CMD (/usr/bin/find /backup/ -type d -mtime +1 -print0 | xargs -0 rm -rf)

Any ideas why?

Thanks

Problems With Mounting Drive At Boot

Hi,

I have problems mounting my second drive at boot automatically.
(sorry i am a noob)

When i use the mount command, it works fine.
Code:
mount -t ext3 /dev/sdb2 /mnt/HD/HD_b2

But when i try to add one if the following lines to /etc/fstab
It will not mount the drive at boot or with Code:
mount -a

, also fstab is empty afer reboot (normal??)

Code:
/dev/sdb2 /mnt/HD/HD_b2 ext3 defaults,errors=remount-ro 0 1

Code:
UUID=553afede-fa45-4cdc-9972-c0a9aa899509 /mnt/HD/HD_b2 ext3 errors=remount-ro 0 1

Code:
/dev/sdb2 /mnt/HD/HD_b2 ext3 rw 0 0

Code:
/dev/sdb2 /mnt/HD/HD_b2 ext3 defaults 0 1

output blkid:

Code:
/dev/sda1: UUID="e67e5c15-7b8b-9389-c311-e5d4c61326f9" TYPE="linux_raid_member"
/dev/sda2: UUID="09e0e365-0aa6-4214-b571-2bc6b027fd9f" TYPE="ext3"
/dev/sda4: UUID="64038414-136c-4939-bd14-9871a20290bd" TYPE="ext3"
/dev/sdb1: UUID="e67e5c15-7b8b-9389-c311-e5d4c61326f9" TYPE="linux_raid_member"
/dev/sdb2: UUID="553afede-fa45-4cdc-9972-c0a9aa899509" TYPE="ext3"
/dev/sdb4: UUID="bf594be6-ffb6-469d-a3a8-246be66a4d90" TYPE="ext2"

/etc/mtab:

Code:
rootfs / rootfs rw 0 0
/dev/root / ext2 rw,relatime,errors=continue 0 0
sysfs /sys sysfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
squash /usr/local/tmp ramfs rw,relatime,size=38m 0 0
/dev/loop0 /usr/local/modules squashfs ro,relatime 0 0
/dev/mtdblock5 /usr/local/config jffs2 rw,relatime 0 0
/dev/sda4 /mnt/HD_a4 ext3 rw,relatime,errors=continue,data=writeback 0 0
/dev/sdb4 /mnt/HD_b4 ext2 rw,relatime,errors=continue 0 0
none /proc/bus/usb usbfs rw,relatime 0 0
/dev/sda2 /mnt/HD/HD_a2 ext3 rw,relatime,errors=continue,user_xattr,data=writeb$
/dev/sdb2 /mnt/HD/HD_b2 ext3 rw,relatime,errors=continue,user_xattr,data=writeb$
/dev/sda2 /mnt/HD/HD_a2/squeeze/mnt/HD/HD_a2 ext3 rw,relatime,errors=continue,u$
/dev/root /mnt/HD/HD_a2/squeeze/mnt/root ext2 rw,relatime,errors=continue 0 0
/dev/root /mnt/HD/HD_a2/squeeze/dev ext2 rw,relatime,errors=continue 0 0
sysfs /mnt/HD/HD_a2/squeeze/sys sysfs rw,relatime 0 0
proc /mnt/HD/HD_a2/squeeze/proc proc rw,relatime 0 0

When mount command is used Code:
mount -t ext3 /dev/sdb2 /mnt/HD/HD_b2

The following line is added to mstab -->
Code:
/dev/sdb2 /mnt/HD/HD_b2 ext3 rw 0 0

I diont know what i am doing wrong, mount for HD_a2 works fine (other disk, worked at default), i hav e NAS DNS-325 where i installed Debian on. I used this tutorial to install debian.

The strange thing is, i had to reinstall my NAS, and befor it worked fine after i had installed debian 2 years ago, i just dont remeber how i fixed this.

Can't Set Repos In RHEL6.0, Unable To Install Packages

Hi all.
RHEL 6.0 in Virtual Box, network is ok, it can resolve all repos (f.e. dl.fedoraproject.org, nginx.org),
but when I'm trying
Code:
# rpm -Uvh http://nginx.org/packages/rhel/6/noarch/RPMS/nginx-release-rhel-6-0.el6.ngx.noarch.rpm

I get:
Code:
curl: (6) Couldn't resolve host

When I'm trying with ip instead name:
Code:
curl: (22) The requested URL returned error: 404

Only rpmforge repo enabled, but it can't find any packets for install/update.

What can I do?
Thanks.

CentOS 7 - Not Able To Open Vmplayer

I have CentOS 7 64 bit. I have installed open-vm-tools on it.
I have installed vmplayer using
Code:
./VMware-Player-6.0.1-1379776.x86_64.bundle

Now when I try to open vmplayer on it, it does not load 'Virtual Network Device'
and shows error in terminal
Code:
Failed to build vmnet.  Failed to execute the build command.

When I check status of vmware, it shows
Code:
Module vmnet not loaded

If I try to run
Code:
vmware-modconfig --console --install-all

It gives me following error.
Code:
make: Leaving directory `/tmp/modconfig-2NfFeS/vmnet-only'
Unable to install all modules.

I am not able to open VMplayer, please help me to open it.

Thanks

--Kind Regards
Sam

Help Mounting A CD-R/DVD-R, Then Using Dd To Write To Them.

I can't seem to mount a CD-R or DVD-R, doesn't matter if it is blank or not.
However, when I use a program such as Brasero, I am able to write to them. I cannot use dd to write to them.

This is the output of trying to mount/unmount.
Code:
root@delarocha-> mount /dev/sr0 /media/cd
mount: /dev/sr0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sr0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so.

root@delarocha-> umount /dev/sr0
umount: /dev/sr0: not mounted
root@delarocha-> umount /media/cd
umount: /media/cd: not mounted
root@delarocha-> umount /media/cdrom
umount: /media/cdrom: not mounted

dmesg | tail
Code:
root@delarocha-> dmesg | tail
[ 1536.299777] sr 1:0:0:0: [sr0]  
[ 1536.299804] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1536.299809] sr 1:0:0:0: [sr0]  
[ 1536.299814] Sense Key : Illegal Request [current] 
[ 1536.299820] sr 1:0:0:0: [sr0]  
[ 1536.299824] Add. Sense: Logical block address out of range
[ 1536.299829] sr 1:0:0:0: [sr0] CDB: 
[ 1536.299832] Read(10): 28 00 00 00 00 00 00 00 01 00
[ 1536.299846] end_request: I/O error, dev sr0, sector 0
[ 1536.299915] EXT4-fs (sr0): unable to read superblock

I don't think it can be anything wrong with the disk, since it is a untouched disk.
Note: The results of everything(apart from dmesg I would assume), are the same for a CD-R and DVD-R

This is what I get while trying to dd a .iso and .mp4, respectively.

Code:
web@delarocha-> dd if=/dev/sr0 of=~/Downloads/xubuntu-14.04.1-desktop-amd64.iso
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000377316 s, 0.0 kB/s

Code:
web@delarocha-> dd if=/dev/sr0 of=~/Videos/The\ Hobbit/The\ Hobbit\ The\ Desolation\ of\ Smaug.mp4
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000377179 s, 0.0 kB/s

uname -a
Code:
Linux delarocha 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x86_64 GNU/Linux

When I used lsblk when I close the disk tray, it shows it mounted.
Code:
sr0                     11:0    1     2K  0 rom

But after I use the dd command to write the .iso, it disappears.

Here is my /etc/fstab
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/delarocha-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=5bbedec0-6e3d-4185-91e0-292a72585908 /boot           ext2    defaults        0       2
/dev/mapper/delarocha-swap_1 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0

I have also tried replacing /dev/sr0 in the above commands with /media/cdrom0.

Why Should I Always Use Chmod When Not As A Root User

System Info:

I have normal user in CentOS 7 whose name is "mostafa" (the name of the account).

I naturally have another user called root with all privileges. User "mostafa" is put into sudoers file, too.

The OS is installed in VmWare, so the system is all mine.

Problem:

Now I create a file with touch file.sh and put a command in it, but when I want to run it with Code:
sudo ./file.sh

, an error is shown that the command Code:
./file.sh

does not exist. But if I Code:
 sudo chmod 777 ./file.sh

then it gets run. My question is that, why should I use Code:
chmod 777

when I myself have created the file, and I am in sudoers.

Can anyone explain me why shuold I still use Code:
sudo chmod 777

when the creator of the file is me.