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


9

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


8

Restore You can restore the image back to your replacement HDD with something along the lines of: # dd if=backup.img of=/dev/sd? You will end up with a clone of your original disk including all partitions and data. The downside to this is that the partitions won't be resized by dd so your replacement disk must be identical to or larger in capacity than ...


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

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


6

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

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

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


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

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

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


4

You can't. Partitions must be continuous, and yor unallocated space and your sda11 is not adjacent. If it had been, you would need to boot from something else (a live usb is a typical choice) as you shouldn't try editing partitions in use. If you had used LVM you could create another partition in the unallocated space, create a physical volume on that, add ...


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

You can access the disk image and its individual partitions via the loopback feature. You have already discovered that some disk utilities will operate (reasonably) happily on disk images. However, mkfs is not one of them (but strangely mount is). Here is output from fdisk -lu binary.img: Disk binary.img: 400 MiB, 419430400 bytes, 819200 sectors Units: ...


3

You are running your disk usage via LVM, the Logical Volume Manager. Almost the entire disk is given over to LVM. Your "partitions" for / and /home are allocated out of the LVM space. You can see the usage with the pvdisplay, vgdisplay and lvdisplay commands (run these as root). If you want a new logical "partition" for your CentOS system you create one ...


3

You need to create a filesystem on the new partition still. You created the partition, but it doesn't have a filesystem on it (as shown by its lack of entry in df -T). Do mkfs -t ext4 /dev/sda4 then try to mount it after


3

It sounds to me like you are trying to mount directories which are already mounted (or part of a mount) to a different location. The way to do is is to mount -o bind. So you would have something like this: UUID=XXX-Data-drive-UUID-XXX /media/data ext4 defaults 0 1 /media/data/tmp /tmp ext4 defaults,bind 0 0 /media/data/home /home ext4 defaults,bind 0 0 ...


3

Summary of the methods (as mentioned in this question and elsewhere) to clear unused space on ext2/ext3/ext4: If the "disk" your filesystem is on is thin provisioned (e.g. a modern SSD supporting TRIM, a VM file whose format supports sparseness etc.) and your kernel says the block device understands it, you can use e2fsck -E discard src_fs to efficiently ...


3

The absolutely easiest way I found using Linux was the following: 1) Partition the drive (I used GParted) in 2 partitions with the SECOND partition being large enough to hold your operating system. My drive was a 2gb Flash Drive so I created a 500Mb Partition 1 and the remainder as Partition2. 2) I installed the latest version of UNetbootin on my Linux ...


3

You have four primary partitions and want to add a fifth... and you can't just redeclare them extended/logical because those need an extra sector for each partition. Also GPT has a backup at the end of the disk so if you ever lost a partition table to MSDOS and had to resort to TestDisk, with GPT you might be able to do without. grub on BIOS system with ...


3

The three block devices are logical volumes in an LVM volume group, fedora. swap is used for swap (spill-over for RAM), home is used to store all your personal data, and root is used for everything else (programs, system configuration, system logs...). There are good reasons for these three devices to be separate: swap works better as a separate block ...


3

As the volume/partition that you wish to modify is mounted, you should not modify it. In fact, GParted will not let you modify mounted partitions: Why are some menu items disabled? The partition is mounted and modifying a mounted partition is DANGEROUS. Just unmount the partition… To use GParted on the boot volume, you'll need to stop/finish ...


3

Is the goal to completely destroy everything on your current /data disk and create a new, entirely empty encrypted volume? Because that's what you're doing with this command. That's what the whole "WARNING: This will overwrite data on /dev/sda4 irrevocably" thing is about. You will lose all the current data, and start over with an empty block device. More ...



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