Sponsored Content
Operating Systems AIX Cannot link to a file on another device Post 302528053 by bakunin on Monday 6th of June 2011 10:54:20 AM
Old 06-06-2011
A "device" is everything with an entry in /dev. In fact this entry in /dev is the device as far as the system is concerned. This is one of the most basic tenets in Unix.

Perhaps you want a less axiomatic answer, so here is the long version:

The kernel doesn't interact with hardware itself but leaves this task to drivers. Drivers are mostly loadable kernel modules (they become part of the kernel image when they are loaded) and their task is twofold: they have to drive the hardware and they have to offer interfaces to the other processes.

Lets have an example: consider a disk driver. Some process wants to write data, so the disk driver has to have some way of getting told by the process about the data to be written. On the other hand it has to translate this to some low-level commands the disk understands (SCSI commands for SCSI disks or ST-506 commands for ancient MFM disks or whatever).

We are interested in the interfacing to other processes here. This is in Unix traditionally done by an entry in /dev. It acts quite similar to any file: writing to there means telling the device driver to transfer data to this device, reading from there tells the device driver to get data from the device. This principle is the same for most devices: writing to /dev/tty<x> means to have this written to the screen of the respective terminal, reading from there means waiting for keyboard input; writing to (do NOT TRY THIS!) /dev/hd<x> means writing to this disk, reading from there means reading the disks data; and so on.

What does that mean for your question? When the LVM (Logical Volume Manager) creates an LV (a "Logical Volume", basically a [virtual] disk) it creates an entry /dev/hd<x> which represents this disk. Later you tell the filesystem driver (a higher driver level, which operates on top of the LVM) to "mount" this device somewhere, which basically means to make the content of the device accessible via filesystem means.

The "rename" facility in "ftp" is what its name suggests: a means to rename (but not move!) a file. To rename it means to change the contents of its inode. (This is the place where the filesystem stores some vital information about every file - including its name.) But if you "rename" the file from one filesystem to another you have to physically move the contents of the file from one disk to another disk. This means not altering the files inode, but moving the file, deleting the old inode and creating a new one on the new filesystem.

Usually Unix does a very good job in blurring this distinction, because "mv" will do both and in principle a user should not be bothered with how the filesystems are mounted. This is one of the few occasions where the distinction is made.

What you can do: get yourself the permission for the file to move it. There is no other way, otherwise Unix would not be the epitome of a secure OS it in fact is. If someone lacks permission for a specific task it should not and must not be possible to circumvent it - period. Works as designed.

I hope this helps.

bakunin
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Difference between hard link and soft link in unix

Hi All, Can any one please explain me what is the difference between hard link and soft link in UNIX. Thanks in advance Raja Chokalingam. (2 Replies)
Discussion started by: RAJACHOKALINGAM
2 Replies

2. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

3. UNIX for Dummies Questions & Answers

[Solved] Symbolic link not allowed or link target not accessible

Hi everybody, I read about treads realted to this issue but they did not resovle issue given below. Please help me resolve issue given below I have html file under /srv/www/htdocs/actual_folder ls actual_folder/ test.html and following link works... (0 Replies)
Discussion started by: newbielgn
0 Replies

4. Red Hat

Unable To Activate Ethernet Network Device in RHEL 5.5 - e100 device eth0 does not seem to be presen

Hi All, Could anyone please help to resolve the below problem. I installed RHEL5.5 in my desktop.But when i try to activate the ethernet connection then it gives me the error. I spent 2 days for the above and go through with several suggestion found by googling. But no luck. ... (0 Replies)
Discussion started by: Tanmoy
0 Replies

5. Solaris

/var/adm/messages (interface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# cat /var/adm//messages Apr 20 03:10:01 Prod-App1 syslogd: line 25: WARNING: loghost could not be resolved Apr 20 08:24:18 Prod-App1... (0 Replies)
Discussion started by: javeedkaleem
0 Replies

6. Solaris

/var/adm/messages (insterface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages Apr 22 16:43:05 Prod-App1 in.routed: interface net0 to 172.16.101.1 turned off Apr 22 16:43:33 Prod-App1 mac: NOTICE: nxge0 link up, 1000 Mbps, full duplex Apr 22 16:43:34 Prod-App1 mac: NOTICE: nxge0 link... (2 Replies)
Discussion started by: javeedkaleem
2 Replies

7. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies
DEBUGREISERFS(8)					      System Manager's Manual						  DEBUGREISERFS(8)

NAME
debugreiserfs SYNOPSIS
debugreiserfs [ -dDJmoqpS ] [ -j device ] [ -B blocknumber ] device DESCRIPTION
It helps sometimes to solve problems with reiserfs filesystems. Being called w/o options it prints super block of reiserfs filesystem found on the device. device is the special file corresponding to the device (e.g /dev/hdXX for IDE disk partition or /dev/sdXX for SCSI disk partition). OPTIONS
-j device print contents of journal. Also with the option -p it allows to pack journal into archive with other metadata -J print journal header. -d print formatted nodes of the internal tree of the filesystem -D print formatted nodes of all used blocks of the filesystem -m print contents of bitmap (not very useful) -o print objectid map (not very useful) -1 blocknumber print specified block of the filesystem -p Makes debugreiserfs to find filesystem metadata This option exists to help reiserfsck debugging. If reiserfsck fails - you may extract filesystem metadata with debugreiserfs -p /dev/xxx |gzip -c > xxx.gz. We download that data and make the filesystem similar to your with gunzip -c xxx.gz | unpack /dev/xxx (unpack is included into reiserfsprogs package). This usually allows to reproduce and debug the problem quickly. When data file is not too large. -S When -S is not specified -p deals with blocks marked used in the filesystem bitmap. With this option set they will work with whole device. -q Suppress showing speed of progress when -p is in use AUTHOR
This version of debugreiserfs has been written by Hans Reiser <reiser@idiom.com>. BUGS
There are probably few of them. Please, report bugs to ReiserFS mail-list <reiserfs-list@namesys.com>. SEE ALSO
reiserfsck(8), mkreiserfs(8) Reiserfsprogs 3.6.4 January 2002 DEBUGREISERFS(8)
All times are GMT -4. The time now is 04:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy