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

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

The entries in /dev/mapper are LVM logical volumes. You can think of these as Linux's native partition type. Linux can also use other partition types, such as PC (MBR or GPT) partitions. Your disk is divided in MBR partitions, one of which (/dev/sda2) is an LVM physical volume. The LVM physical volume is the single constituent of the volume group ...


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

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


5

Linux doesn't care where /boot is. In fact, Linux itself doesn't access /boot at all except when updating its contents. Only the bootloader accesses /boot. In most setups, it is unnecessary to put /boot on a separate partition. There are downsides to separating out /boot: it's more complicated, it uses up an entry in the partition table, it could run out of ...


5

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


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.


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

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

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


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

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

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


4

Linux pretty much ignores partition types, it cares more about the content on those partitions. So you don't need a swap partition type to use swap in Linux, and thus there is no issue with LVM not having partition types either. But you have to use the correct partition type to stop Windows from attempting to format your Linux data/swap partitions... it's ...


3

A disk is divided into one or more partitions. For Windows, there is usually just one, maybe with a recovery partition hiding somewhere. A partition is a logically contiguous area of the disk, e.g. "sectors 1 through 10,000,000". On a partition can be built a filesystem. For Windows, this is NTFS or FAT; for Linux this is one of the ext versions or various ...


3

You may have it corrupted. With luck it is not definitively damaged. The better way to deal with it is "zeroing it" and defining everything anew. For that we zero it with dd: sudo dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=2 where /dev/mmcblk0 is the device where it is normally mounted. (/dev/mmcblk0p1 is actually the partition) After the dd you can ...


3

Security (at the cost of perhaps more administrative annoyance if you size things wrong). From my OpenBSD desktop: /dev/sd0b none swap sw /dev/sd0a / ffs rw,softdep 1 1 /dev/sd0k /home ffs rw,nodev,nosuid,softdep 1 2 /dev/sd0d /tmp ffs rw,nodev,nosuid,noexec 1 2 /dev/sd0f /usr ffs rw,nodev 1 2 /dev/sd0g /usr/X11R6 ffs rw,nodev 1 2 /dev/sd0h /usr/local ffs ...


3

You can make a file as big or as small as you want - especially on a linux tmpfs. df -h /tmp Filesystem Size Used Avail Use% Mounted on tmpfs 12G 472K 12G 1% /tmp We can just make a sparse file. for cmd in \ 'dd bs=1024k seek=20k of=' \ 'ls -slh ' do eval "$cmd/tmp/file" echo done </dev/null ...


3

For changing the file system UUID you have to decrypt /dev/sda1 and then run tune2fs on the decrypted device mapper device. sda1 itself does not have a UUID thus it cannot be changed. The LUKS volume within sda1 does have a UUID (which is of limited use because you probably cannot use it for mounting), though. It can be changed with cryptsetup luksUUID ...


3

The kernel maintains a copy of the partition table in memory. It doesn't actually remember where the partition table is stored, so it doesn't detect that the partition table has changed on the disk. That's why you're still seeing the partition that was there before. You need to tell the kernel to parse the disk again to update its in-memory partition table. ...


3

I have solved the issue. My /var/log directory contained a logfile and kern.log that were each over 5.7GB each. It seems that my machine was logging the same lengthy error thousands of times over, which quickly filled my machine.


3

You want to resize your home partition but the swap partition is in the way. Rough outline follows. First, check the current size of your home partition: blockdev --getsize64 /dev/sda3 Disable swap: swapoff -a Delete swap partition: parted /dev/sda rm 4 Resize home partition but leave 1GiB for a new swap partition at the end. parted /dev/sda -- ...


3

Insert USB drive. lsblk and find your drive. If mounted then umount it. fdisk device and create new Linux partition. Format new partition with mkfs.ext4 or 3 depending on your needs. mount drive somewhere in your file-system. Note: Backup your data if you have any before executing mkfs.ext4



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