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.


11

/dev does not hold any partitions. /dev is a de facto standrad place to keep all device nodes. Originally, /dev was a plain directory in the root file system (so the device nodes created survived a system reboot). Nowadays, the special virtual filesystem backed by RAM is used by most Linux distributions. There is no standard of any kind to have some ...


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

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


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


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


5

The options correspond to the various partitioning systems supported in libparted; there's not much documentation, but looking at the source code: aix provides support for the volumes used in IBM's AIX (which introduced what we now know as LVM); amiga provides support for the Amiga's RDB partitioning scheme; bsd provides support for BSD disk labels; dvh ...


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


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

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

With 3.2 million inodes, you can have 3.2 million files and directories, total (but multiple hardlinks to a file only use one inode). Yes, it can be set when creating a filesystem on the partition. The options -T usage-type, -N number-of-inodes, or -i bytes-per-inode can all set the number of inodes. I generally use -i, after comparing the output of du -s ...


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


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


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


4

The MBR partition format is three decades old, and subject to weirdness for historical reasons. Back then, the computer needed to know the geometry of the hard disk. How is data organized on a hard disk? In three dimensions: cylinder, heads and sectors. (Diagram by LionKimbro) The geometry was stored with maximum values that were large enough for the ...


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

I'm answering my own question because this is a bit too long for a comment. I've fixed this, but it involved wiping out all my changes and starting from scratch. I basically followed "Method 0" from this page, https://wiki.ubuntu.com/LiveUsbPendrivePersistent, which involves removing a file called casper-rw, which stores the persistent changes and is ...


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


3

Cylinder/head/sector addressing is horrendously obsolete, but some old disk tools still use it by default, and Linux fdisk supports it in emulation. The CHS values it's giving do not refer to any physical reality of the disk, but are guesses based on (I'd guess) the current partition table. They can probably be safely ignored. sdc1 runs right up to the end ...


3

Same as you would with any other block device. e.g. file -s /dev/vg1/lv1 If it's ext4, it'll say something like: /dev/vg1/lv1: Linux rev 1.0 ext4 filesystem data, UUID=xxxx, volume name "yyyy" (needs journal recovery) (extents) (large files) (huge files) Alternatively, you could run blkid /dev/vg1/lv1. That would report something like: /dev/vg1/lv1: ...


3

Separate partitions are to a great extent arbitrary as I'm sure you're finding through your reading. You may have certain goals or use-cases which make one partition scheme more desirable than the other. For example, web-servers may have a separate partition for /var/log so that log data can't fill the /var partition and impede programs that need to create ...



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