Hot answers tagged

14

/dev/sda2 is an extended partition. /dev/sda5 is an logical partition which is placed inside the extended partition. Originally there could be only 4 partitions on a hard disk. To circumvent this, the extended partition was invented and further partitions, so called logical partitions, could be created inside the extended partition. The partitions 1-4 are ...


11

Directories are special files, hence they have inodes. You can test that with ls: ls -li or using stat: stat -c '%F : %i : %n' * Example: % stat -c '%F : %i : %n' * regular file : 670637 : bar.csv regular file : 656301 : file.txt directory : 729178 : foobar The number in the middle is the inode number.


9

LVM is not overkill if you have 17 partitions. (IMHO) As for the partition limit, it just happens to be the default. Probably no one expected that many partitions on a device that used to have only a few megs. /usr/src/linux/Documentation/devices.txt: 179 block MMC block devices 0 = /dev/mmcblk0 First SD/MMC card ...


8

In broader terms, in a corporate environment, is mandatory to have at least the OS (or /), /var, and /home separated. The advantage is that having a separate / you do not often damage important data by mistake, and system upgrades are done more at ease ; and having a separate /var partition guarantees that if by change some logs start running wildly the ...


7

Another approach is with findmnt: findmnt /dev/sda4 ...to get mountpoint from dev. Or vice-versa: findmnt /home


7

Your partition /dev/sda2 shows up as "full" because it is entirely allocated to LVM, which is managing your / and /home partitions. We don't need to look directly at /dev/sda2 as a result, but rather your LVM configuration. We can see from your lsblk output: └─sda2 8:2 0 595.9G 0 part ├─ManjaroVG-ManjaroRoot 254:0 0 29.3G ...


6

You can use: mount for a list of all mounted filesystems and mount options for each of them; lsblk for a tree of block devices, size and mount point (if mounted); df for a list of mounted block devices, size, used space, available space and mount point.


6

Of course Linux uses concept of directories. The concept of directories is the same as in Windows. Concept of filesystems is also very similar to what is used in Windows. Windows usually use NTFS or FAT - Linux usually uses ext2, ext3, ext4 and so on, that's all the difference. What is different, is that in Linux the files/directories from all the ...


5

These are all the steps required to resize a LVM or LVM2 partition - sudo lvresize --verbose --resizefs -L -150G /dev/ubuntu/root sudo pvresize --setphysicalvolumesize {any size here} /dev/sda5 /dev/sda5: cannot resize to xxxxx extents as later ones are allocated. You have to rearrange the unallocated space at the end of the LVM. That means after root ...


5

You're actually asking two questions. The easiest thing to do if you want to know where your home is: cd df -h . Or df -h $HOME Where is /tmp mounted? df -h /tmp ...etc. If you want to know what is mounted on a certain device, mount | grep ^/dev/sda1 (for example). Or mount | grep ^/dev/sd to see all the sd's.


5

Your / is full. Probably a out of control /var/log, either ssh probes in messages/syslog, or mysql errors, and huge logs in /var/log/mysql. The best course is to locate the offending files, understand what caused the errors, and delete them. Then if the errors were understood, try to fix what caused them in the first place.


5

As I wrote in http://superuser.com/a/293160/38062: The problem here is the word "filesystem". In the POSIX/Unix/Linux worlds, it is used to mean several different things. The "filesystem" is sometimes the entire system of files, rooted at / and as presented to applications softwares by the operating system kernel. With this meaning, people talk of ...


4

A BIOS boot partition doesn't contain a filesystem; it's just a place to put some GRUB code that on an MBR disk would've been located immediately after the boot sector, before the start of the first partition. On a GPT disk, that area is used by the (larger) partition table and isn't available for bootloader code, so the bootloader code goes in a small ...


4

