1

Тема: mount

всем привет!

Пытаюсь сделать
# mount /dev/sdb1 /var/ftp/
mount: /dev/sdb1 already mounted or /var/ftp/ busy

# umount /var/ftp/
umount: /var/ftp/: not mounted

# umount /dev/sdb1
umount: /dev/sdb1: not mounted

Пробую смонтировать в другой каталог

# mount /dev/sdb1 /var/x/
mount: /dev/sdb1 already mounted or /var/x/ busy

vi /etc/fstab

LABEL=/                 /                       ext3    defaults        1 1
LABEL=/home             /home                   ext3    defaults        1 2
LABEL=FTP               /var/ftp                ext3    defaults        2 1
LABEL=TFTPBOOT          /tftpboot               ext3    defaults        1 2
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
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
/var/ftp/iso/rhel-server-5.5-x86_64-dvd.iso /var/ftp/pub/rhel-server-5.5-x86_64 iso9660 loop,ro 1 2
/var/ftp/iso/CentOS-5.5-x86_64-bin-DVD-1of2.iso /var/ftp/pub/CentOS-5.5-x86_64-bin-DVD-1of2 iso9660 loop,ro 1 2

# cat /proc/mounts

rootfs / rootfs rw 0 0
/dev/root / ext3 rw,data=ordered 0 0
/dev /dev tmpfs rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
none /selinux selinuxfs rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/sda3 /home ext3 rw,data=ordered 0 0
/dev/sda5 /tftpboot ext3 rw,data=ordered 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
/proc /var/lib/named/proc proc rw 0 0
/dev/root /var/lib/named/var/run/dbus ext3 rw,data=ordered 0 0

# lsof /var/ftp
результат пустая строка

# grep -v rootfs /proc/mounts

/dev/root / ext3 rw,data=ordered 0 0
/dev /dev tmpfs rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
none /selinux selinuxfs rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/sda3 /home ext3 rw,data=ordered 0 0
/dev/sda5 /tftpboot ext3 rw,data=ordered 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
/proc /var/lib/named/proc proc rw 0 0
/dev/root /var/lib/named/var/run/dbus ext3 rw,data=ordered 0 0
[root@vali var]# 

# mount | grep sdb1

# mount | grep ftp
/dev/sda5 on /tftpboot type ext3 (rw)
результат пустая строка

fdisk -l

Disk /dev/sdb: 64.4 GB, 64424509440 bytes
64 heads, 32 sectors/track, 61440 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       61440    62914544   83  Linux

# mount -a

mount: /dev/sdb1 already mounted or /var/ftp busy
/var/ftp/iso/rhel-server-5.5-x86_64-dvd.iso: No such file or directory
/var/ftp/iso/CentOS-5.5-x86_64-bin-DVD-1of2.iso: No such file or directory

народ помогите пожалуйста, примонтировать mount /dev/sdb1 /var/ftp/
знаю что проблема решиться обычным ребутом сервера, но его перезагружать нельзя (((

2

Re: mount

В момент монтирования в какой папке находитесь?

3

Re: mount

# cd /
# mount -a
mount: /dev/sdb1 already mounted or /var/ftp busy
/var/ftp/iso/rhel-server-5.5-x86_64-dvd.iso: No such file or directory
/var/ftp/iso/CentOS-5.5-x86_64-bin-DVD-1of2.iso: No such file or directory

Добавлено: 17-05-2012 15:40:47

Вот трассировка монтирования...

# strace mount /dev/sdb1 /var/ftp/
execve("/bin/mount", ["mount", "/dev/sdb1", "/var/ftp/"], [/* 24 vars */]) = 0
brk(0)                                  = 0x64e1000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5483148000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5483149000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=98971, ...}) = 0
mmap(NULL, 98971, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b548314a000
close(3)                                = 0
open("/lib64/libblkid.so.1", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3205\200\2726\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=43808, ...}) = 0
mmap(0x36ba800000, 2136864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x36ba800000
mprotect(0x36ba809000, 2093056, PROT_NONE) = 0
mmap(0x36baa08000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x36baa08000
close(3)                                = 0
open("/lib64/libuuid.so.1", O_RDONLY)   = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\25\340\3106\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=17936, ...}) = 0
mmap(0x36c8e00000, 2110624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x36c8e00000
mprotect(0x36c8e04000, 2093056, PROT_NONE) = 0
mmap(0x36c9003000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x36c9003000
close(3)                                = 0
open("/lib64/libselinux.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340E@\2736\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=95464, ...}) = 0
mmap(0x36bb400000, 2192800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x36bb400000
mprotect(0x36bb415000, 2097152, PROT_NONE) = 0
mmap(0x36bb615000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x36bb615000
mmap(0x36bb617000, 1440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x36bb617000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\332\301\2716\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1718232, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5483163000
mmap(0x36b9c00000, 3498328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x36b9c00000
mprotect(0x36b9d4d000, 2097152, PROT_NONE) = 0
mmap(0x36b9f4d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14d000) = 0x36b9f4d000
mmap(0x36b9f52000, 16728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x36b9f52000
close(3)                                = 0
open("/lib64/libdevmapper.so.1.02", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000P@\2726\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=154640, ...}) = 0
mmap(0x36ba400000, 2247520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x36ba400000
mprotect(0x36ba423000, 2097152, PROT_NONE) = 0
mmap(0x36ba623000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23000) = 0x36ba623000
close(3)                                = 0
open("/lib64/libdl.so.2", O_RDONLY)     = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\16\0\2726\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=23360, ...}) = 0
mmap(0x36ba000000, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x36ba000000
mprotect(0x36ba002000, 2097152, PROT_NONE) = 0
mmap(0x36ba202000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x36ba202000
close(3)                                = 0
open("/lib64/libsepol.so.1", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@=\200\2736\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=247496, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5483164000
mmap(0x36bb800000, 2383168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x36bb800000
mprotect(0x36bb83b000, 2097152, PROT_NONE) = 0
mmap(0x36bba3b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3b000) = 0x36bba3b000
mmap(0x36bba3c000, 40256, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x36bba3c000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5483165000
arch_prctl(ARCH_SET_FS, 0x2b5483165780) = 0
mprotect(0x36b9f4d000, 16384, PROT_READ) = 0
mprotect(0x36b9a1c000, 4096, PROT_READ) = 0
mprotect(0x36ba202000, 4096, PROT_READ) = 0
munmap(0x2b548314a000, 98971)           = 0
access("/etc/selinux/", F_OK)           = 0
brk(0)                                  = 0x64e1000
brk(0x6502000)                          = 0x6502000
open("/etc/selinux/config", O_RDONLY)   = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=513, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b548314a000
read(3, "# This file controls the state o"..., 4096) = 513
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x2b548314a000, 4096)            = 0
open("/proc/mounts", O_RDONLY)          = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b548314a000
read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 1024) = 961
close(3)                                = 0
munmap(0x2b548314a000, 4096)            = 0
open("/selinux/mls", O_RDONLY)          = 3
read(3, "1", 19)                        = 1
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
connect(3, {sa_family=AF_FILE, path="/var/run/setrans/.setrans-unix"...}, 110) = 0
sendmsg(3, {msg_name(0)=NULL, msg_iov(5)=[{"\1\0\0\0", 4}, {"\1\0\0\0", 4}, {"\1\0\0\0", 4}, {"\0", 1}, {"\0", 1}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 14
readv(3, [{"\1\0\0\0", 4}, {"\1\0\0\0", 4}, {"\0\0\0\0", 4}], 3) = 12
readv(3, [{"\0", 1}], 1)                = 1
close(3)                                = 0
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=56449424, ...}) = 0
mmap(NULL, 56449424, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b5483166000
close(3)                                = 0
umask(022)                              = 022
open("/dev/null", O_RDWR)               = 3
close(3)                                = 0
getuid()                                = 0
geteuid()                               = 0
getgid()                                = 0
getegid()                               = 0
prctl(0x3, 0, 0, 0, 0)                  = 1
open("/etc/blkid/blkid.tab", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2011, ...}) = 0
fcntl(3, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(3, {st_mode=S_IFREG|0644, st_size=2011, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b548673c000
lseek(3, 0, SEEK_CUR)                   = 0
read(3, "<device DEVNO=\"0x0830\" TIME=\"128"..., 4096) = 2011
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x2b548673c000, 4096)            = 0
getuid()                                = 0
geteuid()                               = 0
lstat("/etc/mtab", {st_mode=S_IFREG|0644, st_size=630, ...}) = 0
stat("/dev/sdb1", {st_mode=S_IFBLK|0640, st_rdev=makedev(8, 17), ...}) = 0
rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0
open("/dev/sdb1", O_RDONLY)             = 3
fstat(3, {st_mode=S_IFBLK|0640, st_rdev=makedev(8, 17), ...}) = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 69632) = 69632
close(3)                                = 0
stat("/sbin/mount.ext3", 0x7fff27571030) = -1 ENOENT (No such file or directory)
mount("/dev/sdb1", "/var/ftp/", "ext3", MS_MGC_VAL, NULL) = -1 EBUSY (Device or resource busy)
rt_sigprocmask(SIG_UNBLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0
write(2, "mount: /dev/sdb1 already mounted"..., 51mount: /dev/sdb1 already mounted or /var/ftp/ busy
) = 51
umask(077)                              = 022
open("/etc/mtab", O_RDONLY)             = 3
umask(022)                              = 077
fstat(3, {st_mode=S_IFREG|0644, st_size=630, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b548673c000
read(3, "/dev/sda1 / ext3 rw 0 0\nproc /pr"..., 4096) = 630
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x2b548673c000, 4096)            = 0
stat("/etc/blkid/blkid.tab", {st_mode=S_IFREG|0644, st_size=2011, ...}) = 0
access("/etc/blkid/blkid.tab", W_OK)    = 0
getpid()                                = 20978
open("/etc/blkid/blkid.tab-7bHiZt", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b548673c000
lseek(3, 0, SEEK_CUR)                   = 0
fchmod(3, 0644)                         = 0
write(3, "<device DEVNO=\"0x0830\" TIME=\"128"..., 2011) = 2011
close(3)                                = 0
munmap(0x2b548673c000, 4096)            = 0
unlink("/etc/blkid/blkid.tab.old")      = 0
link("/etc/blkid/blkid.tab", "/etc/blkid/blkid.tab.old") = 0
rename("/etc/blkid/blkid.tab-7bHiZt", "/etc/blkid/blkid.tab") = 0
exit_group(32)