/etc/fstab
---[ /bash ]--------------------------------------------------------------------
You should also keep in mind all your commands are logged to .bash_history, so
you may want to delete that file if it contains information about the key file.
================================================================================
=== Resizing ===================================================================
TODO (see [06])
=== Growing
---[ bash ]---------------------------------------------------------------------
[root@eddie ~]# umount /mnt/p30jDcdBh/
[root@eddie ~]# umount /mnt/hint-p30jDcdBh/
[root@eddie ~]# cryptsetup -v luksClose p30jDcdBh
semid 688128: semop failed for cookie 0xd4dda7f: incorrect semaphore state
Failed to set a proper state for notification semaphore identified by cookie \
value 223206015 (0xd4dda7f) to initialize waiting for incoming notifications.
Command successful.
[root@eddie ~]# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9b5a99c6
Device Boot Start End Blocks Id System
/dev/sdc1 2048 12287 5120 83 Linux
/dev/sdc2 12288 1048588287 524288000 83 Linux
Command (m for help): d
Partition number (1-4): 2
Command (m for help): p
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9b5a99c6
Device Boot Start End Blocks Id System
/dev/sdc1 2048 12287 5120 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4, default 2):
Using default value 2
First sector (12288-3907029167, default 12288):
Using default value 12288
Last sector, +sectors or +size{K,M,G} (12288-3907029167, default 3907029167): \
+1500G
Command (m for help): p
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9b5a99c6
Device Boot Start End Blocks Id System
/dev/sdc1 2048 12287 5120 83 Linux
/dev/sdc2 12288 3145740287 1572864000 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@eddie ~]# mount /mnt/hint-p30jDcdBh/
[root@eddie ~]# fdisk -l /dev/sdc > /mnt/hint-p30jDcdBh/partitions
[root@eddie ~]# cryptsetup -v luksOpen /dev/sdc2 p30jDcdBh --key-file foobar.key
[root@eddie ~]# e2fsck -f /dev/mapper/p30jDcdBh
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
p30jDcdBh: 23683/32768000 files (2.5% non-contiguous), 108876078/131071743 \
blocks
[root@eddie ~]# resize2fs /dev/mapper/p30jDcdBh
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/mapper/p30jDcdBh to 393215743 (4k) blocks.
The filesystem on /dev/mapper/p30jDcdBh is now 393215743 blocks long.
[root@eddie ~]# e2fsck -f /dev/mapper/p30jDcdBh
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
p30jDcdBh: 23683/98304000 files (2.5% non-contiguous), 112989103/393215743 \
blocks
[root@eddie ~]# mount /dev/mapper/p30jDcdBh /mnt/p30jDcdBh/
[root@eddie ~]# df -h | grep /p30jDcdBh
/dev/mapper/p30jDcdBh
1.5T 408G 994G 30% /mnt/p30jDcdBh
---[ /bash ]--------------------------------------------------------------------
================================================================================
=== Weblinks ===================================================================