(I know this is an old question, I came across this problem myself and got my FS back to life without ddrescue, so I'll share the expericence for anyone else encountering this) Ext filesystems store backups of the superblock -- for an occasion just like this one. First, determine the locations of the backups: mke2fs -n /dev/sdxx This is a test run (i.e. ...


4

The dirty bit is set and cleared in the kernel, when mounting and unmounting a device; see http://lxr.free-electrons.com/source/fs/fat/inode.c?v=3.19#L578 for the implementation. There's no way currently to access this function outside the kernel, except by mounting and unmounting... To set it yourself, you'd need to tweak the device directly; the state ...


4

The same tools that you can use for other files (generally) can also be used on block devices. This means that you can use, for example, xxd or hexdump to inspect the filesystem: $ sudo xxd /dev/sda2 | head -10 00000000: eb58 9053 5953 4c49 4e55 5800 0200 0000 .X.SYSLINUX..... 00000010: 0000 0000 0000 0000 3f00 ff00 0008 2000 ........?..... . 00000020: ...


4

This was asked recently but it was in the context of local disks. In that situation, there is a good reason to use a partition table on the disk even if you only intend to make it a single big partition spanning the entire disk: documenting the fact that the disk is actually in use, thus preventing accidents. I believe that the situation is different for ...


4

It's not a performance problem, it's a troubleshooting and fixing things problem. /boot is the bootstrap location - in there is a few files that start off everything else in your system. And sometimes you need to poke in there to fix a problem (such as grub config or similar). If you have to do this, it's useful to have a lowest common denominators sort of ...


4

Both UUID of GPT partitions, and UUID of filesystems, are generated randomly when the partition/filesystem is created. You can check that they're version 4 UUIDs.


4

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 ...


4

The physical volume (PV) is simply the partition with LVM metadata added. You can't create the volume group (VG) without referring to the metadata, thus you have to first create the PV(s) that will be members of the VG. A physical extent (PE) is just that - the actual section of the disk that you're writing to, very similar to an old-style disk CHS ...


4

After you dd an image to a flash drive, the drive will be divided in 2 parts: the image partition with the image's size and a blank part. That's normal. To get your drive go like before, just format it: mkfs.vfat -I /dev/sdb (as root).


4

The command du will show you the disk space used by your files and directory. du -sh /home/* will show you the size of each subdirectory directly below the /home directory, afterwards depending on your preferences you might then: Either run the same command against one of these directories to manually step one level lower (for instance du -sh ...


4

tmpfs uses swap if sufficient RAM is not available. That means you can create and activate a swap partition on the SATA drive and it will be used for /tmp, provided it's a tmpfs. In order to to that, create a swap partition and mount the swap space in your /etc/fstab. Furthermore, you have to ensure that the mounted tmpfs is of sufficient size. Use the size ...


4

This is very broad local partition are mounted as a whole. You cannont mount it partially. you can (and usually do a lot) mount partition over other partition. exisiting data is "hidden" (e.g. file foo.txt in /mnt/a/b/foo.txt is hidden when you mount "b" on /mnt/a/b ) yes you can, it it advised to mount local over local, distant on distant or local, but ...


4

First: you don't mount partition. The thing that is mounted is filesystem. Filesystem may live on a partition but that's not necessarily so; filesystems commonly live: inside file (e.g. ISO images), entirely in RAM (e.g. /tmp is sometimes created this way), inside kernel (/sys and /proc work this way), or as a network service (NFS and Samba work this ...


3

Here comes a memo to resize an NTFS partition using commandline with ntfsresize (from the ntfs-3g / ntfsprogs package) and fdisk, that should work for Windows XP-to-8 versions. Note that GParted does all the following for MBR/DOS as well as for EFI/GPT drives if ntfs-3g / ntfsprogs is installed. My references are at the end. OK in this scenario I have a ...


3

If resizepart does not work, you might have to resort to rm and mkpart to achieve the same thing. Of course, this would require you to parse the partition table first in order to determine partition type and start offset. Unless you already know the necessary values. After all you had to get the 166016512B from somewhere too. parted has the --machine ...


3

Depends on what you're after. If you want to check which of the partitions in /dev/sd* has a default mountpoint and what that mountpoint is, you could do for part in /dev/sd*; do grep -w "$part" /etc/fstab | awk '{print $1,$2}; done However, on most modern systems, partitions are mounted by UUID and not dev name, so a better approach1 would be: for uuid ...


3

The "DOS mode" that the man page is referring to is a mode that keeps partitions aligned on cylinder boundaries, which have been an anachronism since the late 90's. In other words, it defaults to letting partitions start and end on any sector. The DOS disklabel, otherwise known as MBR, is the conventional PC partition table, as opposed to GPT, which is ...



Only top voted, non community-wiki answers of a minimum length are eligible