Questions tagged [hardlink]
Many file systems support "hard links" where a file appear under several different names. The names are all equally good and the underlying storage is only freed when all names are deleted.
70
questions
0
votes
1
answer
28
views
Total space in bkps using rsync and hardlinks: who is right between du and Synlogy web interface?
I bkp my server root partition on a Synology NAS (fs: btrfs) mounted as NFS on /mnt/bkps using this script that is based on rsync and hard links, to to have daily bkps.
If I check the space using du ...
0
votes
1
answer
78
views
Extract hard linked backup data from file server with rsync to exFAT file system
I need to gradually extract all data of the specific directory from Time Machine backup so:
it fits the destination drive size
it has no hard links because destination volume file system is exFAT
it'...
0
votes
0
answers
17
views
Cwd of a process started from hard link path
I have an app which is starting by path which contains a folder which is hard link.
If I look for process current working directory it is same as source of a hard link.
The main problem is that app ...
0
votes
1
answer
377
views
NAS de-duplication best practices - how do hardlinks handle compression?
I just joined a SMB as their first full-time tech guy, and the company's backup architecture is a mess. Leaving aside all other issues (of which there are many), the office has multiple different NAS ...
0
votes
1
answer
516
views
ln: failed to create hard link: Too many links
I have a pipeline on my server which creates a lot of hard links to big files. today I realized it fails and shows this error:
ln: failed to create hard link to '/path/to/a/file': Too many links
The ...
1
vote
1
answer
196
views
Windows hardlinks - why it consumes same space as original file
Im using finddupe tool to de-duplicate files and save some space on HDD.
But checking before and after operation I cant see any free space released - see below.
Can somebody advise what is wrong here ?...
2
votes
1
answer
159
views
Why is rsync only hard linking some unchanged files?
I'm using rsync for incremental backups, using the --link-dest option to point to the previous backup so that unchanged files are hard linked to there.
This is working, but not for all files. For ...
0
votes
1
answer
250
views
It is possible that a process can not link a file, but I can with sudo for the same user?
I am working with Dovecot 2.3.4.1 and EncFS (encfs version 1.9.5) encrypted mailboxes on Debian 10 (no SELinux)
Basic setup is:
EncFS mounted with
encfs --public /var/encrypted-mail /var/decrypted-...
2
votes
2
answers
2k
views
Does rsync preserve hardlinks on the destination when source files are identical but separate?
I am running a (Linux based) rsync server for software distribution. A (Windows based) source repository server which is outside my control pushes software packages to it via rsync, and about a ...
1
vote
0
answers
115
views
rsync -H with --link-dest and potential link corruption
man rsync for -H includes:
"If you specify a --link-dest directory that contains hard links, the linking of the destination files against the --link-dest files can cause some paths in the ...
1
vote
0
answers
210
views
libvirt qemu AppArmor 9p hard links
I am using libvirt with qemu on a debian host. One virtual machine has a 9p mount point defined:
<filesystem type='mount' accessmode='mapped'>
<source dir='/mnt/pool/share'/>
<...
0
votes
0
answers
168
views
rsync duplicate tree using hard links
I would like to duplicate a folder structure containing many directories and files using hard links for all the files instead of making new copies of the files. I thought I could do this with rsync, ...
0
votes
0
answers
462
views
Issue Hardlink/Junction not working when chroot all users to c:/share dir in Windows OpenSSH Server 2019
Issue Hardlink/Junction not working when chroot all users to c:/share dir in Windows OpenSSH Server 2019.
Link Created
mklink /d E "E:"
mklink /d F "F:"
Entry in sshd_config file
ChrootDirectory c:/...
2
votes
3
answers
490
views
Calculate folder size without counting links
I need to calculate the size of "real" files created under a folder (and its sub-folders) on an NTFS drive, where "real" is all files that are not present because of hard/soft-links, junctions etc.
...
0
votes
1
answer
2k
views
Best way to find all hard links to a directory
I am tracking down what may be a stray or erroneous hard link to a directory,
so I want to find all the hard links to a directory to manually verify them. (fsck finds no errors, but the link count ...
2
votes
0
answers
309
views
Which attributes/descriptors are changed by hardlinking a file on Windows?
I'm working on a little backup script using robocopy and hardlinks. My aim is to have differential backups using similar concept as rsync's --link-dest without having to resort to 3rd party tools. For ...
13
votes
1
answer
806
views
Does rsync change file content (dealing with hardlinks)?
Imagine I have a file remote/A which syncs to local/A and local/B is a hardlink of local/A. Is there a threat that on a next remote/A change and synchronization rsync will not delete local/A but only ...
-2
votes
1
answer
792
views
How to detect hardlinks over network share?
I swear I had this working at one point ages ago but now it's not. I have a Windows 10 machine with a Linux network share. I can create hard links on the network share just fine, but I cannot detect ...
3
votes
0
answers
2k
views
Cheating with hard links and NFS
At what layer does the magic occur that allows me to hardlink files between two NFS mounts on the client when they’re on the same file system on the server? Also, can I trust these to act like normal ...
0
votes
3
answers
303
views
have 2 folders on different disks behave as if they were 1 folder
I have a server with two 1TB hard drives. I have an uploads folder on /disk2/uploads, That folder has filled up the entire hard drive. The other disk is basically empty. I want to have a spill ...
2
votes
1
answer
106
views
Hard or soft link is more useful in Linux?
In small scale Linux infrastructure environment which link to the file is more helpful, hard or soft link?
As a beginner in Linux administration, I have found that most Linux admins tend to use soft ...
0
votes
0
answers
765
views
Should I use symbolic links or hard links (and junctions) for web server?
I understand the differences between hard links (or junctions/soft links for directories) and symbolic links.
Are there performance/security benefits for one or the other for web server usage?
0
votes
1
answer
466
views
Does rsync -H convert file to hard link on destination after deduplication on source?
I've got two servers, the second one being synced via rsync every now and then.
I've got some (few thousands ?) of big duplicate files on which I would like to use freedup to spare some space.
If I ...
4
votes
2
answers
3k
views
Get hardlink count for a file on Windows (without fsutil, which requires admin)
I have various files which I've created as hardlinks to others using mklink. I need a command I can use inside a batch file to determine which files in a given directory have only one link to it. I ...
0
votes
1
answer
55
views
Why hasn't disk usage decreased by 6,728k after hard linking a file away?
Given this sequence of commands…
$ pwd
/data/backup/rsnapshot
$ sudo du -csk daily.{2,3}/ruminant
1195040 daily.2/ruminant
36712 daily.3/ruminant
1231752 total
$ ls -isk /data/backup/rsnapshot/...
2
votes
3
answers
503
views
Is it possible to have orphaned hard links?
I'm not sure if it is even possible to have an orphaned hard link. Let me explain why I'm asking. Bear with me.
My Setup
I am using rsync to sync my file server to my backup server. I am using the -...
3
votes
1
answer
2k
views
How do I grant users permission to create hard links (using GPO or registry entries)?
I'm working in an AD domain with one DC running Windows Server 2012 R2, and clients running mostly Windows 7 Professional.
I need to be able to grant certain user groups the permission to create hard ...
6
votes
1
answer
682
views
Recalculate Windows inherited ACLs for hardlinks
How do I get Windows to recalculate the inherited permissions of a file?
A tool (Mercurial) created multiple NTFS hardlinks to the same file from different directories.
I can see them using fsutil ...
0
votes
2
answers
787
views
All of the NTFS hard links disappear, where are those 0KB hardlinks stored on disk and how to recover them?
This is Windows 7 x64 sp1 on a NTFS file system.
All hardlinks within C:\Windows\System32 folder disappear, and the Windows can't boot, because even the osloader, C:\Windows\System32\boot\Winload.exe ...
10
votes
1
answer
8k
views
Create a link to the Unix socket [duplicate]
Is there a possibility to create a hard link for an unix socket? I'm creating a jail and symbolic links won't work, so I'm looking for a solution, how to provide an unix socket inside chrootted ...
1
vote
1
answer
1k
views
backup files to a remote server with multiple versions using rsync hardlink option
To use rsync hard link option to backup files remotely so that remote backup server could keep multiple versions of the backups, both the link-dest directory and the target directory have to be on the ...
1
vote
0
answers
483
views
How to secure tmp directory from hard link attacks when host doesn't allow partitioning
I'm a new sysadmin in the making, have learned that I need to have /tmp and /home directories on separate partitions in order to prevent possibilities of privilege escalation through hard links based ...
1
vote
1
answer
457
views
Is there a way to create a 'trackable' link (~hard link) to a folder on Windows (Windows XP in particular)?
Lets suppose that there are:
a folder and
a junction point or a symlink to that folder
When the original folder is moved to a new location, both the junction point and the symlink fail (point to an ...
0
votes
2
answers
175
views
How does vzdump treats hard links pointing out of the virtual machine?
I have an OpenVZ container containing some hard links pointing to the host file system.
For example, I have run on the host ln /root/file /var/lib/vz/private/101/root/link
Now I'm asking myself: if ...
6
votes
3
answers
4k
views
How does logrotate interact with hard linked files?
I have a service which insists on keeping it's log files in terrible locations. After all efforts to change where it keeps them failed, my next idea was to create hardlinks to those files somewhere ...
2
votes
2
answers
2k
views
rsync apparently breaks hard links
On the source server (A), I got a file
/opt/resources/xxx
and a hard link
/etc/apache2/sites-available/xxx pointing to this file.
On another server (B) I got the same structure
/etc/apache2/sites-...
0
votes
1
answer
902
views
Cant remove linux ln hard links
I am using CentOS 6.3 and am logged in a root.
When I create a hard link by doing this:
ln /root.hdd /somedir/root.hdd
That works fine, the inode shows the same between the two files and ...
0
votes
2
answers
361
views
Daemon to create hardlinks on Linux file server which finds identical files
I have a Linux server where I only store new files or rename directories and never edit files.
It contains backups from other Linux servers.
Due to certain circumstances there are quite some ...
0
votes
1
answer
163
views
Hard link files within directory to reduce space usage, by "version"
I have an Ubuntu 12.04 server.
Server is running rsyncd (rsync daemon), and allows an external process to rsync in files to a given path, with full control of the file structure within that given path....
2
votes
3
answers
2k
views
Under Linux, how do I copy files from one filesystem to the other (both gpfs) and preserve hard links?
I have a directory with huge files and a number of directories, that have hardlinks on these huge files. How do I copy files from one filesystem to the other and preserve hard links?
0
votes
1
answer
517
views
Backing up an rsnapshot directory to a remote device
I have a local backup server that uses rsnapshot with hard links that contains about 10TBs of information which add about 4 to 5GBs per day. It's works great. I've been requested to set up and ...
9
votes
2
answers
2k
views
Break all hardlinks within a folder
I have a folder which contains a certain number of files which have hard links (in the same folder or somewhere else), and I want to de-hardlink these files, so they become independant, and changes to ...
1
vote
1
answer
79
views
Speeding up directory creation / file linking
I'm using rsnapshot for backups. Currently that means every time an update runs (even without any data difference) I get a copy of ~100M of only the directory structure + inode list. The files are ...
2
votes
2
answers
2k
views
bind (hardlink) one directory to many places
I need to "bind" one directory to many chrooted places. I know that I can do "mount -o bind", but this requires special processing on startup each time (run the mount).
Is there a way to do it on the ...
0
votes
2
answers
122
views
What happens if hardlinks are not preserved?
I evaluate backup solution for common linux servers.
What happens if hard links are not preserved?
The only draw back I see: After the restore some MB more space is required. But this is no problem ...
4
votes
1
answer
471
views
hardlink of ms word file getting hidden and not updated
I created a docx file in windows 7 with some text in it (initial.docx) and then I created a hardlink to it:
mklink /H new.docx initial.docx
I open new.docx and I can see the text that I initially ...
1
vote
1
answer
1k
views
directory of hardlinks on NTFS appears to be consuming more space than it should
Windows 2008 R2 and Windows 7 Ultimate both exhibit this behaviour...
So I have directory structure like... YEAR\MONTH\file_x.ext, where YEAR goes back to 2007 and each MONTH directory contains ...
48
votes
6
answers
50k
views
How do I view a file's hard links in Windows?
I've found a description of hard links and junctions in Windows, however I'd like to know ,from the Windows UI or command prompt, how I can view the hard links of a particular file or folder?
10
votes
3
answers
26k
views
how to create symbolic link (ln) between two partitions
I have two partitions on my Ubuntu 10.04.3 server.
partition 1: /mnt/storage/
partition 2: /var/www/myweb/
now when i run the following command
$ ln /mnt/storage/sourcefile.txt /var/www/myweb/...
11
votes
3
answers
3k
views
How to mirror filesystems with millions of hardlinks?
We have one big problem at the moment: We need to mirror a filesystem for one of our customers. Thats usual not really a problem, but here it is:
On this filesystem there is one folder with millions ...