Tag Info

New answers tagged

2

Linux itself mostly won't care. A few things won't be possible (e.g., installing a bootloader such as GRUB on the drive), but it sounds like that isn't an issue. Some software (udisks, for example) might fail to see it as a mountable filesystem, so it might work less well in desktop GUIs. If you attach this to a different OS, I'd expect both Mac OS and ...


0

You're not losing much within Linux - having a whole-disk device as the backing store for a filesystem pretty much just works. You probably won't be able to move the disk to another OS like Windows or Mac OS X, but that's more due to the filesystem not the fact that you're using the whole disk device. The OS interoperating with other OSes shouldn't be ...


0

An MBR formatted drive is limited to 2 TB, you are likely formatting with MBR and getting 1.5 TB of usable space off of that. For more information on MBR: http://en.wikipedia.org/wiki/Master_boot_record You need to format with GPT to use all of the available space on each drive. For more information on GPT: ...


3

I need to migrate /var/log/ and /var/log/audit to separate partitions. Currently the entire /var/ directory is on a logical volume with ample space (45G). LVM is the partition type, so you meant migrate to new logical volumes, right? I understand how to shrink and create new logical volumes (and the associated risks of resizing and need for full ...


3

What Windows (or more precisely NTFS) calls MFT is what typical Unix filesystems call the inode table, and what Windows calls FRN is the inode number. It contains the metadata for a file (permissions, timestamps, etc.), but not the file name (that's part of the directory entries). It also contains the address of the first few blocks of the file, or the ...


-1

I have an alternate solutions for this situation. Lets say you have 1000 inodes in a partition of 10G. But due to inodes limit you are not suppose to use all space of partition. But in this solutions you will be able to use the remaining space of the partition without formatting it. $ df -i # see list ( I need just one free inode here so move just one file ...


3

Whilst monitoring logging I have to go to my log files, order by written date, so I can then see the name of the log file for the most-recent execution of my application. I assume this means that the application writes log files like this: AFile1.log AFile2.log AFile3.log AFilex.log Is there any way, given a directory and sub-string, to return ...


0

A directory, like a file, has an inode associated with it: 307 % mkdir A B C 308 % ls -i 11997708 A 11997709 B 11997710 C An inode is a data structure that contains information about the directory or file. Every directory and file has one. Think of it as an address (an index number really). If I am in A, inode number 11997708 and in another shell (or ...


3

There used to be an option to check ext2 filesystems at mount time, but that is no longer supported. Nowadays boot scripts check filesystems before mounting them, and your scripts should do so too. Mounting a filesystem does still check things to make sure it's safe to mount the filesystem; but it won't fix anything (beyond replaying the journal on ext3 or ...


0

CentOS 7 ( Currently using in VMware for testing ) since its rock solid & very stable found after googling alot. CentOS/RHEL is more for servers. You can get CentOS/RHEL to work as a desktop but it's probably easier to use something like Fedora which is geared more for desktop users. Fedora is more unstable but if you start out with something that's ...


0

No, because the contents of the first directory itself are only 1MB. If you want something that will sum all the sizes in the directory tree under a directory you want du ls doesn't recurse into subdirectories as a normal matter of course. It just reports on the things that are directly in the location you are looking at. So in your first directory if ...


1

While directory acception is unambiguous when talking about file systems, file system might mean different things depending on what you are talking about. In your examples, all the listed paths are directories but only some of them are also mount points of file systems. You can use the df command to known on what file system a given file or directory is, ...


2

The way I see it, a filesystem, in the UNIX sense, is a way of implementing a directory tree (directory structure), or more precisely, a way of implementing the UNIX filesystem API. The root file system is backed by one particular implementation, and whenever you enter a mountpoint directory, you enter a subtree that's backed by something different. The ...


1

First a correction to your assumption about a filesystem and a directory. A filesystem contains one or more directories. Using your examples, /proc, / and /bin are directories. They are not "filesystems" in and of themselves, but they might be the root of their respective filesystems. If you want to identify which directories are also the mount point (root) ...


4

At the risk of grossly oversimplifying, A filesystem is like your car's engine and other internal systems, A directory structure is like a map of the places where you drive. Since I’ve been asked for an encore, Filesystems are like the mechanics (implementation details) of audio/video signal distribution/propagation: analog RF broadcast, digital RF ...


5

People don't use "file system" too carefully. In your examples, I would say that /, /bin and /proc are file systems because an entire partition (like /dev/sdb1) is mounted on those directories. My Arch linux system doesn't have /bin as a file system so this example isn't perfect but... % ls -lid /proc /home /boot / 2 drwxr-xr-x 17 root root 4096 Feb 24 ...


10

I can't truly answer but I think this might help: Notice how each fragment is, at most, 32768 blocks in size (a power of 2, that should raise a flag that something is going on, and also give you a hint for something to look for). Also worth noting, those physical offsets between extents are pretty close to each other. From: Ext4 Disk Layout An ext4 ...


15

3 or 4 fragments in a 900mb file is very good. Fragmentation becomes a problem when a file of that size has more like 100+ fragments. It isn't uncommon for fat or ntfs to fragment such a file into several hundred pieces. You generally won't see better than that at least on older ext4 filesystems because the maximum size of a block group is 128 MB, and so ...


23

/proc is a filesystem because user processes can navigate through it with familiar system calls and library calls, like opendir(), readdir(), chdir() and getcwd(). Even open(), read() and close() work on a lot of the "files" that appear in /proc. For most intents and almost all purposes, /proc is a filesystem, despite the fact that its files don’t occupy ...


16

it's just an area of files containing information But that's exactly what a filesystem is. Filesystems don't have to be writable and they don't have to reside on permanent storage. Note: There's a distinction between procfs (the pseudo filesystem implementation in the kernel) and its conventional mount point /proc. You could in theory mount a procfs ...


8

If data are organized in a way so they can be accessed via the mechanisms used for file systems you may well call the whole thing a file system.


0

Okay. I do not have a solution, but I think I found the cause. I can still BROWSE my HDD via Windows, but i cannot access any files, because they are reported with 0 bytes on disk. So either my file-system is corrupt, or I just invented the most efficient compression... (I do not think it is the latter ;) ) I do not know if it was caused by ntfs-3g or not, ...


14

A directory (like any file) is not defined by its name. Think of the name as the directory's address. When you move the directory, it's still the same directory, just like if you move to a different house, you're still the same person. If you remove a directory and create a new one by the same name, it's a new directory, just like someone who moves into the ...


8

The new directory A is not the same as directory A. It can be checked with stat command before deleting old one and after creating new one and you will see different i-node numbers. And I think this is related to how kernel works. It simply keeps track of the i-number of the current directory for each process. So as there are different i-numbers this will ...


7

This is expected behavior. The new directory A isn't the same as the old directory A, it just happens to have the same name. So the first terminal's $PWD is still gone, it didn't magically reappear when you did the mkdir A.


2

By default, ext2/ext3/ext4 filesystems have 5% of the space reserved for the root user. This makes sense for the root filesystem in a typical configuration: it means that the system won't grind to a halt if a user fills up the disk, critical functionality will still work and in particular logs can still be written. It doesn't make sense in most other ...


1

inode 0 is used as a NULL value, to indicate that there is no inode. indoe 1 is used to keep track of any bad blocks on the disk; it is essentially a hidden file containing the bad blocks. Those bad blocks which are recorded using e2fsck -c. indoe 2 is used by the root directory which indicates starting of File system inodes


2

Under most typical use cases, most filesystems created with default settings will have way more inodes than they will ever need. But that's actually a pretty good tradeoff considering: The inode table doesn't really waste all that much space, all in all. It's almost never worth reducing the number of inodes just to squeeze the last few bytes of available ...


0

In ext4 the Inode 1 is used for bad blocks. The link below the the kernel site describes which Inode is used for what purpose. https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Special_inodes


1

That is the result of filesystem corruption. The directory (which is just a file, too) lists entries that don't point to valid inodes. You should run fsck for whatever filesystem that is. Generally speaking, the filesystem must not be mounted when checked.


0

For owner/group, it depends on who does the copy, and how. a regular user: will alway be the owner of the copies by all commands root user too, with cp (except with the --preserve option) "preserve" will be the default for root with tar


11

To add Eric's answer (don't have rep to comment), permissions are not stored in file but file's inode (filesystem's pointer to the file's physical location on disk) as metadata along with owner and timestamps. This means that copying file to non-POSIX filesystem like NTFS or FAT will drop the permission and owner data. File owner and group is just a pair of ...


4

That would depend on how you copy it. If you put it in a tar ball and copied that, then untarred it, tar will perserve permissions. If you use rsync it will also, depending on flags, perserve permissions. Those applications are responsible for the permissions. If you were to scp it permissions would not be preserved. The command doing the copying is ...


2

Assuming that there are no symbolic links or mount points involved Bill gives a good answer. If there are symbolic links involved, the number would be much higher. Also if there are mounts involved you would need two inodes per mount point instead of one.


3

I would expect three /, hello and file. Changing permissions of any one of these can limit access to file.


10

First, let's dispel some myths. it is atomic so inconsistencies cannot happen Moving a file inside the same filesystem (i.e. the rename) system call is atomic with respect to the software environment. Atomicity means that any process that looks for the file will either see it at its old location or at its new location; no process will be able to ...


13

The rename operation is very fast on any filesystem, so it is unlikely to be interrupted, but on a classical filesystem it certainly can be interrupted - if it creates the destination link first, it could leave two links on a file - which is legal, but the file thinks it only has one, which could cause problems if one is deleted later. On the other hand, if ...


1

This question has been asked in a slightly different manner on Super User. The Wikipedia page on the mv command also explains it quite well: Moving files within the same file system is generally implemented differently than copying the file and then removing the original. On platforms that do not support the rename syscall, a new link is added to the new ...


1

The permissions are stored in file system metadata. NTFS and ext3/4 file systems differ substantially in how they store metadata. One solution would be to create a tar file of the source directory (with or without compression), writing the resulting file to the NTFS file system. When the content of the tar archive is extracted to a ext3/4 file system the ...


0

In order to show you a directory, these file managers need to at least scan the list of file names in the directory and the file types and other metadata. These are the same calls that ls -l makes. In addition, some file managers may inspect the contents of the file to give you more precise information about what's in them, like the file utility. They may ...


-3

To debug ssh session use "-v" option instead of "-q" and analize the output. Try to use absolute paths in remote command. So this looks like: # ssh -v root@hostname /bin/sh -c '/bin/rm -rf /opt/jetty/'


1

It's actually scanning the list of files that's slow. Something like this should do: find /home >/dev/null & That is, it will pre-cache the files in /home. But it will keep your disk busy for a while, it will cache both interesting and uninteresting subdirectories, and some subdirectories might still be purged from cache before you actually need ...


2

My first comment is all of what you state will only work if the filesystem on the device you're interested in is currently mounted. But I guess you know that and accept that limitation. The method you propose seems quite thorough and I think it will catch all cases. About looking ip in /sys/dev/block: You're not looking for <maj>:0 as you state. ...


1

no, with ntfs-3g you've got read- and write-support for NTFS formated partitions. just additionally avoid the following characters: \ : * ? " < > | You will maybe loose the permissions... if this is important for you (which I doubt), you have to create a tar-file first and then transfer it to the NTFS-drive. Anyway... if you are free to choose the file ...


1

I am going to disagree with jordanm on two points. Enabling the journal is a little more complicated than he presents, but there is a plethora of discussions and tutorials available. The actions needed to convert an ext2 filesystem to ext3 or ext4 are as follows: do nothing. ext4 is a proper superset of ext3 which is a proper superset of ext2, there all ...


3

The process of going from ext2 to ext4 is similar to your linked article for 3->4. You need to enable the features using tune2fs. The difference between going from 3->4 and 2->4 is that you also need to enable the journal feature. The complete command is this: tune2fs -O extents,uninit_bg,dir_index,has_journal /dev/sdxx You should fsck the filesystem ...


0

A very common and simple methods to backup a linux machine is using rsync. And to your question, yes you can backup the file system tree, but the so called pseudo-filesystems like /dev or /proc are usually excluded in the file list of such a backup. See the following command: $ rsync -aHv ...


2

If your question is actually about restoring a system after a crash, you can safely forget about tar: it has a limit to the maximum length of the paths that is hardcoded in the format specs, and it doesn't handle hardlinks. For similar reasons, you shouldn't try to do backups with cp, pax, cpio, or rsync. A reasonable solution is to use dump / restore, or, ...


1

Let's start with the IO scheduler first. There's a IO scheduler per block device. Its job is to schedule (order) the requests that pile up in the device queue. There are three different algorithms currently shipped in the linux kernel: deadline, noop and cfq. cfq is the default, and according to its doc: The CFQ I/O scheduler tries to distribute ...



Top 50 recent answers are included